Skip to main content

mycommerce-platform

mycommerce-platform is the small, dependency-free Python client for the MyCommerce Cloudflare Worker gateway. It gives Python applications one stable base URL while the gateway routes requests to the Shop API, Cart API, and Go Purchase service.

Install

pip install mycommerce-platform

Usage

from mycommerce import MyCommerceClient

client = MyCommerceClient(
    "https://mycommerce-api-gateway.<your-subdomain>.workers.dev",
    token="optional-jwt-token",
)

print(client.health())
products = client.shop("api/v1/shop/")
cart = client.cart("cart/v1/")
payment = client.purchase("create", method="POST", payload={"sessionId": "session-123"})

The package only uses Python's standard library. It does not contain Stripe, database, Django, or Cloudflare credentials. Authentication is supplied through the optional bearer token and service authorization remains a gateway/backend responsibility.

Development

cd packages/mycommerce-platform
python -m venv .venv
. .venv/bin/activate
python -m pip install -U pip pytest
pytest
python -m build

The package is published from GitHub Actions when a mycommerce-platform-v* tag is pushed. Configure a PyPI Trusted Publisher for this GitHub repository before creating the first release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mycommerce_platform-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

mycommerce_platform-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file mycommerce_platform-0.1.0.tar.gz.

File metadata

  • Download URL: mycommerce_platform-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mycommerce_platform-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5e3f1d7ce52cde36e1f7e0e54acf94f299bf7a691650b74cdd75483f46d9a3ba
MD5 29498c31c1a10d6fd6297789ed04b56b
BLAKE2b-256 bc59c02ce6d5d73076c68c58acbfe3d3829c7c42c08892cd4235a9f916979767

See more details on using hashes here.

File details

Details for the file mycommerce_platform-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mycommerce_platform-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a200d03b86163272d70520eb57b3f95c21b7d2c4ce388bd08dcf6fd38ffb499
MD5 e71d38637bda231aa50b2ab25191682a
BLAKE2b-256 5f1a305bc5081f5bde3b1052c2fe77809b84b603a07a767a6602ed64763adff2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page