Skip to content

Unit Converter is a Streamlit-powered web app for quick and accurate Length, Mass, and Time conversions. Built with Python, Streamlit, and Pint, it offers real-time calculations and a user-friendly interface.

Notifications You must be signed in to change notification settings

MuhammadAdnan1998/Unit_Convertor_Using_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unit Converter 🔄 (Length, Mass, Time)

Overview

The Unit Converter is a Streamlit-based web application that allows users to easily convert between different Length, Mass, and Time units. Built with Python, Streamlit, and Pint, this app provides accurate and efficient unit conversions with a simple and user-friendly interface.

Features

✅ Convert between Length, Mass, and Time units effortlessly
✅ Supports various units such as meters, kilometers, grams, pounds, seconds, hours, etc.
✅ User-friendly interface with dropdown selections for input and output units
✅ Handles errors gracefully for invalid conversions
✅ Built-in custom styling for an enhanced user experience

Technologies Used

  • Python 🐍
  • Streamlit (for the web interface)
  • Pint (for unit conversion)

Installation & Setup

  1. Clone the repository
    git clone https://github.com/yourusername/unit-converter.git
    cd unit-converter
  2. Create a virtual environment (optional but recommended)
    python -m venv env
    source env/bin/activate  # For macOS/Linux
    env\Scripts\activate  # For Windows
  3. Install dependencies
    pip install -r requirements.txt
  4. Run the app
    streamlit run app.py

Usage

  1. Open the Unit Converter web app.
  2. Select a conversion category (Length, Mass, or Time).
  3. Enter the value and choose the "From" and "To" units.
  4. Click to get the converted value instantly!

Supported Units

📏 Length: Meter, Kilometer, Centimeter, Millimeter, Micrometer, Nanometer, Mile, Yard, Foot, Inch
⚖️ Mass: Kilogram, Gram, Milligram, Microgram, Ton, Pound, Ounce
Time: Second, Minute, Hour, Day, Week, Year

Example Conversions

🔹 10 kilometers = 6.2137 miles
🔹 500 grams = 1.1023 pounds
🔹 3600 seconds = 1 hour

License

This project is open-source under the MIT License.

Contact & Contributions

📧 Have suggestions? Want to contribute? Feel free to fork the repo, submit pull requests, or contact me at adnanshaikh84482@gmail.com.

🚀 Happy Converting! 🎉

About

Unit Converter is a Streamlit-powered web app for quick and accurate Length, Mass, and Time conversions. Built with Python, Streamlit, and Pint, it offers real-time calculations and a user-friendly interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages