TimeChimp API Python SDK
Project description
TimeChimp
Description
- SDK to interact with TimeChimp API
- Can return a converted response to JSON and check for errors.
- Log HTTP method, url, params and headers
- Hide access_token in the logs
How to install
pip3 install timechimp
Source structure
- _endpoint.py: contain the source endpoints.
- _env_variables.py: env variables names holding the auth value (eg API token).
- api sub-package contains the functions to call
How to use
- access token is retrieved through env variables TIMECHIMP_ACCESS_TOKEN
Get the requests response object
import timechimp
response = timechimp.api.users.get_all()
Convert the response object to json
import timechimp
users = timechimp.api.users.get_all(to_json=True)
- When setting to_json to True, will automatically raise an error if an error key is detected.
- So you don't have to worry about this in your application.
Test
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
timechimp-0.0.2.tar.gz
(24.6 kB
view hashes)
Built Distribution
timechimp-0.0.2-py3-none-any.whl
(40.5 kB
view hashes)
Close
Hashes for timechimp-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc504c22c538462350d994af6b2627a460dddbad447f195588f7fb68bb89f30e |
|
MD5 | f1807473ab3b18db49445b427e88e5e8 |
|
BLAKE2b-256 | 3e3bc941aa3951cc8f6b7f806d8923cd60a0b67181f4ebb099f4015db9ff64a5 |