Official Python library for the Universal Commerce Protocol (UCP).
This repository contains the Python SDK for the Universal Commerce Protocol (UCP). It provides Pydantic models for UCP schemas, making it easy to build UCP-compliant applications in Python.
For now, you can install the SDK using the following commands:
# Clone the repository
git clone https://github.com/Universal-Commerce-Protocol/python-sdk.git
# Navigate to the directory
cd python-sdk
# Install dependencies
uv syncThis project uses uv for dependency management.
The models are automatically generated from the JSON schemas in the UCP Specification.
To regenerate the models:
uv sync
./generate_models.sh <version>Where <version> is the version of the UCP specification to use (for example,
"2026-01-23").
If no version is specified, the main branch of the
UCP repo will be used.
The generated code is automatically formatted using ruff.
We welcome community contributions. See our Contribution Guide for details.
UCP is an open-source project under the Apache License 2.0.