Getting Started
Installation¶
To install Pytanis simple run:
pip install pytanis
pip install 'pytanis[all]'
~/.pytanis/config.toml and for Windows $HOME\.pytanis\config.toml, where $HOME is e.g. C:\Users\yourusername\. Use your favourite editor to open config.toml within the .pytanis directory and add the following content: [Pretalx]
api_token = "932ndsf9uk32nf9sdkn3454532nj32jn"
api_version = "v1" # Optional, defaults to "v1" if not specified
[Google]
client_secret_json = "client_secret.json"
token_json = "token.json"
[HelpDesk]
account = "934jcjkdf-39df-9df-93kf-934jfhuuij39fd"
entity_id = "email@host.com"
token = "dal:Sx4id934C3Y-X934jldjdfjk"
[Pretalx] and [HelpDesk] accordingly. Info
You have to configure the credentials and tokens only for the sections you actually want to use. For instance, [Pretalx] and [Google] are the most important sections for users that want to interact with Pretalx and also Google Sheets. If for instance no access to HelpDesk is necessary, e.g. no mails need to be sent, you can just leave out the key/value pairs in the [HelpDesk] section.
Retrieving the Credentials and Tokens¶
- Google: Follow the Python Quickstart for the Google API to generate and download the file
client_secret.json. Move it to the~/.pytanisfolder asclient_secret.json. The filetoken.jsonwill be automatically generated later. Note thatconfig.tomlreferences those two files relative to its own location. - Pretalx: The API token can be found in the Pretalx user settings.
- HelpDesk: Log into the LiveChat Developer Console then go to Tools ยป Personal Access Tokens. Hit Create new token +, enter a the name
Pytanis, select all scopes and confirm. In the following screen copy theAccount ID,Entity IDandTokenand paste them intoconfig.toml. In case there is any trouble with livechat, contact a helpdesk admin.
Verifying Your Installation¶
After installation and configuration, you can verify that everything is working correctly by running the integration tests. See the Testing Guide for detailed instructions on how to validate your setup and test API compatibility.