Official Python SDK for the UCP Registry API — discover UCP merchants, search products, and manage registry entities.
Project description
ucpregistry
Official Python SDK for the UCP Registry API. Discover UCP-enabled merchants, search products across stores, and manage registry entities.
Install
pip install ucpregistry
Quick Start
from ucpregistry import UCPRegistry
registry = UCPRegistry()
# Discover merchants
merchants = registry.discover(platform="shopify")
for m in merchants:
print(m.domain, m.ucp_score, m.capabilities.checkout)
# Get a specific merchant
merchant = registry.get_merchant("allbirds.com")
print(merchant.transports) # ['mcp', 'embedded']
# Search products across all merchants
products = registry.search_products(query="running shoes", sort="price_asc")
for p in products:
print(f"{p.title} - ${p.price} at {p.merchant}")
Authentication
Free tier endpoints (discover, search) work without authentication. For push API and entity management, pass your API token:
registry = UCPRegistry(api_key="ucpr_...")
Get your token at ucpregistry.com/tokens.
API
discover(**kwargs)
Find UCP-enabled merchants.
merchants = registry.discover(
search="skincare",
platform="shopify",
category="Health & Beauty",
sort="ucp_score",
limit=20,
)
get_merchant(domain)
Get full details for a merchant.
m = registry.get_merchant("imageskincare.com")
print(m.capabilities.checkout)
print(m.sample_products)
search_products(**kwargs)
Search products across all merchants.
products = registry.search_products(
query="serum",
min_price=20,
max_price=100,
sort="price_asc",
)
push(entity_type, slug, manifest, commit_message=None)
Push a manifest version (requires token).
version = registry.push(
"merchants", "mystore.com",
manifest={"version": "1.0", "capabilities": ["checkout"]},
commit_message="Initial push",
)
print(version.version) # '1.0.0'
versions(entity_type, slug)
List version history.
diff(entity_type, slug, v1, v2)
Diff two versions.
Context Manager
with UCPRegistry(api_key="ucpr_...") as registry:
merchants = registry.discover()
MCP Server
UCP Registry is also available as an MCP server:
{
"mcpServers": {
"ucpregistry": {
"url": "https://ucpregistry.com/mcp"
}
}
}
License
MIT
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 ucpregistry-0.1.0.tar.gz.
File metadata
- Download URL: ucpregistry-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44397113cd7d66b1c62384d40f35e8f2e701671d0836cc64c4f9704471a4ba32
|
|
| MD5 |
29b76e6767a47994318fc4f4ffef1285
|
|
| BLAKE2b-256 |
7bcbe31660dcc401f3c6cd58b6794a3316f1bdd68165365c88aaa76306c160f5
|
File details
Details for the file ucpregistry-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ucpregistry-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8ad0e6e337481891915f85855d98e2e53044a2d8e22909ae1cc64f5fb2327ed
|
|
| MD5 |
3a7b60f246449d36b36a7eb59a163b9e
|
|
| BLAKE2b-256 |
8bc31631d41b7b1fb0aad32ba60662b717f756aa1a29a3aa5da808e2c12fdf51
|