The Python SDK is currently in Public Preview. If you encounter any issues or need assistance, please contact Ditto Support.
Prerequisites
Ditto’s Python Quickstart supports Linux and macOS only. Before getting started, ensure you have the following:- Git installed on your machine
- Python 3.10 or later installed on your machine (3.10–3.13 are supported)
- A Ditto Portal account with a configured Ditto Database
pip and a
virtual environment.
Get Started
1. Clone the Repository
The project directory contains quickstart applications for all SDKs supported by Ditto including Python.2. Configure Ditto
Get your connection details
In the Ditto Portal, select your database and select the Connect via SDK tab. Then copy the following values:- Database ID
- Development Token
- URL
Add Ditto Credentials
- Copy the
.env.samplefile in thequickstartdirectory to.env. - Update the
.envfile with the Database ID, Development Token, and URL from the Ditto Portal.
3. Run the Application
Run one of the following commands. Theuv and pip commands start from the
python-tui directory; run the just command from the quickstart directory.
Press Enter (or type
list) to refresh and pick up changes made by other peers.
4. Sync-Data Offline
Optional: Run a Local Smoke Test
To check that the SDK is installed and working without using any credentials or network access, run the quickstart’s self-test. Theuv and pip commands
start from the python-tui directory; run the just command from the
quickstart directory.