Metadata-Version: 2.4
Name: brilliance-admin
Version: 0.40.0
Summary: General-purpose admin panel backend
License-Expression: AGPL-3.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: asgiref>=3.11.0
Requires-Dist: fastapi>=0.115.8
Requires-Dist: jinja2>=3.1.6
Provides-Extra: example
Requires-Dist: uvicorn>=0.34.0; extra == "example"
Requires-Dist: faker>=38.2.0; extra == "example"
Requires-Dist: pyjwt>=2.10.1; extra == "example"
Requires-Dist: structlog>=25.5.0; extra == "example"
Requires-Dist: rich>=14.2.0; extra == "example"
Provides-Extra: tests
Requires-Dist: pytest>=8.4.2; extra == "tests"
Requires-Dist: pytest-asyncio>=1.2.0; extra == "tests"
Requires-Dist: httpx>=0.28.1; extra == "tests"
Requires-Dist: pytest-mock>=3.15.1; extra == "tests"
Requires-Dist: sqlalchemy>=2.0.41; extra == "tests"
Requires-Dist: aiosqlite>=0.22.1; extra == "tests"
Requires-Dist: factory-boy>=3.3.3; extra == "tests"
Requires-Dist: pyjwt>=2.10.1; extra == "tests"
Provides-Extra: scalar
Requires-Dist: scalar-fastapi>=1.5.0; extra == "scalar"
Dynamic: license-file

# Brilliance Admin Backend

[![PyPI](https://img.shields.io/pypi/v/brilliance-admin)](https://pypi.org/project/brilliance-admin-backend/)
[![License](https://img.shields.io/pypi/l/brilliance-admin-backend)](https://github.com/brilliance-admin/backend-python/blob/main/LICENSE)
[![CI](https://github.com/brilliance-admin/backend-python/actions/workflows/deploy.yml/badge.svg)](https://github.com/brilliance-admin/backend-python/actions)


Brilliance Admin Backend is a backend framework for building admin panels with Python and FastAPI.

- Serves a prebuilt SPA frontend as static files
- Generates schemas for frontend sections on the backend
- Provides a backend-driven API for admin interfaces
- Designed for fast data management and data viewing from any sources
- Inspired by Django Admin and Django REST Framework
- Focused on minimal boilerplate and simplified backend-controlled configuration

## [Live Demo](https://brilliance-admin.com/)

Features:

* Tables with full CRUD support, including filtering, sorting, and pagination.
* Ability to define custom table actions with forms, response messages, and file uploads.
* SQLAlchemy integration with automatic field generation from models.
* Authorization via any account provider.
* Localization support with language selection in the interface.


## Development

``` shell
uv sync --all-groups --all-extras
uv run uvicorn example.main:app --host 0.0.0.0 --port 8082 --reload
```

Tests:
``` shell
uv run pytest
```

Docs:
- `http://0.0.0.0:8082/docs`
- `http://0.0.0.0:8082/redoc`
- `http://0.0.0.0:8082/scalar`

## Docker

``` shell
docker compose -f .configs/docker/docker-compose.yml build
docker compose -f .configs/docker/docker-compose.yml up
docker compose -f .configs/docker/docker-compose.yml run --rm backend /bin/bash -c "uv sync --all-groups --all-extras"
docker compose -f .configs/docker/docker-compose.yml run --rm backend /bin/bash -c "uv run pytest"
```

``` shell
docker exec -it rollyum-backend-1 git config --global --add safe.directory '*'
docker exec -it rollyum-backend-1 uv run pre-commit run --all-files
```
