singhsidhukuldeep / fast-api-template

FastAPI is a high performance simple framework for building APIs(Application Programming Interface).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fast-api-template

FastAPI is a high performance simple framework for building APIs(Application Programming Interface).

It is widely used to write production level API's for ML services.

Setup

Important: More info https://fastapi.tiangolo.com/

  • Linux Systems:

    #sudo pip3 install virtualenv
    
    python3 -m venv ./venv
    
    source venv/bin/activate
    
    pip3 install fastapi uvicorn
    
    #pip3 install -r requirements.txt
    deactivate
  • Windows Systems:

    #pip3 install virtualenv
    
    python3 -m venv ./venv
    
    venv\Scripts\activate
    
    pip3 install fastapi uvicorn
    
    #pip3 install -r requirements.txt
    venv\Scripts\deactivate

    If getting issue on windows, use administrator privileges

Running

  • Using from command line

    python3 app.py

    or

    uvicorn app:app --reload

    or

    uvicorn app:app --host 0.0.0.0 --port 8000 --reload

    or

    uvicorn app:app --host 0.0.0.0 --port 8000 --reload --workers 4

Results

CREDITS

Kuldeep Singh Sidhu

Github: github/singhsidhukuldeep https://github.com/singhsidhukuldeep

Website: Kuldeep Singh Sidhu (Website) http://kuldeepsinghsidhu.com

LinkedIn: Kuldeep Singh Sidhu (LinkedIn) https://www.linkedin.com/in/singhsidhukuldeep/

About

FastAPI is a high performance simple framework for building APIs(Application Programming Interface).

License:MIT License


Languages

Language:Python 100.0%