simple-module-hosting 0.0.11__tar.gz → 0.0.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/PKG-INFO +8 -8
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/README.md +5 -5
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/pyproject.toml +3 -3
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/__main__.py +1 -1
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/_inertia_setup.py +1 -1
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/host_cli.py +1 -1
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/manifest.py +4 -4
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/.gitignore +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/LICENSE +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/__init__.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/_error_handlers.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/_host_services.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/_hydrate_step.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/_inertia_shared.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/_observability.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/_phase_helpers.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/app_builder.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/bootstrap_settings.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/health.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/host_settings.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/i18n_deps.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/i18n_manifest.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/i18n_middleware.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/inertia_deps.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/inertia_utils.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/logging.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/middleware.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/migrations.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/permissions.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/py.typed +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/redirects.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/settings.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_app.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_health.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_host_cli.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_hosting_permissions.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_i18n_manifest.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_inertia_i18n_shared_props.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_locale_middleware.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_logging.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_manifest.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_settings_i18n.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_settings_secrets.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_tenant_middleware.py +0 -0
- {simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_translator_dep.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simple_module_hosting
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
4
4
|
Summary: FastAPI + Inertia.js host runtime for simple_module — app_builder, middleware stack, CLI (sm / simple-module), scaffolding
|
|
5
5
|
Project-URL: Homepage, https://github.com/antosubash/simple_module_python
|
|
6
6
|
Project-URL: Repository, https://github.com/antosubash/simple_module_python
|
|
@@ -26,8 +26,8 @@ Requires-Dist: fastapi-inertia>=1.0
|
|
|
26
26
|
Requires-Dist: fastapi>=0.115
|
|
27
27
|
Requires-Dist: httpx>=0.27
|
|
28
28
|
Requires-Dist: jinja2>=3.1
|
|
29
|
-
Requires-Dist: simple-module-core==0.0.
|
|
30
|
-
Requires-Dist: simple-module-db==0.0.
|
|
29
|
+
Requires-Dist: simple-module-core==0.0.12
|
|
30
|
+
Requires-Dist: simple-module-db==0.0.12
|
|
31
31
|
Requires-Dist: starlette>=0.44
|
|
32
32
|
Requires-Dist: tomlkit>=0.13
|
|
33
33
|
Requires-Dist: uvicorn[standard]>=0.34
|
|
@@ -35,7 +35,7 @@ Description-Content-Type: text/markdown
|
|
|
35
35
|
|
|
36
36
|
# simple_module_hosting
|
|
37
37
|
|
|
38
|
-
FastAPI + Inertia.js host runtime for the [simple_module](https://github.com/antosubash/simple_module_python) framework — builds the app, wires the middleware pipeline, and contributes the `
|
|
38
|
+
FastAPI + Inertia.js host runtime for the [simple_module](https://github.com/antosubash/simple_module_python) framework — builds the app, wires the middleware pipeline, and contributes the `smpy host` plugin to the standalone `smpy` CLI.
|
|
39
39
|
|
|
40
40
|
## Install
|
|
41
41
|
|
|
@@ -46,7 +46,7 @@ pip install simple_module_hosting
|
|
|
46
46
|
For a new project, most users run the generator instead (shipped by the standalone `simple_module_cli` distribution):
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
uvx --from simple_module_cli
|
|
49
|
+
uvx --from simple_module_cli smpy new my-app
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
## What it provides
|
|
@@ -54,7 +54,7 @@ uvx --from simple_module_cli sm new my-app
|
|
|
54
54
|
- `create_app(settings)` — returns a fully-wired `FastAPI` instance with all discovered modules registered.
|
|
55
55
|
- Middleware pipeline (execution order): CorrelationId → RequestLogging → SecurityHeaders → Session → `<module middleware>` → Tenant (opt-in) → Locale → InertiaLayoutData → app.
|
|
56
56
|
- Inertia wiring — shared props (`auth`, `menus`, `i18n`), `InertiaDep`, page-route lookup.
|
|
57
|
-
- `
|
|
57
|
+
- `smpy host` plugin — `smpy host gen-pages` regenerates the frontend pages manifest; `smpy host sync-js-deps` installs JS deps declared by installed modules. The `smpy` binary itself comes from `simple_module_cli`.
|
|
58
58
|
|
|
59
59
|
## Usage
|
|
60
60
|
|
|
@@ -75,8 +75,8 @@ if __name__ == "__main__":
|
|
|
75
75
|
CLI (after also installing `simple_module_cli`):
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
smpy host gen-pages # regenerate client_app/modules.generated.ts
|
|
79
|
+
smpy host sync-js-deps # sync module JS deps into client_app/node_modules
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
## Depends on
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# simple_module_hosting
|
|
2
2
|
|
|
3
|
-
FastAPI + Inertia.js host runtime for the [simple_module](https://github.com/antosubash/simple_module_python) framework — builds the app, wires the middleware pipeline, and contributes the `
|
|
3
|
+
FastAPI + Inertia.js host runtime for the [simple_module](https://github.com/antosubash/simple_module_python) framework — builds the app, wires the middleware pipeline, and contributes the `smpy host` plugin to the standalone `smpy` CLI.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ pip install simple_module_hosting
|
|
|
11
11
|
For a new project, most users run the generator instead (shipped by the standalone `simple_module_cli` distribution):
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
uvx --from simple_module_cli
|
|
14
|
+
uvx --from simple_module_cli smpy new my-app
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## What it provides
|
|
@@ -19,7 +19,7 @@ uvx --from simple_module_cli sm new my-app
|
|
|
19
19
|
- `create_app(settings)` — returns a fully-wired `FastAPI` instance with all discovered modules registered.
|
|
20
20
|
- Middleware pipeline (execution order): CorrelationId → RequestLogging → SecurityHeaders → Session → `<module middleware>` → Tenant (opt-in) → Locale → InertiaLayoutData → app.
|
|
21
21
|
- Inertia wiring — shared props (`auth`, `menus`, `i18n`), `InertiaDep`, page-route lookup.
|
|
22
|
-
- `
|
|
22
|
+
- `smpy host` plugin — `smpy host gen-pages` regenerates the frontend pages manifest; `smpy host sync-js-deps` installs JS deps declared by installed modules. The `smpy` binary itself comes from `simple_module_cli`.
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
@@ -40,8 +40,8 @@ if __name__ == "__main__":
|
|
|
40
40
|
CLI (after also installing `simple_module_cli`):
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
smpy host gen-pages # regenerate client_app/modules.generated.ts
|
|
44
|
+
smpy host sync-js-deps # sync module JS deps into client_app/node_modules
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
## Depends on
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "simple_module_hosting"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.12"
|
|
4
4
|
description = "FastAPI + Inertia.js host runtime for simple_module — app_builder, middleware stack, CLI (sm / simple-module), scaffolding"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -26,8 +26,8 @@ dependencies = [
|
|
|
26
26
|
"fastapi-inertia>=1.0",
|
|
27
27
|
"httpx>=0.27",
|
|
28
28
|
"jinja2>=3.1",
|
|
29
|
-
"simple_module_core==0.0.
|
|
30
|
-
"simple_module_db==0.0.
|
|
29
|
+
"simple_module_core==0.0.12",
|
|
30
|
+
"simple_module_db==0.0.12",
|
|
31
31
|
"starlette>=0.44",
|
|
32
32
|
"tomlkit>=0.13",
|
|
33
33
|
"uvicorn[standard]>=0.34",
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/__main__.py
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Without this, ``python -m simple_module_hosting.host_cli`` would import the
|
|
4
4
|
module without running the Typer app — silently no-op'ing commands like
|
|
5
5
|
``gen-pages``. Provides the same Typer ``app`` callable that the
|
|
6
|
-
``simple_module_cli.cli_plugins`` entry point exposes as ``
|
|
6
|
+
``simple_module_cli.cli_plugins`` entry point exposes as ``smpy host``.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
@@ -28,7 +28,7 @@ def setup_inertia(
|
|
|
28
28
|
|
|
29
29
|
Two host layouts are supported: ``host/templates`` (the framework's
|
|
30
30
|
own host package) and ``templates`` at the project root (what
|
|
31
|
-
``
|
|
31
|
+
``smpy new`` produces). The first one found wins so it can override
|
|
32
32
|
module-contributed templates.
|
|
33
33
|
"""
|
|
34
34
|
from fastapi.templating import Jinja2Templates
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/host_cli.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""``
|
|
1
|
+
"""``smpy host`` plugin — project-time helpers exposed through the simple-module CLI.
|
|
2
2
|
|
|
3
3
|
Commands here need module discovery (``simple_module_core.discover_modules``)
|
|
4
4
|
and the manifest helpers; they're not part of the standalone scaffolder.
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/manifest.py
RENAMED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* :func:`read_module_package_json` / :func:`collect_module_js_deps` locate
|
|
9
9
|
the per-module ``package.json`` shipped inside wheels (or alongside the
|
|
10
10
|
source for editable installs) and aggregate its ``dependencies`` block.
|
|
11
|
-
Used by the ``
|
|
11
|
+
Used by the ``smpy sync-js-deps`` CLI.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
14
|
from __future__ import annotations
|
|
@@ -26,7 +26,7 @@ logger = logging.getLogger(__name__)
|
|
|
26
26
|
|
|
27
27
|
_GENERATED_TS_HEADER = """\
|
|
28
28
|
// AUTO-GENERATED by simple_module_hosting.manifest — do not edit by hand.
|
|
29
|
-
// Regenerate with:
|
|
29
|
+
// Regenerate with: smpy gen-pages
|
|
30
30
|
//
|
|
31
31
|
// Maps ModuleName -> record of page import paths. Paths below are
|
|
32
32
|
// relative to this file (host/client_app/) so that pages shipped inside
|
|
@@ -35,7 +35,7 @@ _GENERATED_TS_HEADER = """\
|
|
|
35
35
|
|
|
36
36
|
_GENERATED_CSS_HEADER = """\
|
|
37
37
|
/* AUTO-GENERATED by simple_module_hosting.manifest — do not edit by hand.
|
|
38
|
-
* Regenerate with:
|
|
38
|
+
* Regenerate with: smpy gen-pages
|
|
39
39
|
*
|
|
40
40
|
* @source entries for module pages shipped inside pip-installed wheels.
|
|
41
41
|
* In-repo modules are covered by the static @source glob in
|
|
@@ -54,7 +54,7 @@ def repo_root_from_client_app(client_app_dir: Path) -> Path:
|
|
|
54
54
|
Walks up looking for the nearest ``package.json`` that declares
|
|
55
55
|
``workspaces`` (the workspace root npm uses), falling back to any
|
|
56
56
|
``package.json``. This handles both the framework repo's
|
|
57
|
-
``host/client_app/`` layout and the flat ``
|
|
57
|
+
``host/client_app/`` layout and the flat ``smpy new`` scaffold's
|
|
58
58
|
``client_app/`` layout (where the parent IS the workspace root).
|
|
59
59
|
"""
|
|
60
60
|
here = client_app_dir.resolve()
|
|
File without changes
|
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/_hydrate_step.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/app_builder.py
RENAMED
|
File without changes
|
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/health.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/host_settings.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/i18n_deps.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/i18n_manifest.py
RENAMED
|
File without changes
|
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/inertia_deps.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/inertia_utils.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/logging.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/middleware.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/migrations.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/permissions.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/py.typed
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/redirects.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/simple_module_hosting/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_hosting_permissions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_locale_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_settings_secrets.py
RENAMED
|
File without changes
|
{simple_module_hosting-0.0.11 → simple_module_hosting-0.0.12}/tests/test_tenant_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|