GithubHelp home page GithubHelp logo

sbishnu019 / nepal-forex Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 8 KB

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

License: MIT License

Python 100.00%

nepal-forex's Introduction

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

nepal-forex's People

Contributors

sbishnu019 avatar

Stargazers

Navaraj avatar

Watchers

 avatar

Forkers

nawarazpokhrel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.