workpathapi
This package allows you to interact with the Workpath API.
Prerequisites
There is only one mandatory Python package that needs to be installed to use workpath i. e. requests. One can install it with the following command.
pip install requests
If you want the API to return a pandas DataFrame you additionally need to install pandas.
pip install pandas
Installation
If all prerequisites are met the installation is as simple as executing the command
pip install workpath
Usage
To get data from the Workpath API you only need three steps.
1. Import module
Import the module, for example like this.
from workpathapi import WorkpathAPI
2. Instanciate WorkpathAPI
Create an instance of the WorkpathAPI.
api = WorkpathAPI(company='dataatelier', api_token='YOUR_WORKPATH_TOKEN')
You need to pass two arguments. Your company and the API token.
Note: If your API token is set as an environment variable as WORKPATH_API_TOKEN = "YOUR_WORKPATH_TOKEN" then you don't have to pass the argument api_token.
3. Get goals from the API
If you want to get all goals, simply execute
goals = api.get_goals()
The output corresponds to the output of API endpoint goals, described here
If you want the result as a pandas DataFrame you can pass the argument output_format='DataFrame'
If you want information about a specific goal, one can execute
goal = api.get_goal(goal_id=1001)
See API documentation for further information.
Release files for workpathapi 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| workpathapi-1.0.0.tar.gz | 4.9 kB | Details |
Release files / workpathapi-1.0.0.tar.gz
| Download URL | workpathapi-1.0.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63146241153dc5d2de5c9b45e671dc43b47aa018858535dc78374eb6f626ce5e
|
|
BLAKE2b-256 checksum How to use checksums |
da6699f7d3d069d9d2fd90e0e7a073c20183b0780fde3ee82227e629e8310d77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|