Giter VIP home page Giter VIP logo

fastapi's Introduction

About The Project

This project about a shopping store.

FastAPI

peewee-orm

jwt token

Introduction

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.

The key features that I like in FastApi are:

Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic). One of the fastest Python frameworks available.

Fast to code: Increase the speed to develop features by about 200% to 300%.

Fewer bugs: Reduce about 40% of human (developer) induced errors.

Easy: Designed to be easy to use and learn. Less time reading docs.

Robust: Get production-ready code. With automatic interactive documentation.

Standards-based: Based on (and fully compatible with) the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.

This Repository is aimed at helping those who are working on e-commerce applications.

Getting Started

Prerequisites

Run the project

1.git clone

    git clone https://github.com/fatemehkhosravy67/fastapi.git

2.create python virtualenv

    python3 -m venv venv

3.active python virtualenv

4.set JWT_SECRET and create an environment file called .env in the base directory: The secret in the environment file should be substituted with something stronger and should not be disclosed. For example: import os import binascii binascii.hexlify(os.urandom(24))

The secret key is used for encoding and decoding JWT strings.

The algorithm value on the other hand is the type of algorithm used in the encoding process.

.env:

JWT_SECRET=deff1952d59f883ece260e8683fed21ab0ad9a53323eca4f

MAIL_USERNAME=Fa

MAIL_PASSWORD=1234@Fa

MAIL_FROM=[email protected]

MAIL_PORT=587

MAIL_SERVER=smtp.gmail.com

MAIL_TLS=True

MAIL_SSL=False

5.install packages

    pip install -r requirements.txt

Usage

    uvicorn main:app --reload

You can visit localhost:8000/docs for swagger.

fastapi's People

Contributors

fatemehkhosravy67 avatar

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.