website.mp4
📝 Contents
- 🌟 Introduction
- 💻 Technologies Used
- ✨ Key Features
- 🗂️ Project Structure
- 🚀 Getting Started
- 🔑 API Key Management
- 🤝 Contributing
- 📧 Contact Information
Welcome to the WeatherWorld Website, a modern, web-based application that provides 🌦️ real-time weather updates and 📅 forecasts for various locations across the globe. Built on the Developer Plan of the OpenWeatherMap API, this application offers users comprehensive weather data through a clean and intuitive interface.
- 🐍 Python: Core language for backend development.
- 🌐 Flask: A minimalistic web framework for Python, powering the backend.
- 🎨 Bootstrap 5: A front-end framework for designing responsive and mobile-first websites.
- 🗄️ SQLite: A lightweight, file-based database system used to store user data and application settings.
- ⚙️ Flask-Migrate: Facilitates database migrations in the Flask application.
- 🛠️ Flask-SQLAlchemy: Adds SQLAlchemy ORM support to Flask, enabling seamless database interactions.
- 📡 Requests: Handles HTTP requests, enabling API communication.
- 📡 Live Weather Data: Get current weather information for any location.
- 📅 Forecasts: Hourly and weekly weather forecasts are available.
- 🎛️ Intuitive Design: User-friendly and responsive UI for easy navigation.
- 🌞 Environmental Insights: Provides additional data like the UV index to promote environmental awareness.
app.py
: The main Flask application file, containing all the routes and application logic.models.py
: Defines the data models for the application.templates/
: Directory housing all HTML templates for the web pages.static/
: Contains static assets such as CSS, JavaScript, and images.requirements.txt
: Lists all Python dependencies required for the project.
To run the project locally, follow these steps:
-
📥 Clone the repository:
git clone [https://github.com/OKihichak/weather_world_website.git] cd weather_world_website
-
⚙️ Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # For Windows use venv\Scripts\activate
-
📦 Install the dependencies:
pip install -r requirements.txt
-
🔧 Configure environment variables: Set the
SECRET_KEY
andOPENWEATHERMAP_API_KEY
in your environment.export SECRET_KEY='your_secret_key_here' export OPENWEATHERMAP_API_KEY='your_openweathermap_api_key_here'
-
▶️ Run the application:python app.py
-
🌐 Access the application: Open your web browser and go to
http://localhost:5000
.
To keep your API keys secure, they should be stored in environment variables rather than hardcoded in your source code. Here’s how to do it:
-
💻 On Unix/Linux/macOS:
export SECRET_KEY='your_secret_key_here' export OPENWEATHERMAP_API_KEY='your_openweathermap_api_key_here'
-
🪟 On Windows:
set SECRET_KEY=your_secret_key_here set OPENWEATHERMAP_API_KEY=your_openweathermap_api_key_here
Always ensure that these keys are excluded from your version control system. 🔒
Contributions are welcome! If you'd like to contribute, please follow these steps:
- 🍴 Fork the repository.
- 🌿 Create a new branch:
git checkout -b feature/YourFeatureName
- 💻 Make your changes and commit them:
git commit -m 'Add YourFeatureName'
- 🚀 Push to the branch:
git push origin feature/YourFeatureName
- 🔄 Open a pull request.
- ✉️ Email: [email protected]
- 💻 GitHub: Oleh Kihichak