cbrapitools
Python API clients and auth helpers for CBR platforms: CMP, Keystone and Keycloak.
Install
pip install cbrapitools
Requires Python 3.11 or newer.
Usage
from cbrapitools.cmp import CmpApiClient
from cbrapitools.keystone import KeystoneApiClient
from cbrapitools.keycloak import KeycloakClientCredentialsAuth
Base URLs and credentials are passed in by the caller (constructor arguments or environment variables). Nothing environment-specific is hard-coded in the package.
Modules
| Module | Purpose |
|---|---|
http_client |
Shared HTTP layer used by the API clients |
keycloak |
Token acquisition and refresh against Keycloak |
cmp |
Client for the Cohort Management Portal API |
keystone |
Client for the Keystone API |
Development
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
Releasing
-
Bump
versioninpyproject.toml(PyPI never accepts the same version twice). -
Build and check:
rm -rf dist python -m build twine check dist/*
-
Upload:
twine upload dist/* -
Users upgrade with
pip install -U cbrapitools.
Metadata
Release files for cbrapitools 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 | Provenance | Actions |
|---|---|---|---|---|
| cbrapitools-0.1.0.tar.gz | 8.4 kB | Without provenance | Details for cbrapitools-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cbrapitools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cbrapitools-0.1.0-py3-none-any.whl |
Total release size: 17.4 kB
Release files / cbrapitools-0.1.0.tar.gz
| Download URL | cbrapitools-0.1.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cba807e7328d298f7534db063410ce922961c3c326fb3f976ba44be9d4ef8e7
|
|
BLAKE2b-256 checksum How to use checksums |
b1f7eb8b5837584c13a1be8261615e70e7b1acb2c9532f5d723990c40a30dd0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / cbrapitools-0.1.0-py3-none-any.whl
| Download URL | cbrapitools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d27ad01d683f24e5b4442bf130443670efed347498b717756fe20d55d97fb91
|
|
BLAKE2b-256 checksum How to use checksums |
a5f344831787def586aba06c26ba84ff42c9d8f81c52f1969225c101fadbfe10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for cbrapitools 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.