dependabot[bot] cee2c5843e Bump starlette from 0.26.1 to 0.27.0
Bumps [starlette](https://github.com/encode/starlette) from 0.26.1 to 0.27.0.
- [Release notes](https://github.com/encode/starlette/releases)
- [Changelog](https://github.com/encode/starlette/blob/master/docs/release-notes.md)
- [Commits](https://github.com/encode/starlette/compare/0.26.1...0.27.0)

---
updated-dependencies:
- dependency-name: starlette
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-17 13:43:26 +08:00
2023-05-11 15:20:57 +08:00
2023-05-03 17:10:55 +08:00
2023-04-19 11:05:49 +08:00
2023-04-24 13:44:32 +08:00
2023-05-11 15:20:57 +08:00
2023-04-19 11:05:49 +08:00

FastAPI Best Architecture

This is a base project of the FastAPI framework.

Its purpose is to allow you to develop your project directly with it as your base project

Support python3.10 and above

Skill

  • FastAPI
  • Pydantic
  • SQLAlchemy
  • Alembic
  • MySQL
  • Redis
  • APScheduler
  • Docker

Clone

git clone https://github.com/wu-clan/fastapi_best_architecture.git

Use:

1Tradition

  1. Install dependencies

    pip install -r requirements.txt
    
  2. Create a database fba, choose utf8mb4 encode

  3. Install and start Redis

  4. create a .env file in the backend/app/ directory

    cd backend/app/
    touch .env
    
  5. Copy .env.example to .env and view backend/app/core/conf.py, update database configuration information

  6. Perform a database migration alembic

    cd backend/app/
    
    # Generate the migration file
    alembic revision --autogenerate
    
    # Perform the migration
    alembic upgrade head
    
  7. Execute the backend/app/main.py file startup service

  8. Browser access: http://127.0.0.1:8000/v1/docs


2Docker

  1. Run the one-click start command in the directory where the docker-compose.yml file is located

    docker-compose up -d --build
    
  2. Wait for the command to finish automatically

  3. Browser access: http://127.0.0.1:8000/v1/docs

Init the test data

Execute the backend/app/init_test_data.py file

Test

Perform tests via pytest

Tip: Before the test starts, please execute init the test data first, also, the fastapi service needs to be started

  1. First, go to the app directory

    cd backend/app/
    
  2. Execute the test command

    pytest -vs --disable-warnings
    
Description
FastAPI Best Architecture is an enterprise-grade backend architecture solution built with FastAPI. FastAPI 最佳架构是使用 FastAPI 构建的企业级后端架构解决方案
Readme MIT 9.4 MiB
Languages
Python 96.8%
Jinja 2.2%
HTML 0.5%
Dockerfile 0.3%
Shell 0.1%