Universal Commerce Protocol (UCP) Utilities
Project description
Universal Commerce Protocol
This is a python SDK for Universal Commerce Protocol, an open-source protocol for agentic commerce. It is a specification for how agents can communicate with each other to perform commerce-related tasks.
Protocol Validator & CLI Tool
UCP includes a validation utility to check UCP data structures (Profile, CompleteCheckoutRequest, CompleteCheckoutResponse) syntactically and semantically.
Programmatic Usage
You can use the validator in your Python code:
from ucp import UcpValidator
# Validate a Profile dictionary
result = UcpValidator.validate_profile(profile_data)
if result.is_valid:
print("Valid Profile!")
else:
for error in result.errors:
print(f"Error at {error.path}: {error.message}")
CLI Usage
A command-line tool is available to check and validate UCP profiles hosted at standard well-known URLs or local files.
First, ensure you have the required dependencies installed:
pip install grpcio-tools protobuf requests
Then run the tool:
# Validate a remote domain (fetches from https://<domain>/.well-known/ucp)
python3 -m ucp.cli example.com
# Validate a specific URL
python3 -m ucp.cli https://example.com/custom/path/ucp.json
# Validate a local profile file
python3 -m ucp.cli -f path/to/profile.json
# Bypass SSL verification (useful for self-signed local certs)
python3 -m ucp.cli -k localhost:8000
Roadmap
- Add Protobuffs for representing UCP data objects.
- Generation of sample agent discovery files.
- Sample application.
- Tests
Make suggestions
Please send pull requests proposing features.
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 ucp_py-0.1.0.tar.gz.
File metadata
- Download URL: ucp_py-0.1.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ca445100cf3fad7f9c5040cab2c6e547b42c8d90a9d4d76f9db729cdda66c14
|
|
| MD5 |
2fbd0b3f4a0fc243196642b45ed7090a
|
|
| BLAKE2b-256 |
dc5b91c1b0e12b3943a92212c0641abf5c3a6250fd9fa542b5f7b8e5940f1c14
|
File details
Details for the file ucp_py-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ucp_py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50bd512b169cd9caa5dccb44c623cdbb815e3b4c7ac48966962abc40ed603b37
|
|
| MD5 |
466b32b7478be63fae92c3115503e201
|
|
| BLAKE2b-256 |
6258197e8f9ccd5821e802e16ae08194a0389aad1953427284941f6e0e9f75c7
|