Trackl Python Client
Project description
Trackl Python Client
Install
python3 -m pip install git+https://gitlab.com/denny.weinberg/trackl-python-client
or
python3 -m pip install trackl-python-client
Python
Usage/Init
from trackl_client import TracklClient
client = TracklClient(api_endpoint='http://localhost:8080/api/v1', api_key='ey...')
# Or with workspace, email and password
client = TracklClient(api_endpoint='http://localhost:8080/api/v1', workspace='test' login_email='test@test.com', password='test')
Examples
# Teams: List
teams = client.teams_list()
# Teams: Search
teams = client.teams_search(name='Name')
# Teams: Create
team = client.teams_create(True, 'Name')
# Users: List
users = client.users_list()
# Users: Search
users = client.users_search(email='test@test.com')
# Users: Create
user = client.users_create(True, 'email', 'Name', 'testPWD123$', ['record.read', 'record.write'])
# Teams: Add User
client.teams_add_user(team_name='Name', user_email='test@test.com')
# Teams: Remove User
client.teams_remove_user(team_name='Name', user_email='test@test.com')
# Teams: List Users
users = client.teams_list_users(team_name='Office')
# Records: Search
records = client.records_search(page=1, page_type='elements', id='1,2', page_size=200, start_date_time_from='2022-10-01', start_date_time_to='2022-10-05', end_date_time_is_null=False, include_user_name=True)
# Records: Validate
record_validity_infos = client.records_validate(1)
CLI
Usage
python3 -m trackl_client.cli
--api_endpoint ${api_endpoint} --workspace ${workspace} --api_key ${api_key} --login_email ${login_email} --password ${password}
users_create|teams_create|teams_add_user|teams_remove_user
[--help]
other_arg_1 --other_kwarg_1
# More:
# python3 -m trackl_client.cli --help
# python3 -m trackl_client.cli records_search --help
Init
export api_endpoint='http://localhost:8080/api/v1'
export api_key='ey...'
# Or with workspace, email and password
# export workspace='test'
# export login_email='test@test.com'
# export password='test'
Examples
# Teams: List
python3 -m trackl_client.cli teams_list
# Teams: Search
python3 -m trackl_client.cli teams_search --name Name
# Teams: Create
python3 -m trackl_client.cli teams_create True Name
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
trackl_client-2.1.2.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trackl_client-2.1.2.tar.gz.
File metadata
- Download URL: trackl_client-2.1.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.8 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb4f4ebd367df5bf5ab7caaed54e5e8e2ffd2fc1485678a7dc9ea001aadcaba5
|
|
| MD5 |
4deb29670ce525b8b49502b26cd3d8d9
|
|
| BLAKE2b-256 |
269d1d0442bd309e06877902cab5e873647c660b104f10e233ab06f1f5553c6f
|
File details
Details for the file trackl_client-2.1.2-py3-none-any.whl.
File metadata
- Download URL: trackl_client-2.1.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.8 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af85dbba5ee65ca4192ab4ba806b5d14b74df70b477825be4874670732e9f6a0
|
|
| MD5 |
9a00ddb241f307444bfbdb867a26b201
|
|
| BLAKE2b-256 |
bced39260cd11300926b8155f8a050019d34a5b94a77dad96dfe36919bc586d3
|