SDK that helps with integration via the Binary City Time API.
Project description
Project description
Package Version Python Versions License
bc_time is the Binary City (BC) Time Application Programming Interface (API) Software Development Kit (SDK) for Python, that allows Python developers to develop integration with BC Time.
bc_time is maintained and published by Binary City.
Getting started
Assuming that you have a supported version of Python installed, you can first set up your environment with:
$ python venv .venv ... $ . .venv/bin/activate Then, you can install bc_time from PyPI with:
$ python pip install bc_time or install from source with:
$ git clone git@bitbucket.org:dburger/bc_time_api_sdk.git
$ cd bc_time_api_sdk
$ python pip install -r requirements.txt
$ python pip install -e .
Using bc_time
After installing bc_time
Next, set up credentials at:
~/.bc_time/credentials
[default]
client_id = YOUR_CLIENT_ID
client_secret = YOUR_CLIENT_SECRET
crypt_key = YOUR_CRYPT_KEY
Then, from a Python interpreter:
>>> import bc_time
>>> visitors = bc_time.Visitors()
>>> response_data = visitors.get_all_using_pagination(filters={'filter_status' : bc_time.Status.active})
>>> if response_data['status'] == bc_time.RequestStatus.success:
for visitor in response_data['data']:
print(visitor)
Available methods
For objects
- create
- create_many
- update
- update_many
- get_all_using_pagination
- get_one
- get_many
For membership/group objects
Please note that group objects also has access the the methods as defined for Objects.
- add_visitor_to_group
- remove_visitor_from_group
- get_all_members_using_pagination
All methods will return a Dictionary that - depending on the response - may contain the following keys:
- status
- data
Status IDs can be referenced using the enumerator bc_time.RequestStatus.
Documentation
Please consult our BC Time API documentation for more information.
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
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 bc_time-1.2.0.tar.gz.
File metadata
- Download URL: bc_time-1.2.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b30267d9cd1eece2abcd656a881f01da3e83db2a926d0eeeb30218d25b967dbb
|
|
| MD5 |
a25dcd4cc7f82798bf63d3107e9a2932
|
|
| BLAKE2b-256 |
e911b26eb11164f48eefccc65a31f8b01e8de5e7674c55014a5bde345e8772a7
|
File details
Details for the file bc_time-1.2.0-py3-none-any.whl.
File metadata
- Download URL: bc_time-1.2.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5186c12ff3166a14a3dd5db982defaa1a85b76ce5543bb4d0077583ea1a2cb4
|
|
| MD5 |
7c23375261997ebbd08879b4cec93eae
|
|
| BLAKE2b-256 |
c7f963c85713541c6ed5a89796633947daba2399e0f278e9dd3d219aeb80176f
|