Skip to main content

Example CRUD module used as a reference / demo for building simple_module modules

Project description

simple_module_products

Example CRUD module for simple_module. This is a reference / demo, not a production-ready commerce module — it exists to show what a fully-featured simple_module module looks like end-to-end: ModuleBase, SQLModel table with AuditMixin, contracts, service, REST + Inertia endpoints, Browse/Create/Edit pages, tests.

Fresh simple-module new scaffolds don't include this by default — it's here as a readable example.

Install

pip install simple_module_products

What it provides

  • Product SQLModel table with name, sku, price_cents, AuditMixin.
  • Contracts (ProductCreate, ProductUpdate, ProductRead) under products.contracts.
  • Service layer (ProductsService) encapsulating the (tiny) business logic.
  • REST endpoints at /api/products + Inertia view endpoints at /products.
  • Inertia pages Products/Browse, Products/Create, Products/Edit.
  • Unit tests covering the service + integration tests hitting the full endpoint stack.

Usage

It's a reference, so the most useful "usage" is reading the source:

  • modules/products/products/module.py — the ModuleBase subclass.
  • modules/products/products/service.py — business logic.
  • modules/products/products/pages/ — Inertia React pages.
  • modules/products/tests/ — the test patterns to copy into new modules.

If you do want a working /products in your own app:

uv add simple_module_products
# Alembic will now see the products schema at the next `alembic revision --autogenerate`.

Depends on

  • simple_module_core, simple_module_db, simple_module_hosting

License

MIT — see LICENSE.

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

simple_module_products-0.0.1.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

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

simple_module_products-0.0.1-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file simple_module_products-0.0.1.tar.gz.

File metadata

  • Download URL: simple_module_products-0.0.1.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simple_module_products-0.0.1.tar.gz
Algorithm Hash digest
SHA256 81b39f9434d8fb3618f38834a5f2794a388186d1e27af83f588aae0efc9874ef
MD5 39973fa0b3e6942899d3eba7138b2b3d
BLAKE2b-256 171f50f484559e27ef7bdfec82c667e9d903ab77d4cc60f7ab9cc38b371be590

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_module_products-0.0.1.tar.gz:

Publisher: release.yml on antosubash/simple_module_python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simple_module_products-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_module_products-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e75c101be1720a1e72834c94c91b58d1a5e741697bee7f886947c90fde11cd8f
MD5 23e483f1b2bea2964d6c4da2278eb876
BLAKE2b-256 ecc61096b486d6539bebc73ca9486d2a68347eb66acfe434ac014c0f3938e30a

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_module_products-0.0.1-py3-none-any.whl:

Publisher: release.yml on antosubash/simple_module_python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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