keepup-modules 0.5.0__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.
- keepup_modules-0.5.0/PKG-INFO +23 -0
- keepup_modules-0.5.0/README.md +10 -0
- keepup_modules-0.5.0/keepup_modules/__init__.py +42 -0
- keepup_modules-0.5.0/keepup_modules/catalogue.py +812 -0
- keepup_modules-0.5.0/keepup_modules/decisions.py +281 -0
- keepup_modules-0.5.0/keepup_modules/plugin.py +120 -0
- keepup_modules-0.5.0/keepup_modules/tables.py +81 -0
- keepup_modules-0.5.0/keepup_modules.egg-info/PKG-INFO +23 -0
- keepup_modules-0.5.0/keepup_modules.egg-info/SOURCES.txt +13 -0
- keepup_modules-0.5.0/keepup_modules.egg-info/dependency_links.txt +1 -0
- keepup_modules-0.5.0/keepup_modules.egg-info/entry_points.txt +2 -0
- keepup_modules-0.5.0/keepup_modules.egg-info/requires.txt +6 -0
- keepup_modules-0.5.0/keepup_modules.egg-info/top_level.txt +1 -0
- keepup_modules-0.5.0/pyproject.toml +24 -0
- keepup_modules-0.5.0/setup.cfg +4 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: keepup-modules
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: The catalogue of panel sections, and the decision about backend plugins.
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: keepup-admin>=0.4.0
|
|
8
|
+
Requires-Dist: keepup-db>=0.4.0
|
|
9
|
+
Requires-Dist: keepup-users>=0.4.0
|
|
10
|
+
Requires-Dist: keepup-auth>=0.4.0
|
|
11
|
+
Requires-Dist: fastapi<1,>=0.128
|
|
12
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
13
|
+
|
|
14
|
+
# keepup-modules
|
|
15
|
+
|
|
16
|
+
The catalogue of panel sections, and the decision about backend plugins.
|
|
17
|
+
|
|
18
|
+
One capability of [keepup](https://github.com/FedorSergeev/keepup-admin), the framework over FastAPI for admin
|
|
19
|
+
panels: the base is installed as `keepup-admin` and imported as `keepup`, and
|
|
20
|
+
this distribution carries one part of it. It is installed on its own
|
|
21
|
+
(`pip install keepup-modules`) or together with the base (`pip install "keepup-admin[panel]"`),
|
|
22
|
+
and it declares itself to the kernel through its
|
|
23
|
+
`[project.entry-points."keepup.plugins"]` entry point.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# keepup-modules
|
|
2
|
+
|
|
3
|
+
The catalogue of panel sections, and the decision about backend plugins.
|
|
4
|
+
|
|
5
|
+
One capability of [keepup](https://github.com/FedorSergeev/keepup-admin), the framework over FastAPI for admin
|
|
6
|
+
panels: the base is installed as `keepup-admin` and imported as `keepup`, and
|
|
7
|
+
this distribution carries one part of it. It is installed on its own
|
|
8
|
+
(`pip install keepup-modules`) or together with the base (`pip install "keepup-admin[panel]"`),
|
|
9
|
+
and it declares itself to the kernel through its
|
|
10
|
+
`[project.entry-points."keepup.plugins"]` entry point.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""The catalogue of panel sections, and the decision about backend plugins.
|
|
2
|
+
|
|
3
|
+
This distribution provides `catalogue` and `plugin_decisions` and declares one
|
|
4
|
+
plugin, `modules`, in the `keepup.plugins` group. It depends on `keepup-admin`
|
|
5
|
+
for the constructor, on `keepup-db` for the two tables the catalogue keeps, on
|
|
6
|
+
`keepup-users` for the roles a section is granted to, on `keepup-auth` for the
|
|
7
|
+
panel guard of its routes -- the temporary edge the route bridge carries until
|
|
8
|
+
`keepup-http` mounts what a plugin declares (keepup-121) -- and on `keepup-audit`
|
|
9
|
+
for the trail an administrator's change is written to.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from keepup_modules.catalogue import (
|
|
13
|
+
get_all_modules_from_db,
|
|
14
|
+
get_module_by_id,
|
|
15
|
+
get_modules_for_role,
|
|
16
|
+
get_modules_for_roles,
|
|
17
|
+
sync_framework_sections,
|
|
18
|
+
sync_new_modules_from_json,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__version__ = "0.5.0"
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"get_all_modules_from_db",
|
|
25
|
+
"get_module_by_id",
|
|
26
|
+
"get_modules_for_role",
|
|
27
|
+
"get_modules_for_roles",
|
|
28
|
+
"sync_framework_sections",
|
|
29
|
+
"sync_new_modules_from_json",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
#: What the entry point asks for, looked up on access: importing the catalogue
|
|
33
|
+
#: model must not import the plugin's panel wiring.
|
|
34
|
+
_PLUGIN_NAMES = {"ModulesPlugin", "SERVICE_CATALOGUE", "SERVICE_PLUGIN_DECISIONS"}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def __getattr__(name):
|
|
38
|
+
if name in _PLUGIN_NAMES:
|
|
39
|
+
from keepup_modules import plugin
|
|
40
|
+
|
|
41
|
+
return getattr(plugin, name)
|
|
42
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|