CRUD operations are supported in echo service which creates mock endpoints
- Each request is validated using the pydantic models
- On being valid data is passed on to the database.
- Database for local is sqlite but also, supports AWS based postgres DB.
- IAAC is terraform whose files are included in .tf folder.
- Create a virtual env with command -> python3 -m venv venv
- Activate the virtual env with comand -> source venv/bin/activate
- Install the libraries with command -> pip install -r requirements.txt
- If planning to use with local SQLlite db then no changes required goto step 11
- If planning to use AWS postgres db then follow steps 6-10
- Goto .tf folder and hit terraform init after adding AWS keys
- Type the command terraform apply
- Hit Yes when asked to authorize
- Take the endpoint shown on the console and change POSTGRES_DATABASE_URL in settings.py
- Change DATABASE_LOCAL in settings.py to False
- Run with command -> uvicorn main:app --reload
- Now hit the API you should be able to use it