Overview
FastAPI-Admin 1.0, released on May 1, 2021, is the first stable release of the admin interface for FastAPI built on Tortoise ORM.
Main Features
Tortoise ORM admin
Automatic web admin interface from Tortoise ORM models with built-in CRUD, filters, search, and authentication.
python
from fastapi_admin.app import app as admin_app
from fastapi_admin.resources import Model
from tortoise.models import Model as TortoiseModel
from tortoise import fields
class User(TortoiseModel):
id = fields.IntField(pk=True)
username = fields.CharField(max_length=50)
email = fields.CharField(max_length=200)
# Register model in admin
@admin_app.register
class UserResource(Model):
model = User
fields = ['id', 'username', 'email']
