biocognia
The client every BioCognia product (SCIMAP Pro, Plexora, and the tools that join later) uses for its licence, its devices and its AI credits. A port of Plexora's licensing client, parameterised by product.
from biocognia import Guard, Licensing, Product
PRODUCT = Product.from_manifest("manifest.json", version=__version__)
LICENSING = Licensing(PRODUCT)
GUARD = Guard(LICENSING)
GUARD.check("streaming") # raises EntitlementRequired, or returns
GUARD.limit("max_cells") # an int, or None for unlimited
- Certificates.
BIOC1.<kid>.<canonical JSON>.<Ed25519>, signed only by the platform (bioc-core), verified offline here.audnames one product; entitlements and limits are that product's own. No personal data. - Devices. One random secret per machine (
environment.json), shared by every product; the platform is told its hash and compares it on every certificate. Connecting a device from one product connects it for all. - Activation.
<cli> license activateprints a short code; the person approves it ataccount.biocognia.com; the certificates arrive. Codes andBIOCT1_tokens from the portal work without a browser. - Offline. Cached certificate to expiry, then grace, then the product's
free tier.
.biocfiles for air-gapped machines;BIOCD1job certificates for clusters without$HOME;BIOCOGNIA_OFFLINE=1forbids every call. - AI.
gateway.TokenSourceexchanges the certificate for a 30-minuteBIOCAI1token;gateway.GatewayClientis the transport and the account endpoints. The model call itself lives in the harness.
import biocognia is stdlib-only: no file, thread, socket or third-party
import until something asks.
Layout
| Module | Does |
|---|---|
product |
Product from the product's manifest; validate_manifest |
certificate, delegation |
BIOC1 and BIOCD1 parse and verify |
entitlements |
colon-path grants with ancestor match |
environment, store |
the device secret, where files live, the environment variables |
state |
Licensing: resolution, expiry, refresh, activation, lease |
client |
api.biocognia.com/v1 |
guard |
Guard: check, allows, limit, refusal as data |
gateway |
TokenSource, GatewayClient |
cli |
the shared license verbs |
codes |
the platform's error codes, pinned by both halves |
testing |
Issuer, FakeService, opt-in pytest fixtures |
Vectors
vectors/biocognia-vectors.json holds certificates signed with a public,
test-only key. The platform's test suite re-signs every payload and compares
bytes; this repository verifies every one. python tools/make_test_vectors.py --check fails when the file is stale.
Development
uv venv ~/.venvs/biocognia && VIRTUAL_ENV=~/.venvs/biocognia uv pip install -e . pytest
~/.venvs/biocognia/bin/python -m pytest
Keep the virtual environment outside any synced folder.
Metadata
Release files for biocognia 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| biocognia-0.1.1.tar.gz | 59.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| biocognia-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 117.8 kB
Release files / biocognia-0.1.1.tar.gz
| Download URL | biocognia-0.1.1.tar.gz |
|---|---|
| Size | 59.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
373d9d17fc4528bb467378ded2dc40aec2bc80f7c41edbed1fe68149b9e3ce16
|
|
BLAKE2b-256 checksum How to use checksums |
368991e116120f0977d1bfcbdaba5abda4088d505eec70b48b6ab0fbc7da78e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / biocognia-0.1.1-py3-none-any.whl
| Download URL | biocognia-0.1.1-py3-none-any.whl |
|---|---|
| Size | 58.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74827cd49d00f1839caf14616593f5a66ee80f1f373056bc2ec52ad8f52d23b2
|
|
BLAKE2b-256 checksum How to use checksums |
8a7c9990309051555d44c73c272b0d372b5560f781b9c65cdf37aa512ea3e064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|