Datapane's Python library and CLI can be installed using pip.
pip3 install datapane
As well as a Python client, Datapane has a server component which allows you to both share reports and execute your scripts to allow others generate reports dynamically.
datapane.com is available as a free, public server, which you can use to share reports and scripts. The API and CLI is configured to use this server by default.
To use Datapane, first sign up for a free account and copy the API key provided in the web interface. Next, login using the CLI using this key. All requests from both the CLI and Python library will now be authenticated.
$ datapane loginEnter your API Key: [paste your API key here]
If you have a private single-tenant server on your-company.datapane.com, your credentials will have been shared with you via email. Similarly to using the public instance, you will be able authenticate by passing in your API key to the login command. You can pass in the full URL of your server to the login command as follows.
$ datapane login --server=https://acme.datapane.comEnter your API Key: [paste your API key here]
Datapane is API-first, and the recommended method of working with the server is through the Datapane CLI.
Usage: datapane [OPTIONS] COMMAND [ARGS]...Datapane CLI ToolOptions:--debug / --no-debug Enable additional debug output.--env TEXT Alternate config environment to use.--version Show the version and exit.--help Show this message and exit.Commands:blob Commands to work with Blobslogin Login to a server with the given API token.logout Logout from the server and reset the API token in the config file.ping Check can connect to the server.report Commands to work with Reportsscript Commands to work with Scripts