keepup-ui 0.4.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_ui-0.4.0/PKG-INFO +18 -0
- keepup_ui-0.4.0/README.md +10 -0
- keepup_ui-0.4.0/keepup_ui/__init__.py +12 -0
- keepup_ui-0.4.0/keepup_ui/tables.py +65 -0
- keepup_ui-0.4.0/keepup_ui.egg-info/PKG-INFO +18 -0
- keepup_ui-0.4.0/keepup_ui.egg-info/SOURCES.txt +10 -0
- keepup_ui-0.4.0/keepup_ui.egg-info/dependency_links.txt +1 -0
- keepup_ui-0.4.0/keepup_ui.egg-info/entry_points.txt +2 -0
- keepup_ui-0.4.0/keepup_ui.egg-info/requires.txt +1 -0
- keepup_ui-0.4.0/keepup_ui.egg-info/top_level.txt +1 -0
- keepup_ui-0.4.0/pyproject.toml +19 -0
- keepup_ui-0.4.0/setup.cfg +4 -0
keepup_ui-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: keepup-ui
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: The panel: the shell, its sections, its themes and the static files it serves.
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: keepup-admin>=0.4.0
|
|
8
|
+
|
|
9
|
+
# keepup-ui
|
|
10
|
+
|
|
11
|
+
The panel: the shell, its sections, its themes and the static files it serves.
|
|
12
|
+
|
|
13
|
+
One capability of [keepup](https://github.com/FedorSergeev/keepup-admin), the framework over FastAPI for admin
|
|
14
|
+
panels: the base is installed as `keepup-admin` and imported as `keepup`, and
|
|
15
|
+
this distribution carries one part of it. It is installed on its own
|
|
16
|
+
(`pip install keepup-ui`) or together with the base (`pip install "keepup-admin[panel]"`),
|
|
17
|
+
and it declares itself to the kernel through its
|
|
18
|
+
`[project.entry-points."keepup.plugins"]` entry point.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# keepup-ui
|
|
2
|
+
|
|
3
|
+
The panel: the shell, its sections, its themes and the static files it serves.
|
|
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-ui`) 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,12 @@
|
|
|
1
|
+
"""The panel: the shell, its sections, its themes and the static files it serves.
|
|
2
|
+
|
|
3
|
+
This distribution provides `ui` and declares one plugin,
|
|
4
|
+
`ui`, in the `keepup.plugins` group. It depends on `keepup-admin`
|
|
5
|
+
for the constructor -- the descriptor, the catalogue, the service registry and
|
|
6
|
+
the lifecycle -- and on nothing of another capability.
|
|
7
|
+
|
|
8
|
+
The code moves here in keepup-124: until then the plugin lives in the framework's
|
|
9
|
+
own `builtin/ui.py` and this package is the home it is moving to.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__version__ = "0.4.0"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""The tables of the panel, declared where the capability lives.
|
|
2
|
+
|
|
3
|
+
Task keepup-124. `keepup.themes` and `keepup.schema` re-export them for one
|
|
4
|
+
release, so the path that predates the catalogue still creates them and every
|
|
5
|
+
reader keeps working; the declarations belong to the capability that keeps the
|
|
6
|
+
themes and the section catalogue.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from sqlalchemy import (Boolean, Column, DateTime, Index, Integer,
|
|
10
|
+
String, Text, UniqueConstraint)
|
|
11
|
+
from sqlalchemy import text as sql_text
|
|
12
|
+
|
|
13
|
+
from keepup_db import tables
|
|
14
|
+
|
|
15
|
+
#: The names the declarations came with, kept beside them.
|
|
16
|
+
THEMES_TABLE = "visual_themes"
|
|
17
|
+
MODULES_TABLE = "frontend_modules"
|
|
18
|
+
ROLE_MODULES_TABLE = "role_modules"
|
|
19
|
+
|
|
20
|
+
__all__ = ["FRONTEND_MODULES", "ROLE_MODULES", "VISUAL_THEMES"]
|
|
21
|
+
|
|
22
|
+
VISUAL_THEMES = tables.table(
|
|
23
|
+
THEMES_TABLE,
|
|
24
|
+
tables.auto_id(),
|
|
25
|
+
Column("theme_name", String(100).with_variant(Text(), "sqlite"), nullable=False, unique=True),
|
|
26
|
+
Column("main_page_file", String(255).with_variant(Text(), "sqlite"), nullable=False),
|
|
27
|
+
# Branding came after the table; older databases get these two from
|
|
28
|
+
# ensure_tables rather than from the CREATE.
|
|
29
|
+
Column("brand_name", String(100).with_variant(Text(), "sqlite")),
|
|
30
|
+
Column("logo_url", String(255).with_variant(Text(), "sqlite")),
|
|
31
|
+
# SQLite had an integer flag here and the queries write 0/1 into it.
|
|
32
|
+
Column("is_active", Boolean().with_variant(Integer(), "sqlite"),
|
|
33
|
+
server_default=tables.per_dialect(postgres="FALSE", sqlite="0")),
|
|
34
|
+
Column("created_at", DateTime, server_default=tables.NOW),
|
|
35
|
+
Column("updated_at", DateTime, server_default=tables.NOW),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
FRONTEND_MODULES = tables.table(
|
|
39
|
+
"frontend_modules",
|
|
40
|
+
tables.auto_id(),
|
|
41
|
+
Column("module_id", Text, unique=True, nullable=False),
|
|
42
|
+
Column("name", Text, nullable=False),
|
|
43
|
+
Column("description", Text),
|
|
44
|
+
Column("js_path", Text),
|
|
45
|
+
Column("css_path", Text),
|
|
46
|
+
Column("init_function", Text),
|
|
47
|
+
Column("version", Text, server_default="1.0.0"),
|
|
48
|
+
Column("is_active", Boolean, server_default=sql_text("TRUE")),
|
|
49
|
+
Column("config", Text),
|
|
50
|
+
Column("created_at", DateTime, server_default=tables.NOW),
|
|
51
|
+
Column("updated_at", DateTime, server_default=tables.NOW),
|
|
52
|
+
Index("idx_frontend_modules_active", "is_active"),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
ROLE_MODULES = tables.table(
|
|
56
|
+
"role_modules",
|
|
57
|
+
tables.auto_id(),
|
|
58
|
+
Column("role_name", Text, nullable=False),
|
|
59
|
+
Column("module_id", Text, nullable=False),
|
|
60
|
+
Column("is_active", Boolean, server_default=sql_text("TRUE")),
|
|
61
|
+
Column("created_at", DateTime, server_default=tables.NOW),
|
|
62
|
+
UniqueConstraint("role_name", "module_id"),
|
|
63
|
+
Index("idx_role_modules_role", "role_name"),
|
|
64
|
+
Index("idx_role_modules_active", "is_active"),
|
|
65
|
+
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: keepup-ui
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: The panel: the shell, its sections, its themes and the static files it serves.
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: keepup-admin>=0.4.0
|
|
8
|
+
|
|
9
|
+
# keepup-ui
|
|
10
|
+
|
|
11
|
+
The panel: the shell, its sections, its themes and the static files it serves.
|
|
12
|
+
|
|
13
|
+
One capability of [keepup](https://github.com/FedorSergeev/keepup-admin), the framework over FastAPI for admin
|
|
14
|
+
panels: the base is installed as `keepup-admin` and imported as `keepup`, and
|
|
15
|
+
this distribution carries one part of it. It is installed on its own
|
|
16
|
+
(`pip install keepup-ui`) or together with the base (`pip install "keepup-admin[panel]"`),
|
|
17
|
+
and it declares itself to the kernel through its
|
|
18
|
+
`[project.entry-points."keepup.plugins"]` entry point.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
keepup_ui/__init__.py
|
|
4
|
+
keepup_ui/tables.py
|
|
5
|
+
keepup_ui.egg-info/PKG-INFO
|
|
6
|
+
keepup_ui.egg-info/SOURCES.txt
|
|
7
|
+
keepup_ui.egg-info/dependency_links.txt
|
|
8
|
+
keepup_ui.egg-info/entry_points.txt
|
|
9
|
+
keepup_ui.egg-info/requires.txt
|
|
10
|
+
keepup_ui.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
keepup-admin>=0.4.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
keepup_ui
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "keepup-ui"
|
|
7
|
+
version = "0.4.0"
|
|
8
|
+
description = "The panel: the shell, its sections, its themes and the static files it serves."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"keepup-admin>=0.4.0",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.entry-points."keepup.plugins"]
|
|
16
|
+
ui = "keepup_ui:UiPlugin"
|
|
17
|
+
|
|
18
|
+
[tool.setuptools]
|
|
19
|
+
packages = ["keepup_ui"]
|