Skip to content

TM-Mehrab-Hasan/modern-currency-converter-using-python

Repository files navigation

๐Ÿ’ฐ Modern Currency Converter

A professional-grade currency conversion application that has evolved from a simple 1st-year Python project into a modern, real-time currency converter with comprehensive global coverage.

Python GUI API Currencies

๐Ÿš€ Quick Start

Prerequisites

pip install requests

Run the Application

python Compact_Modern_Converter.py

๐Ÿ“ Project Structure

Currency Converter/
โ”œโ”€โ”€ ๐Ÿ“„ Compact_Modern_Converter.py    # โญ Main application (recommended)
โ”œโ”€โ”€ ๐Ÿ“„ Currency Converter.py          # ๐Ÿ“š Original 1st year project
โ”œโ”€โ”€ ๐Ÿ“„ currencyData.txt              # ๐Ÿ’พ Offline fallback data
โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt              # ๐Ÿ“ฆ Dependencies
โ””โ”€โ”€ ๐Ÿ“„ README.md                     # ๐Ÿ“– Documentation

โœจ Features Overview

๐ŸŒ Complete Global Coverage

  • 157 live currencies from every major economy
  • Real-time exchange rates updated every 30 minutes
  • Comprehensive regional support including:
    • ๐Ÿ‡บ๐Ÿ‡ธ Major economies (USD, EUR, GBP, JPY, CNY)
    • ๐Ÿ‡ฆ๐Ÿ‡ช Middle Eastern currencies (AED, SAR, QAR, KWD)
    • ๐Ÿ‡ฟ๐Ÿ‡ฆ African currencies (ZAR, NGN, EGP, MAD)
    • ๐Ÿ‡ง๐Ÿ‡ท Latin American currencies (BRL, ARS, MXN, COP)
    • ๐Ÿ‡ธ๐Ÿ‡ช European currencies (SEK, NOK, DKK, PLN, CZK)
    • ๐Ÿ‡น๐Ÿ‡ญ Asian currencies (THB, SGD, MYR, KRW, IDR)
    • ๐Ÿฅ‡ Precious metals (Gold, Silver, Platinum, Palladium)
    • โ‚ฟ Cryptocurrency (Bitcoin)

๐ŸŽจ Modern User Interface

  • Google-inspired design with clean, professional aesthetics
  • Intuitive dropdown menus for easy currency selection
  • Real-time conversion as you type
  • Animated status indicators showing live rate updates
  • Currency symbols for accurate display (โ‚น, $, โ‚ฌ, ยฃ, ยฅ, etc.)
  • Responsive design optimized for desktop use

โšก Smart Features

  • Bidirectional conversion (any currency โ†” any currency)
  • One-click swap button for quick currency exchange
  • Auto-refresh every 30 minutes for live rates
  • Manual refresh for instant updates
  • Offline fallback when internet is unavailable
  • Input validation with helpful error messages

๐Ÿ›ก๏ธ Robust Architecture

  • Thread-safe API calls for non-blocking operation
  • Comprehensive error handling with graceful recovery
  • Smart caching for improved performance
  • Network failure resilience with offline mode
  • Memory-efficient currency data management

๐Ÿ”„ Evolution Timeline

Version Interface Currencies Features Status
Original Console ~12 (INR-based) Basic conversion ๐Ÿ“š Historical
Modern GUI 157+ (Global) Real-time, Bi-directional โญ Current

๐ŸŽฏ Key Improvements

From Console to Professional GUI

  • โŒ Before: Text-based input/output
  • โœ… After: Modern graphical interface with visual feedback

From Limited to Global Coverage

  • โŒ Before: ~12 currencies, INR-centric
  • โœ… After: 157+ currencies, any-to-any conversion

From Static to Real-time

  • โŒ Before: Fixed rates from text file
  • โœ… After: Live API integration with auto-refresh

From Basic to Professional

  • โŒ Before: No error handling, basic validation
  • โœ… After: Comprehensive error handling, input validation, offline fallback

๐ŸŒŸ Technical Highlights

API Integration

# Live rate fetching from exchangerate-api.com
โœ… 157+ currencies automatically detected
โœ… Real-time rate conversion
โœ… Smart error handling and recovery
โœ… Offline fallback capability

Modern UI Components

# Professional interface elements
โœ… Animated status indicators
โœ… Currency dropdown menus with search
โœ… Real-time conversion display
โœ… Responsive layout design
โœ… Professional color scheme

Smart Currency Handling

# Comprehensive currency support
โœ… Major world currencies (USD, EUR, GBP, etc.)
โœ… Regional currencies (AED, SAR, ZAR, etc.)
โœ… Precious metals (Gold, Silver, Platinum)
โœ… Cryptocurrency (Bitcoin)
โœ… Proper currency symbols and formatting

๐Ÿ’ก Usage Examples

Basic Conversion

  1. Enter amount (e.g., 1000)
  2. Select source currency (e.g., Indian Rupee)
  3. Select target currency (e.g., US Dollar)
  4. View instant conversion result

Advanced Features

  • Swap currencies: Click the ๐Ÿ”„ button
  • Refresh rates: Click "๐Ÿ”„ REFRESH" for latest rates
  • Real-time typing: Conversion updates as you type
  • Status monitoring: Check live rate status in header

๐Ÿ”ง Installation & Setup

Method 1: Direct Run

git clone https://github.com/TM-Mehrab-Hasan/modern-currency-converter-using-python.git
cd "modern-currency-converter-using-python"
pip install requests
python Compact_Modern_Converter.py

Method 2: Virtual Environment

python -m venv currency_env
currency_env\Scripts\activate
pip install requests
python Compact_Modern_Converter.py

๐Ÿ“Š Supported Currency Examples

Major Economies

  • ๐Ÿ‡บ๐Ÿ‡ธ USD - US Dollar ($)
  • ๐Ÿ‡ช๐Ÿ‡บ EUR - Euro (โ‚ฌ)
  • ๐Ÿ‡ฌ๐Ÿ‡ง GBP - British Pound (ยฃ)
  • ๐Ÿ‡ฏ๐Ÿ‡ต JPY - Japanese Yen (ยฅ)
  • ๐Ÿ‡จ๐Ÿ‡ณ CNY - Chinese Yuan (ยฅ)

Regional Currencies

  • ๐Ÿ‡ฎ๐Ÿ‡ณ INR - Indian Rupee (โ‚น)
  • ๐Ÿ‡ฆ๐Ÿ‡ช AED - UAE Dirham (ุฏ.ุฅ)
  • ๐Ÿ‡ธ๐Ÿ‡ฆ SAR - Saudi Riyal (๏ทผ)
  • ๐Ÿ‡ฟ๐Ÿ‡ฆ ZAR - South African Rand (R)
  • ๐Ÿ‡ง๐Ÿ‡ท BRL - Brazilian Real (R$)

Special Assets

  • ๐Ÿฅ‡ XAU - Gold (troy ounce)
  • ๐Ÿฅˆ XAG - Silver (troy ounce)
  • โ‚ฟ BTC - Bitcoin
  • ๐Ÿ’Ž XPD - Palladium

๐ŸŽ“ Learning Outcomes

This project demonstrates evolution from basic to advanced programming:

  1. Data Structures: From simple dictionaries to complex currency mapping
  2. API Integration: REST API calls with error handling
  3. GUI Development: Professional interface design with Tkinter
  4. Threading: Non-blocking operations for better UX
  5. Error Handling: Comprehensive exception management
  6. Real-time Processing: Live data integration and display

๐Ÿ† Project Impact

From Academic to Professional

  • Academic Project: Basic currency conversion with file I/O
  • Professional Application: Real-time global currency converter with modern UI

Skills Demonstrated

  • API Integration: Live data fetching and processing
  • GUI Development: Modern interface design principles
  • Error Handling: Robust application architecture
  • User Experience: Intuitive and responsive design
  • Global Awareness: International currency support

๐Ÿค Contributing

Feel free to fork this project and enhance it further! Some ideas:

  • Add currency trend charts
  • Implement historical rate data
  • Add more visual animations
  • Support for cryptocurrency exchanges
  • Mobile-responsive design

๐Ÿ“œ License

This project is open source and available under the MIT License.


๐Ÿ›  Build & Distribution (Windows .exe)

If you want a standalone Windows executable (.exe) so users can run the app without installing Python, use PyInstaller to bundle the app.

  1. Install the build tool (one-time on your build machine):
pip install -r build-requirements.txt
  1. Build a single-file, windowed executable (run from project root):
pyinstaller --onefile --noconsole --add-data "currencyData.txt;." --name "ModernCurrencyConverter" Compact_Modern_Converter.py
  • On Windows the --add-data separator is ; (source;dest). On macOS/Linux use :.
  • The generated executable will be in dist/ModernCurrencyConverter.exe.
  1. Quick distribution checklist
  • Test the EXE on a clean Windows machine (no Python installed).
  • If the app fails to start on another machine, ensure the Visual C++ Redistributable (matching your Python build) is installed.
  • If you need an installer (setup wizard), I can provide an Inno Setup script to bundle the EXE, README and license.
  1. Troubleshooting & Notes
  • PyInstaller may produce harmless DLL warnings during build; check the build/ModernCurrencyConverter/warn-ModernCurrencyConverter.txt file if the EXE doesn't run.
  • If you want to reduce size, consider UPX (optional) or exclude unused packages.
  • For cross-platform builds, build on each target OS (Windows EXE from Windows, macOS app from macOS).

๐Ÿ“ฆ Requirements (runtime & build)

Runtime requirements (for running from source):

requests>=2.25.1

Build-time requirements (for creating the standalone executable):

pyinstaller==6.15.0

About

Real-time currency converter supporting 157+ global currencies with modern GUI design and live API integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published