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

Or with Bazel:

# In your BUILD file
load("@pypi//:requirements.bzl", "requirement")

py_binary(
    name = "my_app",
    srcs = ["main.py"],
    deps = [
        "//libs/api-client-py:api_client_py",
    ],
)

Usage

Basic Example

import asyncio
from subnoto_api_client import SubnotoClient, SubnotoConfig

async def main():
    # Create client with configuration
    config = SubnotoConfig(
        api_base_url="https://enclave.subnoto.com",
        access_key="your-access-key",
        secret_key="your-secret-key-hex",
        unattested=True  # Set to False for production with attestation
    )

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

        # Get current user info
        response = await client.post("/public/utils/whoami", json={})
        user_info = response.json()
        print(f"User: {user_info}")

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

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 (required if attested)

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 Distribution

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

File details

Details for the file subnoto_api_client-1.0.4-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for subnoto_api_client-1.0.4-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e828614e9d61ba97925f1fd5fada8afe7ab4d560efb2e3093ca03c5b445d3e04
MD5 37ac2ed8a7e786b899530517655e412d
BLAKE2b-256 791d61766317c1f886a674ed61a821d6c6fadcb78e529f92c6a18b6ca575046a

See more details on using hashes here.

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