ditto Python SDK
Python client for provisioning ephemeral database copies from a running ditto host.
Install
pip install "ditto-sdk[pytest]"
For development from a repository checkout:
pip install -e "./sdk/python[pytest]"
Usage
import os
from ditto import Client
client = Client(
server_url="http://ditto.internal:8080",
token=os.environ["DITTO_TOKEN"],
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_URLDITTO_TOKEN(typically a bearer JWT in shared-host mode)DITTO_TTL
Metadata
Release files for ditto-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ditto_sdk-0.2.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ditto_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / ditto_sdk-0.2.0.tar.gz
| Download URL | ditto_sdk-0.2.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d49a4acfeec1c1f2da5505d9b6ad552dcc9da511b16bedf3a350983b544bbcfe
|
|
BLAKE2b-256 checksum How to use checksums |
cc145c2c5255325ab77d32228d8b19782f06a4a15e6db7eb29fe6b115299193a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.
Transparency logRelease files / ditto_sdk-0.2.0-py3-none-any.whl
| Download URL | ditto_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1be5ec6c0d0d8c4b58ad624fdab966d5aebb0425edb47a36039dc262e01666ea
|
|
BLAKE2b-256 checksum How to use checksums |
7c0aac0b2f47bcfed654a417c95d8131cf3eb301b5e2e742a0cc1eb39e0802af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.
Transparency log