Currency Conversion is a Python application that retrieves and saves the latest foreign exchange rates from the official website of the National Bank of Kazakhstan. The script extracts data about various currencies, their codes, and current exchange rates, then saves this information into a CSV file for easy access and further processing.
- Real-Time Exchange Rates: Fetches up-to-date currency exchange rates from the official National Bank of Kazakhstan website.
- CSV Export: Saves the retrieved exchange rates into a
currency_rates.csv
file for convenient storage and analysis. - Error Handling: Gracefully handles connection issues and parsing errors to ensure reliable operation.
- Simple and Lightweight: Easy to set up and use with minimal dependencies.
-
Clone the Repository:
git clone https://github.com/yerass11/currency_conversion.git
-
Navigate to the Project Directory:
cd currency_conversion
-
Create a Virtual Environment (Recommended):
python -m venv venv
-
Activate the Virtual Environment:
- Windows:
venv\Scripts\activate
- macOS and Linux:
source venv/bin/activate
- Windows:
pip3 install requests
pip3 install bs4
-
Run the Script to Fetch Exchange Rates:
python3 main.py
-
Output:
After successfully running the script, a
currency_rates.csv
file will be created in the project directory containing the latest exchange rates.
Валюта,Код,Курс
1 ДОЛЛАР США,USD / KZT,487.81
1 ЕВРО,EUR / KZT,527.62
...
git checkout -b feature/YourFeatureName
git commit -m "add(feature) ..."
git push origin feature/YourFeatureName
If you have any questions or suggestions, feel free to reach out via [email protected]