All Projects → heyfavour → vue-element-admin-fastapi

heyfavour / vue-element-admin-fastapi

Licence: MIT license
vue-element-admin-fastapi

Programming Languages

Vue
7211 projects
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
HTML
75241 projects
SCSS
7915 projects
shell
77523 projects

Projects that are alternatives of or similar to vue-element-admin-fastapi

FastAPI Tortoise template
FastAPI - Tortoise ORM - Celery - Docker template
Stars: ✭ 144 (-0.69%)
Mutual labels:  celery, fastapi
Flask Full
starter/boilerplate flask application with celery, mongoengine, signals, shell commands, swagger api docs and sphinx docs integration
Stars: ✭ 117 (-19.31%)
Mutual labels:  socket-io, celery
Tplan
😃 T计划 是一个集成了任务队列、进程管理、爬虫部署、服务可视化监控、数据展示、在线编码、远程部署的通用系统。
Stars: ✭ 59 (-59.31%)
Mutual labels:  celery, fastapi
FastAPI-Full-Stack-Samples
The API Application Development using Python FastAPI, including interactive API documentation
Stars: ✭ 61 (-57.93%)
Mutual labels:  socket-io, fastapi
guane-intern-fastapi
FastAPI-PostgreSQL-Celery-RabbitMQ-Redis bakcend with Docker containerization
Stars: ✭ 54 (-62.76%)
Mutual labels:  celery, fastapi
fastapi
基于Fastapi开发,集成Celery-redis分布式任务队列、JWT 用户系统、ElasticSearch和encode orm的基础项目模板,大家可以根据自己的需求在本模板上进行修改
Stars: ✭ 75 (-48.28%)
Mutual labels:  celery, fastapi
Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+5165.52%)
Mutual labels:  celery, fastapi
python react blog back end
Redis Celery Fabric Gunicorn Personal Blog
Stars: ✭ 12 (-91.72%)
Mutual labels:  socket-io, celery
fastapi-celery-redis-rabbitmq
A simple docker-compose app for orchestrating a fastapi application, a celery queue with rabbitmq(broker) and redis(backend)
Stars: ✭ 81 (-44.14%)
Mutual labels:  celery, fastapi
Stack-Lifecycle-Deployment
OpenSource self-service infrastructure solution that defines and manages the complete lifecycle of resources used and provisioned into a cloud! It is a terraform UI with rest api for terraform automation
Stars: ✭ 88 (-39.31%)
Mutual labels:  celery, fastapi
yomomma-apiv2
REST-API using FastAPI for Python that gives a 'yo momma' joke
Stars: ✭ 30 (-79.31%)
Mutual labels:  fastapi
fastapi-zeit-now
A simple example of deploying FastAPI as a Zeit Serverless Function
Stars: ✭ 24 (-83.45%)
Mutual labels:  fastapi
fastapi-users
Ready-to-use and customizable users management for FastAPI
Stars: ✭ 1,920 (+1224.14%)
Mutual labels:  fastapi
fastapi-sso
FastAPI plugin to enable SSO to most common providers (such as Facebook login, Google login and login via Microsoft Office 365 Account)
Stars: ✭ 19 (-86.9%)
Mutual labels:  fastapi
django-fastapi-docs
Django、FastAPI、MySQL、Mongodb、Redis、Devops、Nginx、Vue、Docker、Supervisor、Celery
Stars: ✭ 41 (-71.72%)
Mutual labels:  fastapi
fastapi-lazy
Lazy package to start your project using FastAPI✨
Stars: ✭ 84 (-42.07%)
Mutual labels:  fastapi
django-sqs-celery-template
An effortlessly pre configured Django, Celery and SQS template repository for those who want to process asynchronous background tasks.
Stars: ✭ 35 (-75.86%)
Mutual labels:  celery
fastapi-mvc
Developer productivity tool for making high-quality FastAPI production-ready APIs.
Stars: ✭ 131 (-9.66%)
Mutual labels:  fastapi
angular2-sails
An angular module for using the sails socket.io api in angular2 (@angular)
Stars: ✭ 37 (-74.48%)
Mutual labels:  socket-io
v chat sdk
official sdk for v chat this is a complete chat ecosystem use flutter for clint node js and socket io for server side flutter chat v chat sdk and flutter group chat
Stars: ✭ 25 (-82.76%)
Mutual labels:  socket-io

vue-element-admin-fastapi

vue-element-admin-fastapi

frontend:vue-element-admin
backend:fastapi and Full Stack FastAPI and PostgreSQL

root:[vue-element-admin-fastapi]
|--frontend		#vue-element-admin
|--backend
|      |--app
|      |      |--alembic	#alembic
|      |      |--app
|      |      |      |--api
|      |      |      |      |--api_v1
|      |      |      |      |      |--api.py
|      |      |      |      |      |--endpoints
|      |      |      |      |      |--report	#excel export api 敏捷开发 
|      |      |      |      |      |      |--gen_excel.py
|      |      |      |      |      |      |--gen_report.py
|      |      |      |      |      |      |--report
|      |      |      |      |      |      |--__init__.py
|      |      |      |      |      |--system
|      |      |      |      |      |--websocket	#python-socketio,异步类视图区分命名空间
|      |      |      |      |      |      |--server.py
|      |      |      |      |--deps.py
|      |      |      |--celery_app	#celery
|      |      |      |      |--celery_app.py
|      |      |      |      |--worker
|      |      |      |      |      |--example.py
|      |      |      |--core
|      |      |      |      |--config.py
|      |      |      |      |--security.py
|      |      |      |--crud
|      |      |      |--db
|      |      |      |      |--base.py
|      |      |      |      |--session.py
|      |      |      |--extensions
|      |      |      |      |--exception.py	#全局异常捕获 暂时没有使用的需要,所以没用
|      |      |      |      |--logger.py	#替代原来的日志
|      |      |      |      |--request_id.py	#日志全链路追踪
|      |      |      |      |--utils.py		#utils 主要使用了其中的list_to_tree
|      |      |      |--initial_data.py		#初始化数据
|      |      |      |--main.py
|      |      |      |--middleware			#中间件
|      |      |      |      |--access_middle.py		#中间件 登陆日志
|      |      |      |--models		#models 	Table
|      |      |      |--schemas		#schemas	Pydantic
|      |      |      |--tests
|      |      |      |--__init__.py
|      |      |--pyproject.toml		#项目所需要的包
|      |      |--scripts
|--logs				#日志路径
|      |--backend
|      |--celery

socket.io

frontend:socket.io-client
backend:python-socketio
前后端版本兼容请去官网检查,我使用的已经是最新的版本
前端:socket.io-client version 3.X
后端:python-socketio version 5.X

celery

celery-redis
start celery:sh backend\app\worker-start.sh
you can use swagger : http://49.235.242.224:8080/docs api:/utils/test-celery try send email by celery,just post your email address

middleware

EXCEL敏捷开发

axios发送get请求携带token,通过访问header['content-disposition']获取文件名(需要后端设置Access-Control-Expose-Headers)

frontend:frontend\vue-element-admin-fastapi\frontend\src\utils\ruoyi.js function download backend:backend\app\app\api\api_v1\report\__init__.py

DEMO:http://49.235.242.224:9527/

开发规则整理:

1.模块化
2.router.include_router下对根路由的RESTFUL请求需要结尾加"/",这个需要前端配合,其他都不需要加"/"

如何快速本地启动

python packages
cd vue-element-admin-fastapi\backend\app
pip install -r requirements.txt
ip及数据库连接
frontend
#websocket连接的ip
vue-element-admin-fastapi\frontend\src\views\monitor\server\index.vue 
#开发环境连接的后端ip
vue-element-admin-fastapi\frontend\.env.development	
#生产环境连接的后端ip
vue-element-admin-fastapi\frontend\.env.production	

backend
#alembic的数据库连接
vue-element-admin-fastapi\backend\app\alembic\env.py
#后端的数据库连接
vue-element-admin-fastapi\backend\app\app\core\config.py
#celery的数据库连接
vue-element-admin-fastapi\backend\app\app\celery_app\celery_app.py
数据准备

vue-element-admin-fastapi\backend\app\prestart.sh

#检查数据库连接
python /app/app/db_pre_start/backend_pre_start.py
#alembic初始化本地表结构
alembic revision --autogenerate -m "first commit"
alembic upgrade head
#初始化数据
python /app/app/initial_data.py
开发环境启动
frontend:npm run dev
backend:python main.py
celery:见启动脚本

联系方式:

QQ:619511821

其他

日志统计

私下用两台服务器搭了hadoop+hive+spark。log存到了hive中并用spark统计了访问频率,使用airflow进行任务调度
但是考虑到项目简洁纯粹,所以并没有提交。
把结果放到了生产,给大家看看结果,尤其是异常API访问,看看经常被扫描的API有哪些

TODO

计划今年升级到sqlalchemy1.4

待框架解决问题

中间件日志记录参数问题
uvicorn ->app(revice,send) -> receive = queue.get()->api(revice)->send
以上是请求流程,如果在中间件中使用request.body() or reqeust.receive 就会导致queue中的参数被消耗掉,导致中间件的call_next block
有人采用重写reqeust.receive的办法,但是这种办法会导致streambody or 巨大的body无法获取的问题(框架通过more body = True 多次receive,重写后循环获取无法停止)。
fastapi作者尝试在apirouter中记录参数日志。但是个人觉得这种方法很不python,所以暂不采用。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].