brilliance-admin 0.40.0__py3-none-any.whl → 0.41.0__py3-none-any.whl
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.
- admin_panel/schema/admin_schema.py +10 -4
- admin_panel/static/favicon.jpg +0 -0
- admin_panel/static/{index-SCeDXvci.js → index-BeniOHDv.js} +134 -134
- admin_panel/static/{index-BrXRRuaE.css → index-vlBToOhT.css} +1 -1
- admin_panel/templates/index.html +2 -2
- brilliance_admin-0.41.0.dist-info/METADATA +155 -0
- {brilliance_admin-0.40.0.dist-info → brilliance_admin-0.41.0.dist-info}/RECORD +10 -10
- admin_panel/static/favicon.ico +0 -0
- brilliance_admin-0.40.0.dist-info/METADATA +0 -87
- {brilliance_admin-0.40.0.dist-info → brilliance_admin-0.41.0.dist-info}/WHEEL +0 -0
- {brilliance_admin-0.40.0.dist-info → brilliance_admin-0.41.0.dist-info}/licenses/LICENSE +0 -0
- {brilliance_admin-0.40.0.dist-info → brilliance_admin-0.41.0.dist-info}/top_level.txt +0 -0
admin_panel/templates/index.html
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
<link rel="icon" href="{{ favicon_image }}" />
|
|
14
14
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
15
15
|
<title>{{ title }}</title>
|
|
16
|
-
<script type="module" crossorigin src="/admin/static/index-
|
|
17
|
-
<link rel="stylesheet" crossorigin href="/admin/static/index-
|
|
16
|
+
<script type="module" crossorigin src="/admin/static/index-BeniOHDv.js"></script>
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/admin/static/index-vlBToOhT.css">
|
|
18
18
|
</head>
|
|
19
19
|
|
|
20
20
|
<body>
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: brilliance-admin
|
|
3
|
+
Version: 0.41.0
|
|
4
|
+
Summary: General-purpose admin panel framework powered by FastAPI. Some call it heavenly in its brilliance.
|
|
5
|
+
License-Expression: AGPL-3.0
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: asgiref>=3.11.0
|
|
10
|
+
Requires-Dist: fastapi>=0.115.8
|
|
11
|
+
Requires-Dist: jinja2>=3.1.6
|
|
12
|
+
Provides-Extra: example
|
|
13
|
+
Requires-Dist: uvicorn>=0.34.0; extra == "example"
|
|
14
|
+
Requires-Dist: faker>=38.2.0; extra == "example"
|
|
15
|
+
Requires-Dist: pyjwt>=2.10.1; extra == "example"
|
|
16
|
+
Requires-Dist: structlog>=25.5.0; extra == "example"
|
|
17
|
+
Requires-Dist: rich>=14.2.0; extra == "example"
|
|
18
|
+
Provides-Extra: tests
|
|
19
|
+
Requires-Dist: pytest>=8.4.2; extra == "tests"
|
|
20
|
+
Requires-Dist: pytest-asyncio>=1.2.0; extra == "tests"
|
|
21
|
+
Requires-Dist: httpx>=0.28.1; extra == "tests"
|
|
22
|
+
Requires-Dist: pytest-mock>=3.15.1; extra == "tests"
|
|
23
|
+
Requires-Dist: sqlalchemy>=2.0.41; extra == "tests"
|
|
24
|
+
Requires-Dist: aiosqlite>=0.22.1; extra == "tests"
|
|
25
|
+
Requires-Dist: factory-boy>=3.3.3; extra == "tests"
|
|
26
|
+
Requires-Dist: pyjwt>=2.10.1; extra == "tests"
|
|
27
|
+
Provides-Extra: scalar
|
|
28
|
+
Requires-Dist: scalar-fastapi>=1.5.0; extra == "scalar"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
<img src="https://github.com/brilliance-admin/backend-python/blob/main/example/static/logo.png?raw=true"
|
|
33
|
+
alt="Brilliance Admin"
|
|
34
|
+
width="600">
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div align="center">
|
|
38
|
+
|
|
39
|
+
[](https://pypi.org/project/brilliance-admin/)
|
|
40
|
+
[](https://github.com/brilliance-admin/backend-python/blob/main/LICENSE)
|
|
41
|
+
[](https://github.com/brilliance-admin/backend-python/actions)
|
|
42
|
+
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
General-purpose admin panel framework powered by FastAPI. Some call it heavenly in its brilliance.
|
|
46
|
+
|
|
47
|
+
- Serves a prebuilt SPA frontend as static files
|
|
48
|
+
- Generates schemas for frontend sections on the backend
|
|
49
|
+
- Provides a backend-driven API for admin interfaces
|
|
50
|
+
- Designed for fast data management and data viewing from any sources
|
|
51
|
+
- Inspired by Django Admin and Django REST Framework
|
|
52
|
+
- Focused on minimal boilerplate and simplified backend-controlled configuration
|
|
53
|
+
|
|
54
|
+
### [Live Demo](https://brilliance-admin.com/) | [Example App](https://github.com/brilliance-admin/backend-python/tree/main/example) | Documentation (todo)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Features:
|
|
58
|
+
|
|
59
|
+
* Tables with full CRUD support, including filtering, sorting, and pagination.
|
|
60
|
+
* Ability to define custom table actions with forms, response messages, and file uploads.
|
|
61
|
+
* SQLAlchemy integration with automatic field generation from models.
|
|
62
|
+
* Authorization via any account data source.
|
|
63
|
+
* Localization support with language selection in the interface.
|
|
64
|
+
|
|
65
|
+
## How to use it
|
|
66
|
+
|
|
67
|
+
Installation:
|
|
68
|
+
``` shell
|
|
69
|
+
pip install brilliance-admin
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
You need to generate `AdminSchema` instance:
|
|
73
|
+
``` python
|
|
74
|
+
from admin_panel import schema
|
|
75
|
+
|
|
76
|
+
admin_schema = schema.AdminSchema(
|
|
77
|
+
title='Admin Panel',
|
|
78
|
+
auth=YourAdminAuthentication(),
|
|
79
|
+
groups=[
|
|
80
|
+
schema.Group(
|
|
81
|
+
slug='example',
|
|
82
|
+
title='Example',
|
|
83
|
+
icon='mdi-star',
|
|
84
|
+
categories=[
|
|
85
|
+
CategoryExample(),
|
|
86
|
+
]
|
|
87
|
+
),
|
|
88
|
+
],
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
admin_app = admin_schema.generate_app()
|
|
92
|
+
|
|
93
|
+
# Your FastAPI app
|
|
94
|
+
app = FastAPI()
|
|
95
|
+
app.mount('/admin', admin_app)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### SQLAlchemy integration
|
|
99
|
+
Brilliance Admin supports automatic schema generation from SQLAlchemy and provides a ready-made CRUD implementation for tables.
|
|
100
|
+
|
|
101
|
+
``` python
|
|
102
|
+
from admin_panel import sqlalchemy
|
|
103
|
+
from admin_panel.translations import TranslateText as _
|
|
104
|
+
|
|
105
|
+
from your_project.models import Terminal
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class TerminalAdmin(sqlalchemy.SQLAlchemyAdmin):
|
|
109
|
+
db_async_session = async_sessionmaker
|
|
110
|
+
model = Terminal
|
|
111
|
+
title = _('terminals')
|
|
112
|
+
icon = 'mdi-console-network-outline'
|
|
113
|
+
|
|
114
|
+
ordering_fields = ['id']
|
|
115
|
+
search_fields = ['id', 'title']
|
|
116
|
+
|
|
117
|
+
table_schema = sqlalchemy.SQLAlchemyFieldsSchema(
|
|
118
|
+
model=Terminal,
|
|
119
|
+
list_display=['id', 'merchant_id'],
|
|
120
|
+
)
|
|
121
|
+
table_filters = sqlalchemy.SQLAlchemyFieldsSchema(
|
|
122
|
+
model=Terminal,
|
|
123
|
+
fields=['id', 'created_at'],
|
|
124
|
+
created_at=schema.DateTimeField(range=True),
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
category = TerminalAdmin()
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Now, the `TerminalAdmin` instance can be passed to `categories`.
|
|
132
|
+
|
|
133
|
+
### Can be used both via inheritance and instancing
|
|
134
|
+
|
|
135
|
+
For `SQLAlchemyFieldsSchema`
|
|
136
|
+
|
|
137
|
+
``` python
|
|
138
|
+
class TerminalTableSchema(sqlalchemy.SQLAlchemyFieldsSchema):
|
|
139
|
+
model = Terminal
|
|
140
|
+
fields = ['id', 'created_at']
|
|
141
|
+
|
|
142
|
+
created_at=schema.DateTimeField(range=True)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class TerminalAdmin(sqlalchemy.SQLAlchemyAdmin):
|
|
146
|
+
table_schema = TerminalTableSchema()
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
And `SQLAlchemyAdmin` category schema itself
|
|
150
|
+
|
|
151
|
+
> If `table_schema` is not specified, it will be generated automatically and will include all discovered fields and relationships of the table in the output.
|
|
152
|
+
|
|
153
|
+
``` python
|
|
154
|
+
category = sqlalchemy.SQLAlchemyAdmin(db_async_session=async_sessionmaker, model=Terminal)
|
|
155
|
+
```
|
|
@@ -29,7 +29,7 @@ admin_panel/integrations/sqlalchemy/table/list.py,sha256=80wl9Ja1_Dc6p_6zTi-trxg
|
|
|
29
29
|
admin_panel/integrations/sqlalchemy/table/retrieve.py,sha256=kuHyMGvJhTlWyHuB1wXNl6HelAkMzQjhcMGZwOHtSK0,2115
|
|
30
30
|
admin_panel/integrations/sqlalchemy/table/update.py,sha256=O1hpzEP04tUv_HUD8ChCBqYbjjnrRc2houvJbNUYEzY,3518
|
|
31
31
|
admin_panel/schema/__init__.py,sha256=X-izShvv84jkFU47WfpUwtvRh3NOv570iUB3NRNEIDU,248
|
|
32
|
-
admin_panel/schema/admin_schema.py,sha256=
|
|
32
|
+
admin_panel/schema/admin_schema.py,sha256=_bQmDTnBzq_uxEAgQ-Dqra5rTewtaLY_HboB3__n80o,6224
|
|
33
33
|
admin_panel/schema/category.py,sha256=ph7rndUK21lxRDToYpcYnvIyfGwPP-HESST7DxObdqU,4108
|
|
34
34
|
admin_panel/schema/group.py,sha256=h4AuiGEsy3yE1Oz5YlJ6lOhDEzIgi4WgtmLZ4JRgrgg,2238
|
|
35
35
|
admin_panel/schema/graphs/__init__.py,sha256=qvmZv9QWdiutPtN5VYQLYbsjY2SOg8p_XRaz2rUlIxY,44
|
|
@@ -42,9 +42,9 @@ admin_panel/schema/table/table_models.py,sha256=7UQyqZcA-2sz0731EAkvhPKDuZbxCqUT
|
|
|
42
42
|
admin_panel/schema/table/fields/__init__.py,sha256=RW-sIFTAaSQo4mMR6iWtnefogWPjmg6KAsDwe9mKW1k,291
|
|
43
43
|
admin_panel/schema/table/fields/base.py,sha256=Po4M04oF4OuPFqYRH28SlIpH8C3BEBlGuaR_K6MdFRs,7789
|
|
44
44
|
admin_panel/schema/table/fields/function_field.py,sha256=MlPCHtc10-WWcnZ0jX7rGoTr6mG1HhloAKW_cB69GAI,1765
|
|
45
|
-
admin_panel/static/favicon.
|
|
46
|
-
admin_panel/static/index-
|
|
47
|
-
admin_panel/static/index-
|
|
45
|
+
admin_panel/static/favicon.jpg,sha256=_np-jvdgK1qgkqbbz9yecZ-PoR4iMwltHthQ2gYebYk,12991
|
|
46
|
+
admin_panel/static/index-BeniOHDv.js,sha256=U5N_dXe2QOlSKVVwJ0Ghu8hNIiBD9QF-bK_04MAgucc,3201882
|
|
47
|
+
admin_panel/static/index-vlBToOhT.css,sha256=hoVCpcStTHdAVRm37k1umrNdXjOwIIveu9lxk4ocpEc,983028
|
|
48
48
|
admin_panel/static/materialdesignicons-webfont-CYDMK1kx.woff2,sha256=5S1g9kJnzaoIQitQurXUW9NeZisDua91F5zq4ArF_Is,385360
|
|
49
49
|
admin_panel/static/materialdesignicons-webfont-CgCzGbLl.woff,sha256=SNPuxqtw3HoZCPm6LyCOClhxi57hbj9qvbXbT0Yfolg,561776
|
|
50
50
|
admin_panel/static/materialdesignicons-webfont-D3kAzl71.ttf,sha256=vXJaejiTnltZkE4benJlkZ7OwlYWbs5p1RXCEAUWWQc,1243500
|
|
@@ -65,9 +65,9 @@ admin_panel/static/tinymce/plugins/accordion/css/accordion.css,sha256=u5UQkMNA9f
|
|
|
65
65
|
admin_panel/static/tinymce/plugins/codesample/css/prism.css,sha256=exAdMtHbvwW7-DEs567MX65Fq1aJQTfREP5pw8gW-AY,1736
|
|
66
66
|
admin_panel/static/tinymce/plugins/customLink/plugin.js,sha256=illBNpnHDkBsLG6wo_jDPF6z7CGnO1MQWUoDwZKy6vQ,5589
|
|
67
67
|
admin_panel/static/tinymce/plugins/customLink/css/link.css,sha256=gh5nvY8Z92hJfCEBPnIm4jIPCcKKbJnab-30oIfX7Hc,56
|
|
68
|
-
admin_panel/templates/index.html,sha256=
|
|
69
|
-
brilliance_admin-0.
|
|
70
|
-
brilliance_admin-0.
|
|
71
|
-
brilliance_admin-0.
|
|
72
|
-
brilliance_admin-0.
|
|
73
|
-
brilliance_admin-0.
|
|
68
|
+
admin_panel/templates/index.html,sha256=7a3DWqQxaHhm0_NfPmae5D55rRKPkrZx8fmsvDaxy8Y,1294
|
|
69
|
+
brilliance_admin-0.41.0.dist-info/licenses/LICENSE,sha256=PjeDRXGbVLtKul5Xpfco_6CyB6bYGWVVPrO0oubquuM,727
|
|
70
|
+
brilliance_admin-0.41.0.dist-info/METADATA,sha256=61T8pSttSvFoWFxZ6IY0TKQQ4dkl5zVVT-Rt1xA3UEM,4988
|
|
71
|
+
brilliance_admin-0.41.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
72
|
+
brilliance_admin-0.41.0.dist-info/top_level.txt,sha256=saSuhWhjU9d5_tZnnBG6GYVQY7ywThehjbEePImWik8,12
|
|
73
|
+
brilliance_admin-0.41.0.dist-info/RECORD,,
|
admin_panel/static/favicon.ico
DELETED
|
Binary file
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: brilliance-admin
|
|
3
|
-
Version: 0.40.0
|
|
4
|
-
Summary: General-purpose admin panel backend
|
|
5
|
-
License-Expression: AGPL-3.0
|
|
6
|
-
Requires-Python: >=3.10
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
License-File: LICENSE
|
|
9
|
-
Requires-Dist: asgiref>=3.11.0
|
|
10
|
-
Requires-Dist: fastapi>=0.115.8
|
|
11
|
-
Requires-Dist: jinja2>=3.1.6
|
|
12
|
-
Provides-Extra: example
|
|
13
|
-
Requires-Dist: uvicorn>=0.34.0; extra == "example"
|
|
14
|
-
Requires-Dist: faker>=38.2.0; extra == "example"
|
|
15
|
-
Requires-Dist: pyjwt>=2.10.1; extra == "example"
|
|
16
|
-
Requires-Dist: structlog>=25.5.0; extra == "example"
|
|
17
|
-
Requires-Dist: rich>=14.2.0; extra == "example"
|
|
18
|
-
Provides-Extra: tests
|
|
19
|
-
Requires-Dist: pytest>=8.4.2; extra == "tests"
|
|
20
|
-
Requires-Dist: pytest-asyncio>=1.2.0; extra == "tests"
|
|
21
|
-
Requires-Dist: httpx>=0.28.1; extra == "tests"
|
|
22
|
-
Requires-Dist: pytest-mock>=3.15.1; extra == "tests"
|
|
23
|
-
Requires-Dist: sqlalchemy>=2.0.41; extra == "tests"
|
|
24
|
-
Requires-Dist: aiosqlite>=0.22.1; extra == "tests"
|
|
25
|
-
Requires-Dist: factory-boy>=3.3.3; extra == "tests"
|
|
26
|
-
Requires-Dist: pyjwt>=2.10.1; extra == "tests"
|
|
27
|
-
Provides-Extra: scalar
|
|
28
|
-
Requires-Dist: scalar-fastapi>=1.5.0; extra == "scalar"
|
|
29
|
-
Dynamic: license-file
|
|
30
|
-
|
|
31
|
-
# Brilliance Admin Backend
|
|
32
|
-
|
|
33
|
-
[](https://pypi.org/project/brilliance-admin-backend/)
|
|
34
|
-
[](https://github.com/brilliance-admin/backend-python/blob/main/LICENSE)
|
|
35
|
-
[](https://github.com/brilliance-admin/backend-python/actions)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Brilliance Admin Backend is a backend framework for building admin panels with Python and FastAPI.
|
|
39
|
-
|
|
40
|
-
- Serves a prebuilt SPA frontend as static files
|
|
41
|
-
- Generates schemas for frontend sections on the backend
|
|
42
|
-
- Provides a backend-driven API for admin interfaces
|
|
43
|
-
- Designed for fast data management and data viewing from any sources
|
|
44
|
-
- Inspired by Django Admin and Django REST Framework
|
|
45
|
-
- Focused on minimal boilerplate and simplified backend-controlled configuration
|
|
46
|
-
|
|
47
|
-
## [Live Demo](https://brilliance-admin.com/)
|
|
48
|
-
|
|
49
|
-
Features:
|
|
50
|
-
|
|
51
|
-
* Tables with full CRUD support, including filtering, sorting, and pagination.
|
|
52
|
-
* Ability to define custom table actions with forms, response messages, and file uploads.
|
|
53
|
-
* SQLAlchemy integration with automatic field generation from models.
|
|
54
|
-
* Authorization via any account provider.
|
|
55
|
-
* Localization support with language selection in the interface.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## Development
|
|
59
|
-
|
|
60
|
-
``` shell
|
|
61
|
-
uv sync --all-groups --all-extras
|
|
62
|
-
uv run uvicorn example.main:app --host 0.0.0.0 --port 8082 --reload
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Tests:
|
|
66
|
-
``` shell
|
|
67
|
-
uv run pytest
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Docs:
|
|
71
|
-
- `http://0.0.0.0:8082/docs`
|
|
72
|
-
- `http://0.0.0.0:8082/redoc`
|
|
73
|
-
- `http://0.0.0.0:8082/scalar`
|
|
74
|
-
|
|
75
|
-
## Docker
|
|
76
|
-
|
|
77
|
-
``` shell
|
|
78
|
-
docker compose -f .configs/docker/docker-compose.yml build
|
|
79
|
-
docker compose -f .configs/docker/docker-compose.yml up
|
|
80
|
-
docker compose -f .configs/docker/docker-compose.yml run --rm backend /bin/bash -c "uv sync --all-groups --all-extras"
|
|
81
|
-
docker compose -f .configs/docker/docker-compose.yml run --rm backend /bin/bash -c "uv run pytest"
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
``` shell
|
|
85
|
-
docker exec -it rollyum-backend-1 git config --global --add safe.directory '*'
|
|
86
|
-
docker exec -it rollyum-backend-1 uv run pre-commit run --all-files
|
|
87
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|