kiban-sdk (Python)
The Python client for an application that runs beside Kiban. The app's backend authenticates as its registered service client, verifies the user tokens Kiban's login issued, asks for access decisions, writes and removes relation tuples on its own object types, and looks members up, all through the gateway's public API.
from kiban import KibanClient
kiban = KibanClient(gateway_url="https://kiban.example", client_id="tokidesk-backend", client_secret=SECRET)
user = kiban.verify_user_token(bearer) # the user behind a request
decision = kiban.can(bearer, "tokidesk.ticket.view", module_key="tokidesk", company_id=company_id)
kiban.grant(company_id, [kiban.anchor_tuple("tokidesk", "ticket", ticket_id, company_id),
{"objectType": "ticket", "objectId": ticket_id, "relation": "viewer",
"subjectType": "user", "subjectId": user.subject}])
Install: pip install kiban-sdk (from this directory: pip install .). Depends on PyJWT with
its cryptography extra. Licence: Apache-2.0.
Metadata
Release files for kiban-sdk 0.1.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 | |
|---|---|---|---|
| kiban_sdk-0.1.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kiban_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / kiban_sdk-0.1.0.tar.gz
| Download URL | kiban_sdk-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30ecdfab01409e52364df520516516a9700fe4e652921b0af835c85d3b509566
|
|
BLAKE2b-256 checksum How to use checksums |
e7b03b0a5f628a716acc48ebf722361485fd3fe0927927428af1b4eaec41bdb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / kiban_sdk-0.1.0-py3-none-any.whl
| Download URL | kiban_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c89b727e79e38f50ed2838544ed128b4fc3ee9d220c36fcd2a6f3fb2c8b17ab6
|
|
BLAKE2b-256 checksum How to use checksums |
174d60dabb8f8e3f2304cdabd69ce5b77f8e0c52bb67526657c64787e2b460d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|