Python Client for QRonos
Project description
qronos-client
Python client for QRonos
Installation
This package can be installed via pip:
pip install qronos-client
Example Usage
from qronos import QRonosClient
# Create client and login
qronos = QRonosClient(host='dev.qronos.xyz')
token, expiry = qronos.login(username='Quentin', password='Rogers')
# Alternatively if you already have a token
qronos = QRonosClient(host='dev.qronos.xyz', token='ABCDEFGHIJKLMN')
# Import Tracker (Item) Data
job_id = qronos.tracker_import(
tracker_id=24,
unique_columns=["Part Number", "Weight"],
can_add_item=True,
can_delete_item=False,
data=[{"Part Number": "A1", "Weight": 5}, {"Part Number": "A2", "Weight": 8}],
)
# Import Stage Data
job_id = qronos.stage_import(
stage_id=2,
data=[{"Part Number": "A1", "leadtime": 5}, {"Part Number": "A2", "actual": "2020-10-26"}],
)
# Delete Items
job_id = qronos.delete_items(
tracker_id=2,
data=["A", "B"],
)
# Get Item Attribute Data by tracker
item_data = qronos.get_item_attributes(
tracker=3,
show_non_mastered=False,
show_mastered=True,
)
# Get Item Attribute Data by unique keys
item_data = qronos.get_item_attributes(
unique_keys=["800000689", "800000726", "800000727"],
show_non_mastered=True,
show_mastered=True,
)
# Get Item Attribute Data by single unique key
item_data = qronos.get_item_attributes(
unique_key="800000689",
show_non_mastered=False,
show_mastered=True,
)
# Check Status of an Import
status = qronos.import_status(job_id=job_id)
# Logout
qronos.logout(all_tokens=True)
Testing
Speak with a QRonos Demo Site Admin for credentials in order to run the tests.
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
qronos-client-1.1.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for qronos_client-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b14db37a976358335c98ee54333207381baaf9b9ba66378479ff1e0559ba0e02 |
|
MD5 | 5da5b46a194ee73099ed38d16f003a75 |
|
BLAKE2b-256 | 3283e2af0dcf390c9d1a39559446b293f98cd7086c2e241e407ef01ce70c52fe |