{"repo":"teamhide/fastapi-boilerplate","free":true,"listed":false,"github":"https://github.com/teamhide/fastapi-boilerplate","clone":"git clone https://github.com/teamhide/fastapi-boilerplate.git","description":"FastAPI boilerplate for real world production","language":"Python","stars":1491,"topics":["fastapi","python","boilerplate","api","sqlalchemy","asyncio","fastapi-template","fastapi-boilerplate","sqlalchemy-async"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"FastAPI Boilerplate Features - Async SQLAlchemy session - Custom user class - Dependencies for specific permissions - Celery - Dockerize(Hot reload) - Event dispatcher - Cache Run Launch docker Install dependency Apply alembic revision Run server Run test codes Make coverage report Formatting SQLAlchemy for asyncio context Do not use explicit commit() . Transactional class automatically do. Query with asyncio.gather() When executing queries concurrently through asyncio.gather() , you must use the session factory context manager rather than the globally used session. If you do not use a database connection like session.add() , it is recommended to use a globally provided session. Multiple databases Go to core/config.py and edit WRITER DB URL and READER DB URL in the config class. If you need additional logic to use the database, refer to the get bind() method of RoutingClass . Custom user for authentication Note. you have to pass jwt token via header like Authorization: Bearer 1234 Custom user class automatically decodes header token and store user information into request.user If you want to modify custom user class, you have to update below files. 1. core/fastapi/schemas/current user.py 2. core/fastapi/middlewares/authentication.py CurrentUser Simply add more fields based on your needs. AuthBackend After line 18, assign values that you added on CurrentUser . Top-level dependency Note. Available from version 0.62 or higher. Set a callable function when initialize FastAPI() ap","default_branch":null,"files":null,"tree":[],"storefront":"/r/teamhide","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/teamhide/fastapi-boilerplate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}