Simple Currency Converter
A simple Python package for currency conversion using the Currency API.
Installation
pip install simple_currency_converter
Usage
As a Python module
from simple_currency_converter import convert
# Convert 100 USD to AUD
result = convert("usd", "aud", 100)
print(f"100 USD = {result:.2f} AUD")
Available currencies
You can access currency code dictionaries:
from simple_currency_converter import common_codes, crypto_codes, all_codes
# Print available common currencies
print(common_codes)
As a command-line tool
Basic conversion:
currency-convert usd aud 100
This will output something like:
100.0 USD = 152.34 AUD
List available currencies:
# List common currencies
currency-convert --list-common
# List cryptocurrency codes
currency-convert --list-crypto
# List all supported currencies
currency-convert --list-all
Development
Running tests
The project includes a comprehensive test suite using pytest. To run the tests:
- Clone the repository
- Install the package in development mode:
# Install package in development mode
pip install -e .
# Install test dependencies
pip install pytest pytest-cov
- Run the tests:
# Run all tests
pytest
# Run tests with coverage report
pytest --cov=simple_currency_converter
GitHub Actions
This project uses GitHub Actions for continuous integration. Tests are automatically run on push and pull requests to the main branch, across multiple Python versions.
License
MIT
Metadata
Release files for simple-currency-converter 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simple_currency_converter-0.1.2.tar.gz | 7.7 kB | Without provenance | Details for simple_currency_converter-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_currency_converter-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for simple_currency_converter-0.1.2-py3-none-any.whl |
Total release size: 15.1 kB
Release files / simple_currency_converter-0.1.2.tar.gz
| Download URL | simple_currency_converter-0.1.2.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b936149f34e3b7cbadb853c5951e5afaedb06a0c5441fbda7b6423a30611be5e
|
|
BLAKE2b-256 checksum How to use checksums |
648efab5abdddb743d2c97c3ed07d694ef244713af32a8778a058f1f2bafd9fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / simple_currency_converter-0.1.2-py3-none-any.whl
| Download URL | simple_currency_converter-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50d4810bff93eef2c8981aefb6ffcde2988e5fdf6919b3aa08f80f5072ff58a9
|
|
BLAKE2b-256 checksum How to use checksums |
4ae0ab17942123eb4e27a6609b62e1a1919ad64e6da65fc2d7322e8ce1069cbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for simple-currency-converter 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.