A very currency convertor
Project description
# CurrencyConverter - Python Package for Exchange Rates
This Python package provides a CurrencyConverter class to retrieve exchange rates and convert amounts between different currencies.
## Features:
Fetches live exchange rates from a reputable API.
Converts currency amounts based on retrieved rates.
Handles errors for invalid API responses and missing currencies.
## Installation:
Install the package using pip:
`bash pip install ks-currency-converter ` ## Usage:
Import the CurrencyConverter class:
`bash import ks_currency_converter `
## Create an instance of CurrencyConverter with your API key (replace with your own): `bash converter = ks_currency_converter.CurrencyConverter("YOUR_API_KEY") `
Obtain a free API key from the currency exchange API provider {ExchangeRate-API}.
## Get the exchange rate for a specific currency pair: `bash usd_to_eur_rate = converter.get_exchange_rate("USD", "EUR") print(f"1 USD is equal to {usd_to_eur_rate} EUR") ` ## Convert an amount between currencies: `bash amount_to_convert = 100 converted_amount = converter.convert(amount_to_convert, "USD", "JPY") print(f"{amount_to_convert} USD is equal to {converted_amount} JPY") `
## API Key: You need a valid API key from a currency exchange API provider to use this package. The provided example key (5ea8fd42252121cf83a4738d) is for demonstration purposes only and may not be functional.
## Development and Testing: This package offers basic functionality and error handling. Consider these points for further development:
## Implement caching for retrieved exchange rates. Add unit tests to ensure code functionality. ## Contributing: We welcome contributions to improve this package. Feel free to submit pull requests with enhancements or bug fixes.
Change Log
0.0.1 (27/06/2024)
First Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ks_currency_convertor-0.0.1.tar.gz.
File metadata
- Download URL: ks_currency_convertor-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ace0bc529a6469d48254b0342baabf086f58f5216bad7514693a695c0aaa2fc5
|
|
| MD5 |
bebeb981a4f0cca45d9901e6bb98b84f
|
|
| BLAKE2b-256 |
b37e598682be176d9f8e7f96da3457e8023b962b892630370607f2c3de152d12
|