Simple and lightweight admin panel framework powered by FastAPI and Vue3 Vuetify together. Some call it heavenly in its brilliance.
Project description
Simple and lightweight admin panel framework powered by FastAPI and Vue3 Vuetify together.
Integrated with SQLAlchemy. Inspaired by Django Admin and DRF.
Some call it heavenly in its brilliance.
Live Demo | Demo Sources | Documentation (todo)
Key ideas:
- API oriented
Works entirely on FastAPI and provides a prebuilt SPA frontend via static files (Vue3 + Vuetify). No separate startup is required.
Data generation/updating API separated from rendering fontend with zero hardcode, this makes it possible to have a single frontend with multiple backend implementations in different languages and makes test coverage easier.
- Rich visualization
Providing rich and convenient ways to display and manage data (tables, charts, etc) from any data source. - ORM
Automatic schema generation and methods for CRUD operations. - Minimal boilerplate
Focused on simplified, but rich configuration.
How it works:
- After authentication, the user receives the admin panel schema, and the frontend renders it
- The frontend communicates with the backend via API to fetch and modify data
Features:
- Tables with full CRUD support, including filtering, sorting, and pagination.
- Ability to define custom table actions with forms, response messages, and file downloads.
- Graphs via ChartJS
- Localization support
- Adapted for different screen sizes and mobile devices
- Authorization via any account data source
Integrations:
- SQLAlchemy - schema autogeneration for tables + CRUD operations + authorization
Planned:
- Dashboard features
- Role-based access permissions system via interface
- Backend interface for storing and viewing action history in the admin interface
- Nested data support for creation and detail views (inline editing), nested CRUD workflows
- Django ORM integration
How to use it
Installation:
pip install brilliance-admin
You need to generate AdminSchema instance:
from brilliance_admin import schema
class CategoryExample(schema.CategoryTable):
"Implementation of get_list and retrieve; update and create are optional"
admin_schema = schema.AdminSchema(
title='Admin Panel',
auth=YourAdminAuthentication(),
groups=[
schema.Group(
slug='example',
title='Example',
icon='mdi-star',
categories=[
CategoryExample(),
]
),
],
)
admin_app = admin_schema.generate_app()
# Your FastAPI app
app = FastAPI()
app.mount('/admin', admin_app)
SQLAlchemy integration
Supports automatic schema generation for CRUD tables:
category = sqlalchemy.SQLAlchemyAdmin(db_async_session=async_sessionmaker, model=Terminal)
[!NOTE] If
table_schemais not specified, it will be generated automatically with all discovered fields and relationships
Now, the category instance can be passed to categories.
DRF class style schema
from brilliance_admin import sqlalchemy
from brilliance_admin.translations import TranslateText as _
from your_project.models import Terminal
class TerminalFiltersSchema(sqlalchemy.SQLAlchemyFieldsSchema):
model = Terminal
fields = ['id', 'created_at']
created_at = schema.DateTimeField(range=True)
class TerminalSchema(sqlalchemy.SQLAlchemyFieldsSchema):
model = Terminal
list_display = ['id', 'merchant_id']
class TerminalAdmin(sqlalchemy.SQLAlchemyAdmin):
db_async_session = async_sessionmaker
model = Terminal
title = _('terminals')
icon = 'mdi-console-network-outline'
ordering_fields = ['id']
search_fields = ['id', 'title']
table_schema = TerminalSchema()
table_filters = TerminalFiltersSchema()
category = TerminalAdmin()
Can be used both via inheritance and instancing
Optionally, functional-style generation can be used to reduce boilerplate code
Availiable for SQLAlchemyAdmin and SQLAlchemyFieldsSchema
category = sqlalchemy.SQLAlchemyAdmin(
db_async_session=async_sessionmaker,
model=Terminal,
table_schema = sqlalchemy.SQLAlchemyFieldsSchema(
model=Terminal,
list_display=['id', 'merchant_id'],
),
table_filters = sqlalchemy.SQLAlchemyFieldsSchema(
model=Terminal,
fields=['id', 'created_at'],
created_at=schema.DateTimeField(range=True),
),
)
SQLAlchemy JWT Authentication
auth = sqlalchemy.SQLAlchemyJWTAdminAuthentication(
secret='auth_secret',
db_async_session=async_session,
user_model=User,
)
Comparison of Similar Projects
| Criterion | Brilliance Admin | Django Admin | FastAPI Admin | Starlette Admin | SQLAdmin |
|---|---|---|---|---|---|
| Base framework | FastAPI | Django | FastAPI | Starlette / FastAPI | FastAPI / Starlette |
| Rendering model | Prebuilt Vue 3 + Vuetify SPA + Jinja2 | Server-side Django templates | Server-side Jinja2 templates + Tabler UI | Server-side Jinja2 templates + Tabler UI | Server-side Jinja2 templates + Bootstrap |
| Frontend architecture | Separate frontend (SPA) | Classic server-rendered UI | Server-rendered UI with JS interactivity | Server-rendered UI with JS interactivity | Server-rendered UI |
| Data source | Any source + SQLAlchemy | Django ORM | Tortoise ORM | Any source + SQLAlchemy, MongoDB | SQLAlchemy |
| Multiple databases per model | Yes | Database routers | No (global engine) | Yes (session per ModelView) | No (single engine per Admin) |
| Schema generation | User-defined format | From Django models | From ORM models | User-defined format | From SQLAlchemy models |
| Async support | Yes | No | Yes | Yes | Yes |
| API-first approach | Yes | No | Partially | Partially | No |
| Built-in Localization | Yes | Yes | No | No | No |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brilliance_admin-0.43.7.tar.gz.
File metadata
- Download URL: brilliance_admin-0.43.7.tar.gz
- Upload date:
- Size: 4.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f63981ffc32b09b0584ed80c0c728e170e05f59ffe246fdde1e70035957021ac
|
|
| MD5 |
a5364a44107c4179ddd60c5ba4f4337a
|
|
| BLAKE2b-256 |
8d9a23f898c84cbb62f8cb7630e5a95de068b4d3c589693ac6914a65be923e77
|
File details
Details for the file brilliance_admin-0.43.7-py3-none-any.whl.
File metadata
- Download URL: brilliance_admin-0.43.7-py3-none-any.whl
- Upload date:
- Size: 3.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f71f37ddaeeed2f0d6a9623fe1ba531440c1dd933aa26d6f7c2647291795ccd8
|
|
| MD5 |
e3396064038837baf74e39a21814727e
|
|
| BLAKE2b-256 |
eabede47e9706a86b0963d9badd0745962074982c4000dab1b836ce5873a44e9
|