Skip to main content

Python client for the Subnoto Public API

Project description

Subnoto Python SDK

Python client for the Subnoto Public API

Note: the SDK is only available on the linux/amd64 platform for now

Installation

pip install subnoto-api-client

Usage

The SDK provides both async and sync clients. Use SubnotoClient for async/await code or SubnotoSyncClient for synchronous code.

Async Example

import asyncio
from subnoto_api_client import SubnotoClient, SubnotoConfig

async def main():
    config = SubnotoConfig(
        api_base_url="https://enclave.subnoto.com",
        access_key="your-access-key",
        secret_key="your-secret-key-hex"
    )

    async with SubnotoClient(config) as client:
        response = await client.post("/public/workspace/list", json={})
        print(f"Workspaces: {response.json()}")

if __name__ == "__main__":
    asyncio.run(main())

Sync Example

from subnoto_api_client import SubnotoSyncClient, SubnotoConfig

config = SubnotoConfig(
    api_base_url="https://enclave.subnoto.com",
    access_key="your-access-key",
    secret_key="your-secret-key-hex"
)

with SubnotoSyncClient(config) as client:
    response = client.post("/public/workspace/list", json={})
    print(f"Workspaces: {response.json()}")

Configuration

Option Type Required Description
api_base_url str Yes API base URL (e.g., https://enclave.subnoto.com)
access_key str Yes API access key from your team settings
secret_key str Yes API secret key (hex-encoded) from your team settings
unattested bool No Use unattested mode for development (default: False)
attester_key bytes No Public key for attestation verification

Project details


Release history Release notifications | RSS feed

This version

2.8.0

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

subnoto_api_client-2.8.0-cp311-abi3-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file subnoto_api_client-2.8.0-cp311-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-2.8.0-cp311-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44fa94d365bc08f1fc3cd3ec26a5ecc09993facece5cf255e57bda5bcef26d7c
MD5 ec018ff72420e17990d1fe43f7ae3a73
BLAKE2b-256 903b9e672e5671c36632bfb64b76017e6f772ea6a6b248268e01204aaafeed30

See more details on using hashes here.

Provenance

The following attestation bundles were made for subnoto_api_client-2.8.0-cp311-abi3-manylinux2014_x86_64.whl:

Publisher: .gitlab-ci.yml on subnoto/subnoto-monorepo-public

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

File details

Details for the file subnoto_api_client-2.8.0-cp311-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-2.8.0-cp311-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 40052a2bc8ac06c1cf28b18488f41751466813c025a84fb3534e80f5466852ac
MD5 18bd023275732138192bd41e5137419b
BLAKE2b-256 e3fc84d6be5d52c36898c66c19c7a0b59f24acaf4e58a51d3b430eaec3380071

See more details on using hashes here.

Provenance

The following attestation bundles were made for subnoto_api_client-2.8.0-cp311-abi3-manylinux2014_aarch64.whl:

Publisher: .gitlab-ci.yml on subnoto/subnoto-monorepo-public

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

File details

Details for the file subnoto_api_client-2.8.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-2.8.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99ae15ff9f4359ad0ee48e9afd9dfc0aec365e51d67a6bcd074c375334e48275
MD5 21c36cdd532f8c3fb6ad2327e5ce77f6
BLAKE2b-256 4ccd7811293afe6a894af8eb98d4e6d34dded384a9d6396b685f4eea1c709abf

See more details on using hashes here.

Provenance

The following attestation bundles were made for subnoto_api_client-2.8.0-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: .gitlab-ci.yml on subnoto/subnoto-monorepo-public

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