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_API_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_API_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

This version

2.9.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.9.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.9.0-cp311-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-2.9.0-cp311-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 05242314cde87ba87b1e1f27581ad1b3f7c77be086d16df15d12126e9f6d605a
MD5 34307fafa3e48a9e5a4ee223d307adc1
BLAKE2b-256 079fb9c298f6246c694bb4fe6aa487ed608046df8c9afc97467cb29561786c71

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subnoto_api_client-2.9.0-cp311-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 63f61c5296e388bec5308d43cdb31f24f31f14825375111c83a382e63d00c293
MD5 3038b65899a1488c408b170d871dd0a4
BLAKE2b-256 87649526eba8532f12921739aecf3d48df29ad45c595debc0c7f3950aaef21b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subnoto_api_client-2.9.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f0671bc6f2638f29ef502dcd9d7c2952d01986a469f2029dbbe9fc501f362fba
MD5 3a8036de2799537a075001ea7fe08f60
BLAKE2b-256 b63493a90e868e306f8e6123c188ee47e9562bdaa45ac5decceba8fd3319992b

See more details on using hashes here.

Provenance

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