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

This version

2.9.6

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

File metadata

File hashes

Hashes for subnoto_api_client-2.9.6-cp311-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7aa03be7c2f07c6f7becf8476fb558cc8125e9a0c0b79df4f622829532c3ad0c
MD5 a19cdf1652f1ca0a9d68e9727ce129b9
BLAKE2b-256 ca27abcbb9b7df8cb35aa4a1992be74465220570c67d945c29a40411374e2db5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subnoto_api_client-2.9.6-cp311-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f6992fc8f1739b5c1c1f4b32da4a37258f0908d089eeb674b0fbd1d7ff5ecca6
MD5 1c0f7afd4a41812fcfa053e6c1b4dfa1
BLAKE2b-256 af6a5b7c77f5f7ab922fd7f122ae887e75d8f5fffe929f4ed32ae84abad55edc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for subnoto_api_client-2.9.6-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 940b32a356456071bb8281f133cb354ad50e9cc90c672a328cd84ef255fb14d5
MD5 bafba77449cf80936401606b062c29a8
BLAKE2b-256 242cd2ef2395ad37848cec565e5027e4447dcd2914f9ee38ae590e38b6fc8431

See more details on using hashes here.

Provenance

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