Day 1: Building a weather data collection system using AWS S3 and OpenWeather API
This project is a Weather Data Collection System that demonstrates core DevOps principles by combining:
- External API Integration (OpenWeather API)
- Cloud Storage (AWS S3)
- Infrastructure as Code
- Version Control (Git)
- Python Development
- Error Handling
- Environment Management
- Fetches real-time weather data for multiple cities
- Displays temperature (°F), humidity, and weather conditions
- Automatically stores weather data in AWS S3
- Supports multiple cities tracking
- Timestamps all data for historical tracking
- Language: Python 3.x
- Cloud Provider: AWS (S3)
- External API: OpenWeather API
- Dependencies:
- boto3 (AWS SDK)
- python-dotenv
- requests
weather-dashboard/ ├── src/ │ ├── init.py │ └── weather_dashboard.py ├── tests/ ├── data/ ├── .env ├── .gitignore └── requirements.txt Copy
-
Clone the repository: --bash git clone https://github.com/ShaeInTheCloud/30days-weather-dashboard.git
-
Install dependencies: bashCopypip install -r requirements.txt
Be Mindful of Python Version pip2 v pip3
If you receive eerrors related to pip, start here
-
https://stackoverflow.com/questions/42870537/zsh-command-cannot-found-pip
-
To accept breaking changes for a one time execution
- Configure environment variables (.env): CopyOPENWEATHER_API_KEY=your_api_key AWS_BUCKET_NAME=your_bucket_name
4.Configure AWS credentials: bashCopyaws configure
- Run the application: python src/weather_dashboard.py
What I Learned
Documentation is key - utilize reference articles to understand what is being manipulated and why Environment variable management for secure API keys Python best practices for API integration Git workflow for project development Error handling in distributed systems Cloud resource management
Future Enhancements
Add weather forecasting Implement data visualization Enter a field that allows user input for cities Create automated testing Set up CI/CD pipeline