Skip to main content

Python client SDK for the Dashtro CMS API

Project description

dashtro-client

Python client SDK for the Dashtro CMS API — scoped, API-key-authenticated access to a project's documents and realtime database from external apps (/api/sdk/* on your Dashtro instance).

Install

pip install dashtro-client

Usage

from dashtro_client import DashtroClient

client = DashtroClient(
    base_url="https://admin.example.com",
    project_id="<project-id>",
    api_key="<api-key>",
    workspace="production",  # optional, defaults to "production"
    cache_ttl=60,            # optional, seconds, defaults to 60
)

post = client.get_document("blog-posts", "<document-id>")
all_posts = client.get_all_documents("blog-posts")

# Realtime database
client.rtdb.set("/counters/views", 1)

client.close()  # or: with DashtroClient(...) as client: ...

An AsyncDashtroClient/AsyncRtdbClient pair with the same API (awaited, aclose() instead of close()) is available for asyncio code.

API keys are issued and scoped (per collection, read/write) from your Dashtro instance's settings page.

License

ISC

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

dashtro_client-0.2.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

dashtro_client-0.2.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file dashtro_client-0.2.1.tar.gz.

File metadata

  • Download URL: dashtro_client-0.2.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for dashtro_client-0.2.1.tar.gz
Algorithm Hash digest
SHA256 95877f3017d3944f811de5b69a7fcbb2c2c4f690b744856ec09feb5af5ea402e
MD5 38df125cebbfe4bc1c2f0f969f17146c
BLAKE2b-256 d0cba23f5802b8d80e54bbd65f7815d2ddc2491f68a3d7c2fe66e7bfa9e540b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dashtro_client-0.2.1.tar.gz:

Publisher: build-image.yml on 1atharvad/dashtro

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

File details

Details for the file dashtro_client-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dashtro_client-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for dashtro_client-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef156a284093ffe08aac3a006585a3ffbb7449b3c830385e9afcc9dc2a956a02
MD5 ab6b86a531ff3c589acf37b0733b6759
BLAKE2b-256 0894cde9fd6cf0a2e01e1b97053ff71c4a6766868df51c4d333abc69d8779e1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dashtro_client-0.2.1-py3-none-any.whl:

Publisher: build-image.yml on 1atharvad/dashtro

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