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 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
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ditto_sdk-0.2.0.tar.gz.
File metadata
- Download URL: ditto_sdk-0.2.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d49a4acfeec1c1f2da5505d9b6ad552dcc9da511b16bedf3a350983b544bbcfe
|
|
| MD5 |
f012df99de6dd8befdab9f1981d857c2
|
|
| BLAKE2b-256 |
cc145c2c5255325ab77d32228d8b19782f06a4a15e6db7eb29fe6b115299193a
|
Provenance
The following attestation bundles were made for ditto_sdk-0.2.0.tar.gz:
Publisher:
release-python-sdk.yml on attaradev/ditto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ditto_sdk-0.2.0.tar.gz -
Subject digest:
d49a4acfeec1c1f2da5505d9b6ad552dcc9da511b16bedf3a350983b544bbcfe - Sigstore transparency entry: 1357094921
- Sigstore integration time:
-
Permalink:
attaradev/ditto@743577b0c6aaa6458ba9c0dedc63c1ddb067e57a -
Branch / Tag:
refs/tags/sdk-python-v0.2.0 - Owner: https://github.com/attaradev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python-sdk.yml@743577b0c6aaa6458ba9c0dedc63c1ddb067e57a -
Trigger Event:
push
-
Statement type:
File details
Details for the file ditto_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ditto_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1be5ec6c0d0d8c4b58ad624fdab966d5aebb0425edb47a36039dc262e01666ea
|
|
| MD5 |
aef35073b84e1d132cd291a2a30d13ae
|
|
| BLAKE2b-256 |
7c0aac0b2f47bcfed654a417c95d8131cf3eb301b5e2e742a0cc1eb39e0802af
|
Provenance
The following attestation bundles were made for ditto_sdk-0.2.0-py3-none-any.whl:
Publisher:
release-python-sdk.yml on attaradev/ditto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ditto_sdk-0.2.0-py3-none-any.whl -
Subject digest:
1be5ec6c0d0d8c4b58ad624fdab966d5aebb0425edb47a36039dc262e01666ea - Sigstore transparency entry: 1357095018
- Sigstore integration time:
-
Permalink:
attaradev/ditto@743577b0c6aaa6458ba9c0dedc63c1ddb067e57a -
Branch / Tag:
refs/tags/sdk-python-v0.2.0 - Owner: https://github.com/attaradev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python-sdk.yml@743577b0c6aaa6458ba9c0dedc63c1ddb067e57a -
Trigger Event:
push
-
Statement type: