This project is a template for building a fast and secure web application using FastAPI, Strawberry GraphQL, JWT authentication with RS256 algorithm, and Tortoise ORM. It provides a solid foundation for developing scalable and efficient backend services.
- FastAPI: FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
- Strawberry GraphQL: Strawberry is a new GraphQL library for Python 3.7+ that is designed to be easy to use, type-safe, and highly performant.
- JWT Authentication with RS256: JSON Web Tokens (JWT) is used for secure authentication, with RS256 (RSA Signature with SHA-256) as the hashing algorithm.
- Tortoise ORM: Tortoise ORM is an easy-to-use asyncio ORM inspired by Django ORM, built with relations in mind and suitable for high-performance applications.
- Integration of FastAPI, a fast and secure asynchronous web framework, for building APIs with Python 3.7+.
- Integration of Strawberry GraphQL for creating GraphQL APIs.
- Secure JWT authentication for user authentication and authorization.
- Seamless integration with Tortoise ORM for database operations.
- Flexible and scalable architecture for building complex web applications.
- Clone the repository:
git clone https://github.com/daudln/fastapi-strawberry-tortoise.git. - Change directory:
cd fastapi-strawberry-tortoise - Create a virtual environment:
pipenv shell - Install dependencies:
pipenv install
- Configure the env in the
.envby copying the.env.examplefile. - Run the application:
python main.py
Contributions are welcome! Please feel free to submit pull requests or open issues for any improvements or features you'd like to see added.