FastAPI-Amis-Admin-Nav是一个基于FastAPI-Amis-Admin并且为FastAPI-Amis-Admin提供可视化导航页面管理的拓展库.
Project description
项目介绍
FastAPI-Amis-Admin-Nav
FastAPI-Amis-Admin-Nav是一个基于FastAPI-Amis-Admin并且为FastAPI-Amis-Admin提供可视化导航页面管理的拓展库.
fastapi-amis-admin-nav
是一个基于FastAPI-Amis-Admin并且为FastAPI-Amis-Admin提供可视化导航页面管理的拓展库.
安装
pip install fastapi-amis-admin-nav
简单示例
from fastapi import FastAPI
from fastapi_amis_admin.admin.settings import Settings
from fastapi_amis_admin.admin.site import AdminSite
from fastapi_amis_admin_nav.admin import NavPageAdmin
from sqlmodel import SQLModel
# 创建FastAPI应用
app = FastAPI()
# 创建AdminSite实例
site = AdminSite(settings=Settings(database_url_async='sqlite+aiosqlite:///amisadmin.db'))
# 注册导航页面管理
site.register_admin(NavPageAdmin)
# 挂载后台管理系统
site.mount_app(app)
# 创建初始化数据库表
@app.on_event("startup")
async def startup():
# 创建数据库表
await site.db.async_run_sync(SQLModel.metadata.create_all, is_session=False)
# 运行后台管理系统启动事件
await site.fastapi.router.startup()
if __name__ == '__main__':
import uvicorn
uvicorn.run(app, debug=True)
界面预览
- Open
http://127.0.0.1:8000/admin/
in your browser:
许可协议
fastapi-amis-admin
基于Apache2.0
开源免费使用,可以免费用于商业用途,但请在展示界面中明确显示关于FastAPI-Amis-Admin的版权信息.
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
Close
Hashes for fastapi_amis_admin_nav-0.0.4a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 007a4afe72e827b659b8852bf0bb7a29d4db40d1c8f93a38e16116da40a30c77 |
|
MD5 | 971a88ffd264a6d84a571f8b7cc3cdf4 |
|
BLAKE2b-256 | 81792ebc90dd52a073a3c6ab2f23be95a9c98c84adef494760754ec465a587b1 |
Close
Hashes for fastapi_amis_admin_nav-0.0.4a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1cfa2aba89dfd7edbd1da0392d8e53379cc3eae7d6386a268205f3f9c592fa9 |
|
MD5 | 87b92b6a0800bfb5efc29c7aebfe6262 |
|
BLAKE2b-256 | e52fe4c333b43c9c2e64142566b6a371cbc8f0496af335fd1f3b92aa70b801db |