Skip to main content

Nepal ForEx

Nepal ForEx is a Python package for making Currency Exchange easier and fast between NPR and Foreign Currencies.

It parses current exchange rate from Nepal Rastra Bank. Exchange rates are genuine and realtime provided by Nepal Rastra Bank.

Supported Currencies

  • INR
  • USD
  • EUR
  • GBP
  • CHF
  • AUD
  • CAD
  • SGD
  • JPY
  • CNY
  • SAR
  • QAR
  • THB
  • AED
  • MYR
  • KRW
  • SEK
  • DKK
  • HKD
  • BHD

Installation

Use the package manager pip to install nepal-forex.

pip install nepal-forex

Usage

Nepal ForEx

To get NPR exchange rate of specified currency on specified date.

from nepal_forex.nepal_forex import nepal_forex

nepal_forex.exchange_rate(currency='USD', date='2020-08-27')      # Decimal('118.58')

To get NPR exchange rate of specified currency of today.

from nepal_forex.nepal_forex import nepal_forex

nepal_forex.exchange_rate(currency='USD')                        # Decimal('118.58')

To convert NPR amount to specified currency of today exchange rate.

from nepal_forex.nepal_forex import nepal_forex

nepal_forex.convert_to(amount=160, currency='USD')               # Decimal('1.35')

To convert NPR amount to specified currency of specified date exchange rate.

from nepal_forex.nepal_forex import nepal_forex

nepal_forex.convert_to(amount=160, currency='USD', date='2020-08-27')            # Decimal('1.35')

To convert specified currency amount to NPR of today exchange rate.

from nepal_forex.nepal_forex import nepal_forex

nepal_forex.convert_from(amount=100, currency='USD')             # Decimal('11858.00')

To convert specified currency amount to NPR of specified date exchange rate.

from nepal_forex.nepal_forex import nepal_forex

nepal_forex.convert_from(amount=100, currency='USD', date='2020-08-27')      # Decimal('11858.00')

Also Decimal places can be set.

from nepal_forex.nepal_forex import nepal_forex

nepal_forex.convert_to(amount=160, currency='USD', date='2020-08-27', decimal_places=4)      # Decimal('1.3582')

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Release files for nepal-forex 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nepal-forex 1.0
File Size Uploaded
nepal-forex-1.0.tar.gz 5.5 kB Details

Release files / nepal-forex-1.0.tar.gz

Download URL nepal-forex-1.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b65ed8382432e8c8fef427e78c2a8a4607256261472a7fe33cf99aa0521e9fdb
BLAKE2b-256 checksum
How to use checksums
5f7362c0790f00e08f6b756afc15fa14e8076382f5b02ccb5e656f39d6584b86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page