Custom Wine API with Flask and PostgreSQL
In this project, I developed a custom API to interact with a database holding information about wines, wineries, wine ratings, and related data. The primary steps for creating API included:
- Creating Database: Before anything, I established a PostgreSQL database, defining tables for wineries, wines, ratings, and harmonizers using SQL commands.
- API Endpoints: Created endpoints for accessing data on wineries, wines, ratings, and harmonizerss..
- Wineries: Endpoint that provides data about wineries.
- Wine: Endpoint that provides data about wines.
- Ratings: Endpoint that provides data about ratings.
- Harmonizer: Endpoint that provides data about snacks for wines.
- Executing Database Queries: For each endpoint, I created SQL queries to retrieve data in to the JSON format from the database.
- Deployment Preparation: Finally, I prepared the API for deployment, including a Dockerfile to containerize the API for it to be easily deployed and run in various environments
Technologies used
- Python
- Flask
- Docker