Giter VIP home page Giter VIP logo

simplefastapi-jwt's Introduction

FastAPI Production-Level API with JWT Authentication

This project is a simple demonstration of how to build a production-level API using FastAPI with JSON Web Token (JWT) authentication.

Overview

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints. It's easy to use, easy to learn, and highly efficient. JSON Web Tokens (JWT) are an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.

In this project, we'll create a FastAPI application that includes JWT-based authentication to secure our endpoints.

Features

  • FastAPI: Utilizing the power of FastAPI for efficient API development.
  • JWT Authentication: Implementing JWT-based authentication to secure endpoints.
  • Production Ready: Demonstrating best practices for building a production-level API.

Installation

  1. Clone the repository:

    git clone https://github.com/pygodzilla/SimpleFastAPI-JWT.git
    cd SimpleFastAPI-JWT
  2. Install dependencies:

    python3 -m venv .pyenv
    source .pyenv/bin/activate
    pip3 install -r requirements.txt

Usage

  1. Run the FastAPI application:

    • By default FastAPI runs at 8000, you can change it to another port using --port flag followed by the port number
    uvicorn main:app --reload
  2. Access the API documentation at http://localhost:8000/docs to explore available endpoints and interact with them.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the GPL-3 License - see the LICENSE file for details.

simplefastapi-jwt's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.