Morning Briefing is a Python-based daily digest that collects weather, news, motivational quotes, and a morning song, then sends it directly to your email (or Telegram).
The project fetches data from public APIs, formats it nicely, and delivers it automatically — a little helper to start your day informed and motivated.
- 🌤️ Weather: Current weather, temperature, min/max.
- 📰 News: Top headline from News API.
- 💬 Quote: Random motivational quote.
- 🎶 Song: Random jazz track from Last.fm.
- 📩 Delivery: Sends a nicely formatted message to your email.
app/
├─ api_client.py # fetch_data functions
├─ config.py # API keys, coordinates
├─ formatter.py # format responses to readable text
├─ messenger.py # email/Telegram sending
main.py # main entry point
.env # environment variables (API keys, email)
requirements.txt # Python dependencies
- Clone the repo:
git clone https://github.com/yourusername/morning-briefing.git
cd morning-briefing- Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate # Linux/Mac
.venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt- Add your
.envfile with API keys and email credentials:
EMAIL=your_email@gmail.com
PASS=your_email_password
LAT=42.15
LON=24.75
WEATHER_API=your_openweather_api_key
NEWS_API=your_newsdata_api_key
MUSIC_API=your_lastfm_api_keyRun the main script:
python main.pyThe script will fetch data from all sources, format it, and send it to the configured email address.
You can schedule it using cron (Linux/Mac) or Task Scheduler (Windows) to run automatically every morning.
Tests are written with pytest. Run them with:
pytest -vLint your code with flake8:
flake8 app tests --max-line-length=100 --ignore=E203,W503You can containerize the app with Docker for easier deployment. Create a Dockerfile and docker-compose.yml to run the app with all dependencies preinstalled.
This project is licensed under the MIT License.