Skip to main content

Python client for the ditto ephemeral database copy service

Project description

ditto Python SDK

Python client for provisioning ephemeral database copies from a running ditto server.

Install

pip install "ditto-sdk[pytest]"

Usage

from ditto import Client

client = Client(
    server_url="http://ditto.internal:8080",
    token="secret",
    ttl_seconds=600,
)

copy = client.create()
print(copy["connection_string"])
client.destroy(copy["id"])

Use the context manager for automatic cleanup:

from ditto import Client

client = Client(server_url="http://ditto.internal:8080")

with client.with_copy() as dsn:
    print(dsn)

Environment variables

Client reads these variables by default:

  • DITTO_SERVER_URL
  • DITTO_TOKEN
  • DITTO_TTL

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

ditto_sdk-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

ditto_sdk-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file ditto_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ditto_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ditto_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0f58eac15f63e3ae568842d07e41dd6b39a9ee1d2855de6a0e03a891b45f75b
MD5 b5078c94f0c9fc00d4a28ef81bd56236
BLAKE2b-256 6ef99de7013c5b53353472de7a0ba23eee5d5942cfb137c7b7deaa7758f307ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for ditto_sdk-0.1.0.tar.gz:

Publisher: release-python-sdk.yml on attaradev/ditto

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

File details

Details for the file ditto_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ditto_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ditto_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c184c99e4024cebf0f7264d2f55520bc2d8f2480a69af7c4e7e9803f80d281be
MD5 6f092a7c40d77d3cb88221cd1b5da957
BLAKE2b-256 0f1eda1f72fcc302036410c5036a888cc2d522ae1137a67b2db27496686e1a68

See more details on using hashes here.

Provenance

The following attestation bundles were made for ditto_sdk-0.1.0-py3-none-any.whl:

Publisher: release-python-sdk.yml on attaradev/ditto

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