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.2

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.2-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.2-cp311-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-2.9.2-cp311-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a464fbdee29625ec6a4fc6655e9f1e8e1da1cc409446b9eab7a586efa7a6cd8e
MD5 b2e72651cd30e608c0a5e2d58526305d
BLAKE2b-256 5d6008f20c365dbc1183b397dd0b5e6c741ebed413d451b899f66b4d9f536b21

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subnoto_api_client-2.9.2-cp311-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f507e284c6a0cb27103d38e6f8c2acce001e445e547bbdbc7c40b72cf359be50
MD5 de0ed3ea84c93b29d14d996c8f86fe5a
BLAKE2b-256 e634043971c5a4405a81088c32b6bba16a74b171eb8dce3540741d3c44bde7f2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subnoto_api_client-2.9.2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92a1c15717a394e2d511fe41b5aed09285184f47723973646a6a0e9ab38b6656
MD5 e42a10fe650832f98345e9b7b0ab3e2f
BLAKE2b-256 da9de6148d6fe97fa26139b6c2d53af31ea5367d80af09d5e96bb48489983786

See more details on using hashes here.

Provenance

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