Module datapane.client.api.user

Datapane User API

User management functions, including authentication

It's possible to authenticate within Python, however we also provide (and recommend) authenticating via the CLI, as it's easier to script,

$ datapane login --token ...
$ datapane logout

Functions

def login(token: str, server: str = 'https://datapane.com', env: str = 'default', cli_login: bool = True) ‑> str

Login to the specified Datapane Server, storing the token within a config-file called env for future use

Args

token
Token to use when logging in
server
Datapane Server to connect to (default: Datapane Community at https://datapane.com/)
env
The environment profile to store these login details to (default: default)
cli_login
Toggle if this login is occuring via the CLI (optional)

Returns

the username for the logged in user

Note: Can also be ran via CLI as "datapane login"

def logout(env: str = 'default') ‑> NoneType

Logout from Datapane Server, removing local credentials

Args

env
Environment profile to logout from

Note: Can also be ran via CLI as "datapane logout"

def ping(config: Optional[datapane.client.config.Config] = None, cli_login: bool = False, verbose: bool = True) ‑> str

Ping the Datapane Server to check login credentials