Skip to content

daudln/fastapi-strawberry-tortoise

Repository files navigation

FastAPI + Strawberry GraphQL + JWT Authentication + Tortoise ORM

Description

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.

Technologies Used

  • 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.

Features

  • 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.

Installation

  1. Clone the repository: git clone https://github.com/daudln/fastapi-strawberry-tortoise.git.
  2. Change directory: cd fastapi-strawberry-tortoise
  3. Create a virtual environment: pipenv shell
  4. Install dependencies: pipenv install

Usage

  1. Configure the env in the .env by copying the .env.example file.
  2. Run the application: python main.py

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for any improvements or features you'd like to see added.

License

MIT License

Acknowledgements

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors