Skip to main content

Python client for StatelyDB API

Project description

StatelyDB SDK for Python

This is the Python SDK for StatelyDB.

Getting started:

Disclaimer:

We're still in an invite-only preview mode - if you're interested, please reach out to preview@stately.cloud.

When you join the preview program, we'll set you up with a few bits of information:

  1. STATELY_CLIENT_ID - a client identifier so we know what client you are.
  2. STATELY_CLIENT_SECRET - a sensitive secret that lets your applications authenticate with the API.
  3. A store ID that identifies which store in your organization you're using.
  4. Access to our in-depth Getting Started Guide.

Begin by following our Getting Started Guide which will help you define, generate, and publish a DB schema so that it can be used.

Install the SDK
pip install statelydb

Usage:

Create an authenticated client, then import your item types from your generated schema module and use the client!

from schema import Client, MyItem
async def put_my_item() -> None:
    # Create a client. This will use the environment variables
    # STATELY_CLIENT_ID and STATELY_CLIENT_SECRET for your client.
    client = Client(store_id=<store-id>)

    # Instantiate an item from your schema
    item = MyItem(name="Jane Doe")

    # put and get the item!
    put_result = await client.put(item)
    get_result = await client.get(MyItem, put_result.key_path())
    assert put_result == get_result

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statelydb-0.12.0.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

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

statelydb-0.12.0-py3-none-any.whl (64.2 kB view details)

Uploaded Python 3

File details

Details for the file statelydb-0.12.0.tar.gz.

File metadata

  • Download URL: statelydb-0.12.0.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for statelydb-0.12.0.tar.gz
Algorithm Hash digest
SHA256 2ff67081307f0c7c6942a6699cbdccdf6c6e0dd1de4d66ee4ab40410192398e7
MD5 d6a8e1d1670bd1386642043c083bd4bd
BLAKE2b-256 f08e4b43d50906c8e5d214af95fb8cbba0014f9cba558ce9fd14097cada5b65d

See more details on using hashes here.

Provenance

The following attestation bundles were made for statelydb-0.12.0.tar.gz:

Publisher: publish-python-sdk.yaml on StatelyCloud/stately

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file statelydb-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: statelydb-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 64.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for statelydb-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 478a809aebd75b7c603a5a93cfa810c33b4ebb4b56893984315f9c86d14048dc
MD5 815e94588f7dfdcc084011b32e1dfc04
BLAKE2b-256 b277773b70b17c063f9aafc5f7d69ef036f0686db9e43b7235ea7d191f825acf

See more details on using hashes here.

Provenance

The following attestation bundles were made for statelydb-0.12.0-py3-none-any.whl:

Publisher: publish-python-sdk.yaml on StatelyCloud/stately

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