Skip to main content

Python bindings for CIRISVerify hardware-rooted license verification

Project description

CIRISVerify Python Bindings

Python bindings for CIRISVerify, the hardware-rooted license verification module for the CIRIS ecosystem.

Installation

pip install ciris-verify

Note: The CIRISVerify binary must be installed separately. See the CIRISVerify documentation for installation instructions.

Quick Start

import os
from ciris_verify import CIRISVerify, LicenseStatus

# Initialize the verifier
verifier = CIRISVerify()

# Get license status with a fresh nonce
status = await verifier.get_license_status(
    challenge_nonce=os.urandom(32)
)

# Check if professional capabilities are available
if status.allows_licensed_operation():
    print("Professional license verified!")
    print(f"Tier: {status.license.tier}")
    print(f"Capabilities: {status.license.capabilities}")
else:
    print("Running in community mode")

# IMPORTANT: Always display the mandatory disclosure
print(status.mandatory_disclosure.text)

Mandatory Disclosure

Per the CIRIS ecosystem rules, agents MUST display the mandatory_disclosure.text to users. This ensures transparency about the agent's capabilities and licensing status.

# The disclosure MUST be shown to users
disclosure = status.mandatory_disclosure
print(f"[{disclosure.severity.upper()}] {disclosure.text}")

Capability Checking

For frequent capability checks, use the fast path:

result = await verifier.check_capability("medical:diagnosis")
if result.allowed:
    # Capability is available
    pass
else:
    print(f"Capability denied: {result.reason}")

Testing

For testing without the actual binary, use MockCIRISVerify:

from ciris_verify import MockCIRISVerify, LicenseStatus

# Create a mock that returns community mode
verifier = MockCIRISVerify(
    mock_status=LicenseStatus.UNLICENSED_COMMUNITY
)

# Use exactly like the real client
status = await verifier.get_license_status(os.urandom(32))
assert status.status == LicenseStatus.UNLICENSED_COMMUNITY

Error Handling

from ciris_verify import (
    CIRISVerifyError,
    BinaryNotFoundError,
    BinaryTamperedError,
    VerificationFailedError,
)

try:
    verifier = CIRISVerify()
    status = await verifier.get_license_status(os.urandom(32))
except BinaryNotFoundError as e:
    # Binary not installed
    print(f"CIRISVerify not found: {e.path}")
except BinaryTamperedError:
    # CRITICAL: Binary has been modified
    # Halt all operations immediately
    raise SystemExit("SECURITY ALERT: Binary integrity compromised")
except VerificationFailedError as e:
    # Verification failed - operate in restricted mode
    print(f"Verification failed: {e}")

License Status Codes

Status Code Description
LICENSED_PROFESSIONAL 100 Full professional license active
LICENSED_PROFESSIONAL_GRACE 101 License valid, in offline grace period
UNLICENSED_COMMUNITY 200 Community mode, no professional capabilities
RESTRICTED_* 300-399 Restricted mode due to verification issues
ERROR_* 400-499 Error states (revoked, expired, etc.)
LOCKDOWN_* 500+ Critical security failure, halt operations

Thread Safety

The client is thread-safe and can be used from multiple threads or async tasks concurrently.

License

AGPL-3.0-or-later - See LICENSE file in the CIRISVerify repository.

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

ciris_verify-0.10.16.tar.gz (27.1 kB view details)

Uploaded Source

Built Distributions

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

ciris_verify-0.10.16-py3-none-win_amd64.whl (3.6 MB view details)

Uploaded Python 3Windows x86-64

ciris_verify-0.10.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

ciris_verify-0.10.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

ciris_verify-0.10.16-py3-none-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

ciris_verify-0.10.16-py3-none-macosx_10_12_x86_64.whl (3.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file ciris_verify-0.10.16.tar.gz.

File metadata

  • Download URL: ciris_verify-0.10.16.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ciris_verify-0.10.16.tar.gz
Algorithm Hash digest
SHA256 1d59ddf6f06ed39126ffa728258bd1d3e197aedca3ecb8ee7d501812a9af715f
MD5 588e4152b46c49417d112a33754ec799
BLAKE2b-256 35a7f582cbfe9022ce1b4e174dcb696b450f55e028fc50313facd1a450a85f92

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_verify-0.10.16.tar.gz:

Publisher: release.yml on CIRISAI/CIRISVerify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciris_verify-0.10.16-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for ciris_verify-0.10.16-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ab6b3c91e61a7ac99543c7547de8e9cd9ec06d8571b7d13f79e663f3cb817355
MD5 2200d90885e358faa5ce944e0e4a27a7
BLAKE2b-256 a8898fb79565c4be30b1e657d6c9d89cf9a7d8a9577bdcdb6f843c85949f71fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_verify-0.10.16-py3-none-win_amd64.whl:

Publisher: release.yml on CIRISAI/CIRISVerify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciris_verify-0.10.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ciris_verify-0.10.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 54d002fdd22d5d5c67a8caa4b243133b628a13fb937e1572719b4865ab32edc4
MD5 7ba7f6863f437c1667c8129b7f1892d4
BLAKE2b-256 4779f8869852603c7306545a7443a124018611ffc2240684035af3cc6d7f1fd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_verify-0.10.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on CIRISAI/CIRISVerify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciris_verify-0.10.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ciris_verify-0.10.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a9daa7007c697b4b3c5f4b113d68adaf220a27f6bef90e4490f4d9826cf1c667
MD5 f0e847018aba9a37b472a4c2b3b44734
BLAKE2b-256 d2a73315f34c8e73ef389b3aeb165ac9d4475f48e3e5b944bc3240cf53075f88

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_verify-0.10.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on CIRISAI/CIRISVerify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciris_verify-0.10.16-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ciris_verify-0.10.16-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5619208b1da88507437698c1db6a6ada2937bcb854f0f670363e20608961def9
MD5 7836b9a7ecc5987074b4acdafb83b386
BLAKE2b-256 9c3471bc3f2dec54f95af764fe1d71a42318e80b1073bc2b7b224aef6e998fb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_verify-0.10.16-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on CIRISAI/CIRISVerify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciris_verify-0.10.16-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ciris_verify-0.10.16-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7d3fe2742b0ccbe75c94890ba47976ff1e92dec43a2be717ca46687ce1707c13
MD5 ce5844d72508c908dd218f27f6c41712
BLAKE2b-256 c0127db7f6e6a0d55a5184d07130f150076363eb7995e356c61142ade80e0059

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_verify-0.10.16-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on CIRISAI/CIRISVerify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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