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.

Set your credentials as environment variables:

export SUBNOTO_ACCESS_KEY="your-access-key"
export SUBNOTO_SECRET_KEY="your-secret-key-hex"

Async Example

import asyncio
from subnoto_api_client import SubnotoClient, SubnotoConfig

async def main():
    async with SubnotoClient(SubnotoConfig()) 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

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

Configuration

Option Type Required Description
access_key str No API access key (default: SUBNOTO_ACCESS_KEY env var)
secret_key str No API secret key, hex-encoded (default: SUBNOTO_SECRET_KEY env var)
api_base_url str No API base URL (default: https://enclave.subnoto.com)
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

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.9.9-cp311-abi3-manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11+

subnoto_api_client-2.9.9-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.9.9-cp311-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-2.9.9-cp311-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9361b245f9c3564aa0e6bb5981fcb962ac206a026f0746cb1e68cb0c555d1482
MD5 a75ef9e7b485f37cc28fec3cf9c005c9
BLAKE2b-256 b3629402e454341e37b3bc009e9d743064be90d0a67721127b7e2dd81e5d7cfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for subnoto_api_client-2.9.9-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.9.9-cp311-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-2.9.9-cp311-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 664cc0a990ece1541a0e7ea010ebcc37da81ce34c10d90e5c20474b71b55d804
MD5 c7ea937cfdd3b1262263e3b94b47dbc0
BLAKE2b-256 6ca6524f05580f30c8912a7cc9ffff830a366915ed8f72e543ba22485fbaf5c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for subnoto_api_client-2.9.9-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.9.9-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-2.9.9-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fbb950efed176c6fc22bf8c3da38c4ab9d8c28df01c31f418355c21f47c29f15
MD5 580ae3074f99657eef47e14c35f371d9
BLAKE2b-256 cb323c661d72f2381e1295f43aaed102f98767f6a5a0203aedfd4a5e7660f58b

See more details on using hashes here.

Provenance

The following attestation bundles were made for subnoto_api_client-2.9.9-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