- Step 1: Create Python Virtual Environment, name
env(on MacOS)
python3 -m venv env- Step 2: Activate/Deactivate Virtual Environment on the Terminal
source env/bin/activate
#to deactivate
deactivate- Step 3: Once the Virtual Enviroment is activated, install packages & dependency
| Package | Command |
|---|---|
| Fast API (Not recommended) | pip install fastapi[all] all: to include installing all dependencies along with FastAPI package |
| Fast API (Production) | pip install fastapi uvicorn[standard] uvicorn to work as the serve |
| List installed packages | pip freeze |
- Step 4: Start Fast API server
uvicorn app.main:app --reload- API documentation: http://127.0.0.1:8000/docs or http://127.0.0.1:8000/redoc
Redisdatabase is used as a brokerCeleryis used to create workers that perform the extraction.
200HTTP 200 OK success status response code indicates that the request has succeeded202HTTP Status 202 indicates that the request has been accepted for processing, but the processing has not been completed.