simple_module_core
Module-system primitives for the simple_module framework — a modular-monolith for Python/FastAPI where each feature is a plugin package discovered at boot.
This package defines ModuleBase, the ModuleMeta descriptor, the discover_modules() entry-point loader, topological dependency sorting, event bus primitives, and the diagnostic codes (SM001–SM025) used by make doctor.
Install
pip install simple_module_core
You usually don't install this directly — it's pulled in by simple_module_hosting and every simple_module_* module.
What it provides
ModuleBase— the subclass every module extends to opt into lifecycle hooks.ModuleMeta— requiredmeta = ModuleMeta(name=..., depends_on=...)attribute on each module.discover_modules()— loads all[project.entry-points.simple_module]modules, topologically sorts bydepends_on.- Diagnostic registry —
SM001missing meta,SM003orphan page,SM008duplicate name,SM009framework→plugin coupling violation, and the rest of theSM0xxset throughSM025. - Tenant-role vocabulary (
simple_module_core.tenancy) —TenantRole,TENANT_ROLE_PREFIX,tenant_role(), so any module can maptenant:<role>onto its permissions without depending ontenants. - Tiny event-bus (
pyee) for decoupled module-to-module communication.
Usage
# modules/orders/orders/module.py
from simple_module_core import ModuleBase, ModuleMeta
class OrdersModule(ModuleBase):
meta = ModuleMeta(name="orders", depends_on=["users"])
def register_routes(self, api_router, view_router):
from .endpoints import api, views
api_router.include_router(api.router)
view_router.include_router(views.router)
And in pyproject.toml:
[project.entry-points.simple_module]
orders = "orders.module:OrdersModule"
The host's discover_modules() call picks this up automatically at boot.
Depends on
fastapi,pydantic,pydantic-settings,pyee,babel,packaging
License
MIT — see LICENSE.
Metadata
Release files for simple-module-core 0.0.36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| simple_module_core-0.0.36.tar.gz | 109.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_module_core-0.0.36-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 201.3 kB
Release files / simple_module_core-0.0.36.tar.gz
| Download URL | simple_module_core-0.0.36.tar.gz |
|---|---|
| Size | 109.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd61c229faf0ff66ded274ff604472ec60d3404d5e909ef1ba67e7fb2d7d4fe5
|
|
BLAKE2b-256 checksum How to use checksums |
ec496c53855814522b38f7d5853225a6cb0f40bc64a20726e417c4c1bc0a7528
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / simple_module_core-0.0.36-py3-none-any.whl
| Download URL | simple_module_core-0.0.36-py3-none-any.whl |
|---|---|
| Size | 92.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e9ea8a4aeb15de39c56c70864f1b07ca983bf3f9e9d52b3a1e7358db241b9e9
|
|
BLAKE2b-256 checksum How to use checksums |
d16ba05316596287b013f1525a4a8804291fd566565490808fd0eeeb0cab7616
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logSecurity for simple-module-core 0.0.36
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for simple_module_core-0.0.36.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.