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
ProductSQLModel table withname,sku,price_cents,AuditMixin.- Contracts (
ProductCreate,ProductUpdate,ProductRead) underproducts.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— theModuleBasesubclass.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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81b39f9434d8fb3618f38834a5f2794a388186d1e27af83f588aae0efc9874ef
|
|
| MD5 |
39973fa0b3e6942899d3eba7138b2b3d
|
|
| BLAKE2b-256 |
171f50f484559e27ef7bdfec82c667e9d903ab77d4cc60f7ab9cc38b371be590
|
Provenance
The following attestation bundles were made for simple_module_products-0.0.1.tar.gz:
Publisher:
release.yml on antosubash/simple_module_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_module_products-0.0.1.tar.gz -
Subject digest:
81b39f9434d8fb3618f38834a5f2794a388186d1e27af83f588aae0efc9874ef - Sigstore transparency entry: 1358405085
- Sigstore integration time:
-
Permalink:
antosubash/simple_module_python@b4009cc872e81d3348b928230d13383d6b0fdd34 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/antosubash
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b4009cc872e81d3348b928230d13383d6b0fdd34 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file simple_module_products-0.0.1-py3-none-any.whl.
File metadata
- Download URL: simple_module_products-0.0.1-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e75c101be1720a1e72834c94c91b58d1a5e741697bee7f886947c90fde11cd8f
|
|
| MD5 |
23e483f1b2bea2964d6c4da2278eb876
|
|
| BLAKE2b-256 |
ecc61096b486d6539bebc73ca9486d2a68347eb66acfe434ac014c0f3938e30a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_module_products-0.0.1-py3-none-any.whl -
Subject digest:
e75c101be1720a1e72834c94c91b58d1a5e741697bee7f886947c90fde11cd8f - Sigstore transparency entry: 1358405090
- Sigstore integration time:
-
Permalink:
antosubash/simple_module_python@b4009cc872e81d3348b928230d13383d6b0fdd34 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/antosubash
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b4009cc872e81d3348b928230d13383d6b0fdd34 -
Trigger Event:
workflow_dispatch
-
Statement type: