This project uses sqlite3, to simplify the development of an SQL database. In production, it is recommended to switch to PostgreSQL or MySQL. To run this project, please make sure you have sqlite3 installed. If you have a macOS, it is installed by default.
- Run
virtualenv venv
(orpython -m virtualenv venv
) - On Linux/macOS,
source venv/bin/activate
, on Windows,venv/bin/activiate
- Install dependencies with
pip install -r requirements.txt
- Run the server with
sanic server.app
(orpython -m sanic server.app
)
You may use a program such as Postman or Insomnia to access the endpoints, which are:
localhost:8000/details GET
localhost:8000/details/<source:(amazon|walmart)>/<source_id:str> GET
localhost:8000/details/<source:(amazon|walmart)>/<source_id:str> PUT
localhost:8000/favorites/<source_id:str> PUT