Skip to main content

Official Cognitum SDK for Python

Project description

cognitum

Official Cognitum SDK for Python.

Talk to a Cognitum Seed appliance (direct, over mDNS / USB gadget / LAN) or the Cognitum Cloud control plane (api.cognitum.one).

Install

pip install cognitum
# optional: mDNS discovery
pip install "cognitum[mdns]"

Requires Python >=3.10.

Quick start — talking to a Seed

from cognitum.seed import SeedClient, SeedTLS

client = SeedClient(
    endpoints="https://cognitum.local:8443",
    tls=SeedTLS(insecure=True),  # dev-only
)

status = client.status()
print(f"seed {status.device_id}, epoch {status.epoch}")

result = client.store.query(vector=[0.1, 0.2, 0.8], k=3)

An AsyncSeedClient is available with the same surface for async codebases.

Features

  • 12 typed seed endpoints (status, pair, witness, custody, store, OTA, …)
  • Mesh routing with closest-first, session-sticky reads, failover on 5xx
  • client.mesh() observability wrappers (status / peers / swarm / cluster)
  • Per-call CallOptionspeer / prefer / consistency / timeout / retries
  • Discovery providers: ExplicitDiscovery, MdnsDiscovery, TailscaleDiscovery
  • TLS — explicit CA, fp=sha256:<hex> cert pinning, or dev-only insecure
  • Trust-score 3-strike cutoff; redacting SecretString around pairing tokens
  • ADR-0005 retry / rate-limit (500 ms base, 30 s cap, 60 s wall-clock)
  • MCP client with both HTTP and stdio transports
  • Lazy __getattr__ keeps cold start fast when only cognitum.seed is used

Documentation

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cognitum_sdk-0.2.0.tar.gz (68.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cognitum_sdk-0.2.0-py3-none-any.whl (88.9 kB view details)

Uploaded Python 3

File details

Details for the file cognitum_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: cognitum_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 68.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cognitum_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0566129dfd6d653a9f5de10d1b1f7c221e469304ff27e42af291c626abdd127c
MD5 1afb5147150cfe5332e9cdf2c6202559
BLAKE2b-256 8d6c5834955e64a44643e0e912bd9edf983acfce979121c3c5b916fb5108b40a

See more details on using hashes here.

File details

Details for the file cognitum_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cognitum_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 88.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cognitum_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2ac41df7f3925966bc26bbeae45a06716fdf5a724d805302942ffc451a41ded
MD5 9fe26173e4a2d425798bdbcfaa4f5d5f
BLAKE2b-256 48cee0ccc88d26608a6d4b39790d5badaeeee68a405112039af2695381e22e4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page