Skip to main content

Simple currency converter

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_currency_converter-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_currency_converter-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file simple_currency_converter-0.1.0.tar.gz.

File metadata

File hashes

Hashes for simple_currency_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43e6f954451c9a30e6b7a61d3d143f75fb9ef733606fd0df54b97a7d093aba06
MD5 c2999b95a540c101b56c299f8cec0c25
BLAKE2b-256 695ebf6e808e6e1bba3405348ff6174b692f5bd8347e4070661f5b95db186373

See more details on using hashes here.

File details

Details for the file simple_currency_converter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_currency_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2ff3aaf512407ced71a741472a6d0271edea38bf6981a4f1b0cafcfbfd1f284
MD5 76405f9f17f7c6f90729c9cd5872de29
BLAKE2b-256 02159d18c38aae3a717bfa7fde4d1ce3b578f7196bbba27b2c5060a7e043303d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page