Skip to content

Suraj-Gond/Country_info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Country Info Search Web App

A clean and interactive web application that allows users to search for detailed information about any country. This project provides a seamless interface to fetch geographical and demographic data using the REST Countries API and visualizes locations via Google Maps.


📷 Screenshots

Homepage

Result Page


🚀 Features

  • Instant Search: Search for any country by its common or official name.
  • Comprehensive Data: Displays the country's full name, capital city, region, and formatted population.
  • Visual Identity: Dynamically fetches and displays the official country flag.
  • Interactive Mapping: Integrated Google Maps API provides a real-time map view of the country's coordinates.
  • Responsive UI: Built with Bootstrap and Font Awesome icons for a professional, mobile-friendly look.
  • Error Handling: Custom feedback for empty searches, invalid country names, or API connection issues.

🛠️ Tech Stack


📂 Project Structure

Country_info/
├── static/              # CSS, Images (banner, logo), and JS
├── templates/           # HTML templates (index.html, result.html)
├── app.py               # Main Flask application & API logic
├── .env                 # Environment variables (API Keys)
├── .gitignore           # Files to be ignored by Git (venv, .env)
└── README.md            # Project documentation

📦 Installation & Setup

1. Clone the repository

git clone [https://github.com/Suraj-Gond/Country_info.git](https://github.com/Suraj-Gond/Country_info.git)

Navigate to Project directory

cd Country_info

2. Create a virtual environment

python -m venv venv

Activate Virtual Enviroment on Windows:

.\venv\Scripts\activate

Activate Virtual Enviroment on Mac/Linux:

source venv/bin/activate

3. Install dependencies

pip install flask requests python-dotenv

4. Configuration

Create a .env file in the root directory to store your Google Maps API Key safely:

GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here

5. Run the App

python app.py

Open your browser and go to http://127.0.0.1:5000.


🛡️ License

Distributed under the MIT License.

Releases

No releases published

Packages

 
 
 

Contributors