HyperAdmin is a framework for building administrative interfaces on top of FastAPI applications. It leverages the power of Pydantic for data validation and HTMX for creating dynamic, modern user interfaces with minimal JavaScript. It is designed to be highly extensible and easy to use, allowing developers to quickly create rich, data-driven admin panels.
- Pydantic-Native: Define your admin interfaces directly from your Pydantic models.
- FastAPI Integration: Mounts seamlessly into any FastAPI application.
- HTMX-Powered: Delivers a rich, interactive user experience without writing complex JavaScript.
- SQLModel & SQLAlchemy Support: Works out-of-the-box with popular database libraries.
- Automatic CRUD: Generates list, detail, create, and update views from your data models.
- Extensible: Easily customize views, templates, and actions to fit your needs.
For a full guide on how to install, configure, and use HyperAdmin, please see the official documentation.
pip install hyperadminfrom fastapi import FastAPI
from hyperadmin.admin import Admin
from hyperadmin.views import ModelView
from sqlmodel import SQLModel, Field
# 1. Define your data model
class Product(SQLModel, table=True):
id: int = Field(default=None, primary_key=True)
name: str
price: float
# 2. Create a FastAPI app
app = FastAPI()
# 3. Create an admin instance and register your model
admin = Admin()
admin.register_model(ModelView(Product))
# 4. Mount the admin to your app
admin.mount_to(app)This will automatically create a full CRUD interface for your Product model at /admin.
Contributions are welcome! Please see the Contributing Guide for more details on how to get started.
Development Environment
This project uses uv for dependency management and poe for task automation.
-
Clone the repository:
git clone https://github.com/yevheniidehtiar/hyper-admin.git cd hyper-admin -
Create and sync the virtual environment:
uv sync --python 3.10 --all-extras
-
Activate the virtual environment:
source .venv/bin/activate -
Install pre-commit hooks:
pre-commit install
Now you're ready to start developing! Run poe to see a list of available tasks.
This project is licensed under the MIT License. See the LICENSE file for details.