The Python SDK is currently in Public Preview. If you encounter any issues or need assistance, please contact Ditto Support.
dittolive-ditto and imported as
ditto. It is an asyncio-native binding for Ditto’s v5 API.
Prerequisites
- Python 3.10 – 3.13 (see Compatibility)
- Linux (glibc 2.35 or later) on x86-64 or ARM64, or macOS 12 or later on Apple Silicon
- A Ditto Portal account with a configured Ditto Database
Install the Python SDK
1
Create a project environment
We recommend uv, which installs and pins the
Python interpreter along with your dependencies. The SDK is currently published
as a preview (pre-release), so each command below enables pre-release installs.
2
Verify the installation
libdittoffi library, and prints the
SDK version.ditto package:
Python
Native Library Setup
Unlike some other Ditto SDKs, you do not need to download the native library separately. Each prebuilt wheel bundleslibdittoffi inside the package, and
the SDK loads it automatically.
Wheels are published for the following platforms:
Use a Custom Native Library
For normal installations, no configuration is needed. The Ditto Python SDK loads the native library included in its installed wheel. If you are developing against a customlibdittoffi build, set
DITTOFFI_LIB_PATH to the library file or the directory that contains it:
DITTOFFI_LIB_PATH, if set.- The native library bundled with the installed
dittolive-dittopackage. - Directories in
DITTOFFI_SEARCH_PATH. - A compatible build in a Ditto source checkout.
- The operating system’s standard library locations.
DITTOFFI_LIB_PATH when you intentionally want to test or develop against
a specific native-library build. Otherwise, leave these variables unset so the
SDK uses the bundled library.
To require the bundled library and exclude all custom-library fallbacks, set: