Python SDK for BitlogWMS API
Project description
nn-bitlog-client
This is the Python SDK for the BitlogWMS API. It allows you to interact with the Bitlog API using Python.
Installation
You can install the package from PyPi using pip:
pip install nn-bitlog-client
Usage
After installation, you can import the package in your Python scripts as follows:
import bitlogclient
Generate token
To generate a token to be used for authentication you can do this with this snippet:
from bitlogclient import Token
token = Token(
domain='your_domain',
basic_auth_user= 'your_auth_user',
basic_auth_password= 'your_auth_password',
username='your_username', password='your_password).get_token()
List available dataviews
To list all available dataviews you can use this snippet:
from bitlogclient import Report
views = Report(
token='your_token,
domain='your_domain').list_views()
Get dataview
To get data from a dataview without parameters you can use this snippet:
from bitlogclient import Report
data = Report(
token='your_token,
domain='your_domain').get_view('your_view_name')
Get dataview with parameters
To get data from a dataview with parameters you can use this snippet:
from bitlogclient import Report, ReportParams
data = Report(
token='your_token,
domain='your_domain').get_view_with_params(
'your_view_name',
[
ReportParams('from_date', 'date', '2023-01-01'),
ReportParams('to_date', 'date', '2023-01-01'),
])
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
Built Distribution
File details
Details for the file nn_bitlog_client-0.0.3.tar.gz
.
File metadata
- Download URL: nn_bitlog_client-0.0.3.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd6e53d7031bf49840c8e12425ba79d4652501f359ee61a6ae2882feda4ca63 |
|
MD5 | 8d83c6121ca223f4761e3d395ea6798e |
|
BLAKE2b-256 | 1cfb03a565c72e8ca20e1741a1f859b35af5a662fb872cf2e617c1b0ac2efb10 |
File details
Details for the file nn_bitlog_client-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: nn_bitlog_client-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee60c42dff6a6a4578fd032bff62935356ac6dffbb2f70c2d7134fa46f982e0a |
|
MD5 | c49c5190d3e96890ffdf16c370644848 |
|
BLAKE2b-256 | 74756ca3a7795816572b426201c0609754f95f805516adf0b8ebc921db0c9d7f |