Skip to main content

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 ucp_server 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.0.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ucpify-1.0.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file ucpify-1.0.0.tar.gz.

File metadata

  • Download URL: ucpify-1.0.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ucpify-1.0.0.tar.gz
Algorithm Hash digest
SHA256 17a3f10a1585433bbf027fe0efb8ea40d487fbef4deb01bae2aa76132c4ec1b2
MD5 d195db650929552cec06754dbd5cd423
BLAKE2b-256 a9caf4994a718c40dd98a4a1a8a7539bcdd681d744891fc03b11ada3e30c8d08

See more details on using hashes here.

File details

Details for the file ucpify-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ucpify-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ucpify-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d4b7c4ec01e7f200e893488353f45ff79cf92e04e66b0b39f41ab6c0a967504
MD5 96a0aeb796d86e4b5952d24c37d55c97
BLAKE2b-256 7653a4d8a352bacec465183feb2c2187592eeee273f64c3b107bf36511ccdb3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page