This Python application creates a user-friendly interface for converting currencies. Users can select a currency from a dropdown menu, enter an amount, and choose whether to convert to Rial. The application fetches the exchange rate from a specified website and displays the converted amount.
- Convert between multiple currencies
- Convert to Rial (optional)
- User-friendly PyQt5 GUI
- Python 3
- PyQt5
- requests
-
Clone this repository.
-
Install the required libraries:
pip install PyQt5 requests
-
Open a terminal in the project directory.
-
Run the following command:
python currency_converter.py
The code for this application is in the currency_converter.py
file. It uses the PyQt5 library to create the graphical user interface (GUI). The GUI consists of a dropdown menu for selecting the currency, a text box for entering the amount, a checkbox for converting to Rial, and a button for converting the currency.
When the user selects a currency and enters an amount, the application fetches the exchange rate from a website using the requests
library. The application then converts the amount to the selected currency (or Rial, if checked) and displays the converted amount in the result label.
- Fork the repository.
- Make changes to the code.
- Create a pull request.
This project is licensed under the MIT License.
Note: The current implementation uses a placeholder function gheymat
for currency conversion. You'll need to replace it with your actual logic that considers the fetched exchange rate and the convert_to_rial
checkbox state.
This README file provides a clear overview of your application, its features, requirements, installation instructions, explanation of functionality, contribution guidelines, and a licensing statement.