Generate UCP-compliant servers for merchants from a simple schema
Project description
ucpify (Python)
Generate UCP-compliant (Universal Commerce Protocol) servers for merchants from a simple schema.
Installation
pip install -e .
Quick Start
# Initialize a sample merchant config
ucpify init
# Edit merchant-config.json to add your products, shipping, payments
# Start the UCP server
ucpify serve merchant-config.json
CLI Commands
# Create sample configuration
ucpify init --output my-store.json
# Validate configuration
ucpify validate my-store.json
# Start server
ucpify serve my-store.json --port 8080
Programmatic Usage
from ucpify import create_flask_app, MerchantConfig, Item, ShippingOption
config = MerchantConfig(
name="My Store",
domain="http://localhost:3000",
currency="USD",
items=[
Item(id="prod_1", title="Widget", price=1999)
],
shipping_options=[
ShippingOption(id="standard", title="Standard", price=500)
]
)
app = create_flask_app(config)
app.run(port=3000)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ucpify-1.1.0.tar.gz
(16.4 kB
view details)
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
ucpify-1.1.0-py3-none-any.whl
(20.2 kB
view details)
File details
Details for the file ucpify-1.1.0.tar.gz.
File metadata
- Download URL: ucpify-1.1.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e82cb6d037c6f018cc7683f1a98803736a7eea0f5357d6fe14bee0b3f25bbb09
|
|
| MD5 |
2716147313d7351a0df37063541fde59
|
|
| BLAKE2b-256 |
7a1cf495f75ac22352d050f15fd65cbf797897dd25d29b8e21332a005b08b063
|
File details
Details for the file ucpify-1.1.0-py3-none-any.whl.
File metadata
- Download URL: ucpify-1.1.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a5bb7031c09d57c1192339742a3d4fb6be115c8f89f88218784142116e77a2
|
|
| MD5 |
4d2c8d9e9e50a044567b029418229f34
|
|
| BLAKE2b-256 |
08e646cacfead298ab231b883d1ff5da53bbe76b08390ad8fe971c1230e3629f
|