Skip to content

Mohab209/API-Explorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Explorer 🔍

A simple CLI tool to fetch data from various free APIs and optionally save the results to JSON files.

Features

  • 😂 Get a random joke
  • 🌍 Look up country information:
  • 🌤️ Check current weather in Egyptian cities
  • 💾 Optionally save any result to a JSON file

Installation

git clone https://github.com/Mohab209/API-Explorer.git
cd api-explorer

python -m venv venv

venv\Scripts\activate

pip install -r requirements.txt

Usage

Get a random joke

python explorer.py joke

Look up a country

python explorer.py country egypt
python explorer.py country japan
python explorer.py country brazil

Get the current weather in an Egyptian city

python explorer.py weather Cairo
python explorer.py weather Alexandria

Save Results to a JSON File

Add the --save flag to any command:

python explorer.py country egypt --save
python explorer.py weather Cairo --save
python explorer.py joke --save

Project Structure

api-explorer/
├── clients/
│   ├── joke_client.py
│   ├── country_client.py
│   └── weather_client.py
├── explorer.py
├── requirements.txt
└── README.md

APIs Used


Author

Mohab Ahmed
Data Analyst

About

A simple CLI tool to fetch data from various free APIs and optionally save the results to JSON files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages