An open API service indexing awesome lists of open source software.

https://github.com/andredisa/pythondevhub

🐍 This repository includes three command-line tools that integrate with real-world APIs to fetch data, visualize it, and interact with the user through practical examples.
https://github.com/andredisa/pythondevhub

api educational-project matplotlib-python newsapi openrouteservice openstreetmap openwheatherapi projects python

Last synced: 14 days ago
JSON representation

🐍 This repository includes three command-line tools that integrate with real-world APIs to fetch data, visualize it, and interact with the user through practical examples.

Awesome Lists containing this project

README

          

# 🐍 Python API Projects Collection

Welcome to my collection of **Python projects**! πŸŽ“

> This repository includes three command-line tools that integrate with real-world APIs to fetch data, visualize it, and interact with the user through practical examples. Each project focuses on a specific domain β€” **news**, **travel**, and **finance** β€” and is ideal for learning how to work with APIs, parse JSON, and organize Python code.

---

## πŸ“¦ Project Overview

### 1. πŸ“° News Aggregator
**Folder:** `newsApi/`

Fetch and explore the latest headlines from around the world using the [NewsAPI.org](https://newsapi.org/) service.

- 🌍 Top headlines by country or language
- πŸ” Keyword or topic search
- πŸ“… Filter by date range
- 🌟 Sort by popularity or domain
- πŸ“– View full article content

> πŸ”§ Technologies: **Python 3**, `requests`, **NewsAPI**

> πŸ“Œ Concepts: `REST API`, `HTTP parameters`, `JSON parsing`, `OOP`, `CLI`

---

### 2. 🌍 Route Planner + Weather Forecast
**Folder:** `calcKmPrevisione/`

Plan a multi-stop trip and get live weather info at each destination. Calculates distance and estimated travel time.

- πŸ—ΊοΈ Add and validate multiple locations
- 🧭 Calculates distances and travel time between stops
- 🌦️ Fetches current weather using OpenWeatherMap
- πŸ” Ensures at least two locations before building a route
- πŸ“ˆ Displays totals at the end

> πŸ”§ Technologies: **Python 3**, `requests`, `OpenStreetMap`, `OpenRouteService`, `OpenWeatherMap`

> πŸ“Œ Concepts: `Multi-API integration`, `modular Python`, `data aggregation`, `CLI input`

---

### 3. πŸ“ˆ Stock Price Visualizer
**Folder:** `graficoFinanza/`

Visualize a stock’s daily **Open** and **Close** prices for a selected month and year with a beautiful line graph.

- πŸ—“οΈ User input for month, year, and stock symbol
- πŸ“Š Graphs daily Open/Close prices
- βœ… Validates stock symbols and dates
- πŸ”’ API key handled via config file
- πŸ–ΌοΈ Line plot with `matplotlib`

> πŸ”§ Technologies: **Python 3**, `matplotlib`, `requests`, **Polygon.io**

> πŸ“Œ Concepts: `API interaction`, `data visualization`, `OOP`, `config management`

---

## πŸŽ“ Shared Learning Objectives

Each project is designed to help you:

- βœ… Understand and integrate REST APIs
- 🧾 Parse and process JSON responses
- 🧱 Structure Python projects using classes and modules
- πŸ“Š Visualize or display real-world data
- 🧠 Handle user input in CLI environments

---

## πŸ› οΈ Setup Instructions

> Each project is standalone. Follow individual project READMEs for detailed API setup and usage.

### πŸ”ƒ Common Dependencies

Install core dependencies using:

```bash
pip install requests matplotlib
```

**⚠️ Note: You’ll need to get free API keys from the respective services (NewsAPI, OpenWeatherMap, OpenRouteService, Polygon.io) and add them in config files or directly in the code (as instructed).**

---

## πŸš€ Ideas for Future Improvements
- πŸ–ΌοΈ Add GUI versions with Tkinter or Flask

- πŸ’Ύ Save outputs (JSON, text, plots) to local files

- πŸ” Move API keys to .env and use python-dotenv

- πŸ§ͺ Add unit tests for key components

- 🌐 Convert CLI projects into web apps

---

## ⚠️ Disclaimer
`These projects are for educational purposes only. Data may be subject to rate limits and may not be suitable for real-time or commercial use.`

---

## β˜• Support Me

If you find my work useful and would like to support me, you can buy me a coffee! Your support helps me keep creating and improving my projects. Thank you! 😊

Buy Me A Coffee

---

### πŸ‘¨β€πŸ’» Happy coding and have fun exploring APIs with Python!