Skip to main content

A Python package that encompasses money related stuff into one package - money formatting, currency conversion etc

Project description

MoneyMatters

MoneyMatters is a Python package designed to simplify several common monetary operations, such as currency conversion and money formatting. It integrates functionalities from multiple sources to provide a unified solution for handling monetary values, leveraging real-time data for accurate currency conversions and providing various formatting options.

Features

  • Currency Conversion: Convert amounts from one currency to another using real-time exchange rates.
  • Money Formatting: Format monetary values into a more readable form or according to specific cultural norms.

Installation

To install MoneyMatters, run the following command:

pip install moneymatters

Ensure you have Python 3.7 or later installed on your system.

Usage

Currency Conversion

To convert currency, use the ExchangeAPI class:

from moneymatters.api import ExchangeAPI

# Create an instance of the ExchangeAPI
converter = ExchangeAPI()

# Convert 100 USD to EUR
converted_amount = converter.convert(100, 'USD', 'EUR')
print(f"100 USD is equivalent to {converted_amount} EUR")

Money Formatting

To format money values, use the Formatter class:

from moneymatters.api import Formatter

# Format a price in a specific pattern
formatted_price = Formatter.apply_price_format(1234.56, '99.99')
print(f"The formatted price is {formatted_price}")

Additional Information

  • API Sources:
    • ECB for major 30 currencies.
    • Fawaz Ahmed's exchange-api for 150+ currencies.
    • XE.com for detailed and possibly more accurate data as a last resort.

Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change. Ensure to update tests as appropriate.

License

This project is licensed under the Affero GNU Public License v3 - see the LICENSE file for details.

Contact

Acknowledgments

Thanks to all contributors who have helped shape MoneyMatters, making it easier to deal with currency related stuff for developers around the globe.

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

moneymatters-2024.5.3.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

moneymatters-2024.5.3-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file moneymatters-2024.5.3.tar.gz.

File metadata

  • Download URL: moneymatters-2024.5.3.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for moneymatters-2024.5.3.tar.gz
Algorithm Hash digest
SHA256 4dc80dfc92f16ee99858125fd046b8a2c8e791d81bf0210620b1dc2a0f3ee12f
MD5 702098b022c9928290a6c0af4817ad16
BLAKE2b-256 3c16cf209ef9cdb657d17abebbf372882a2455f2910a5efad1dbc4bd3bd5af41

See more details on using hashes here.

File details

Details for the file moneymatters-2024.5.3-py3-none-any.whl.

File metadata

File hashes

Hashes for moneymatters-2024.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b539dc948c36193c0f3c81cfbf3e7393439d4cc6932935226c2df7796f185b8f
MD5 4cd68fb82ad76c67c4afd8804b254762
BLAKE2b-256 12a2303e2c04057f39e83bdbf9d442592b8c40648b4e8a1e49a65d77a765e9ac

See more details on using hashes here.

Supported by

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