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.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b165e5c1496abe5360284cfeeee8cb90ae00d03a0f7e9ce6dfc679330e7bfd3 |
|
MD5 | ccfac7cbec4126058f876dbab232ffb8 |
|
BLAKE2b-256 | 113d3803ee9e6ff5a0e5212c3ae63edcc22b36f2db4cce1eec29b24351a277d7 |
Close
Hashes for fastapi_amis_admin_nav-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6781cbe7c20f6cadc96931476392fb70d40bb80530762c6877f7485543dd7e40 |
|
MD5 | 1755289869a012d5e78e8e35cf1a8e08 |
|
BLAKE2b-256 | 2655ec0fbe2f9b2e8c458f1e1b88c2aef50fcc8b722119e536bf3f990a873bea |