This is a simple weather application that ingests weather data, stores it in a SQLite database, and exposes it via a REST API.
- Python 3.7 or higher
- Docker
- Kubernetes
-
Clone the repository:
-
Install the required Python packages:
pip3 install -r requirements.txt
- Create the database tables:
make create-tables
- Ingest data into the database:
WX_DATA_DIRECTORY=/path/to/weather/data && make ingestion-job
- Analyze the data:
make data-analysis
- Build and deploy the application to Kubernetes:
make sure your kubectl is configured to point to the cluster where you want to deploy the application to
make deploy
This will build a Docker image, push it to an AWS ECR repository, and deploy the application to a Kubernetes cluster. The Kubernetes deployment will be configured using the prod.env file.
The REST API exposes the following endpoints:
/api/weather: Retrieve weather data./api/weather/stats: Retrieve weather statistics.
Both endpoints support filtering by date and station ID using query parameters. Data is returned in JSON format
The REST API includes an automatically generated Swagger/OpenAPI endpoint that provides documentation for the API. This is accessible at the following URL:
http://localhost:5000/apidocs/
This project is licensed under the MIT License. See the LICENSE file for details.