2021-04-28 20:34:02 +08:00
2021-04-25 14:29:19 +08:00
2021-01-06 13:40:38 +08:00
2021-03-21 21:26:32 +08:00
2020-04-06 18:21:35 +08:00
2020-08-18 15:52:18 +08:00
2020-09-21 17:50:02 +08:00
2021-02-04 21:53:12 +08:00
2020-11-11 14:17:18 +08:00
2020-06-17 11:40:18 +08:00
2020-09-22 15:28:16 +08:00
2021-04-25 14:29:19 +08:00
2021-04-25 14:29:19 +08:00
2021-04-25 14:29:19 +08:00
2021-04-28 20:34:02 +08:00
2020-07-05 23:51:04 +08:00

FastAPI ADMIN

image image image image

Introduction

FastAPI-Admin is a admin dashboard based on fastapi and tortoise-orm.

FastAPI-Admin provide crud feature out-of-the-box with just a few config.

Screenshots

image

image

image

image

Requirements

  • FastAPI framework as your backend framework.
  • Tortoise-ORM as your orm framework, by the way, which is best asyncio orm so far and I'm one of the contributors😋.

Quick Start

Run Backend

Look full example at examples.

  1. git clone https://github.com/long2ice/fastapi-admin.git.
  2. docker-compose up -d --build.
  3. docker-compose exec -T mysql mysql -uroot -p123456 < examples/example.sql fastapi-admin.
  4. That's just all, api server is listen at http://127.0.0.1:8000 now.

Run Front

See restful-admin for reference.

Backend Integration

> pip3 install fastapi-admin
from fastapi_admin.factory import app as admin_app

fast_app = FastAPI()

register_tortoise(fast_app, config=TORTOISE_ORM, generate_schemas=True)

fast_app.mount('/admin', admin_app)


@fast_app.on_event('startup')
async def startup():
    await admin_app.init(
        admin_secret="test",
        permission=True,
        site=Site(
            name="FastAPI-Admin DEMO",
            login_footer="FASTAPI ADMIN - FastAPI Admin Dashboard",
            login_description="FastAPI Admin Dashboard",
            locale="en-US",
            locale_switcher=True,
            theme_switcher=True,
        ),
    )

Deployment

Deploy fastapi app by gunicorn+uvicorn or reference https://fastapi.tiangolo.com/deployment/.

License

This project is licensed under the Apache-2.0 License.

Description
A fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin
Readme Apache-2.0 7.5 MiB
Languages
Python 50.3%
HTML 48.5%
Makefile 0.7%
Dockerfile 0.5%