The Tracker Python API Client will provide a Python wrapper for key features of Tracker.
It makes use of GQL, a Python GraphQL client, to query the Tracker API.
Install pipenv if you don't already have it.
pipenv install --devIf you run into issues, ensure pipenv has installed the most recent GQL version. The most recent version of GQL is only available from their Github, so if you need to install it manually run:
pipenv install -e git+https://github.com/graphql-python/gql.git#egg=gqlThe client will attempt to draw credentials from its environment in order to obtain an authentication token. Pipenv makes this easy to set up by importing environment variables from a .env file present in this directory whenever pipenv run or pipenv shell are used. The .env file can be created like so:
cat <<'EOF' > .env
TRACKER_UNAME=YOURTRACKEREMAILHERE@EXAMPLE.COM
TRACKER_PASS=YOURPASSWORDHERE
EOFPytest is used for testing. To run tests, run the following in the project root (the folder containing this README.md):
pipenv run pytestAlternatively, if you are already in a pipenv shell, just run pytest.
If tests are failing with ModuleNotFoundError, make sure tracker_client/ is on your PYTHONPATH. The .env file used to store your credentials is a good way to set this.