Skip to content

This Python program converts currency exchange rates into Polish zlotys (PLN) according to the average exchange rates from Table A of the National Bank of Poland on a selected day (beginning from 2002-01-02)

Notifications You must be signed in to change notification settings

pamidev/currency-exchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency Exchange

This Python program converts currency exchange rates into Polish zlotys (PLN) according to the average exchange rates from Table A of the National Bank of Poland on a selected day (beginning from 2002-01-02).

Table of Contents

General Information

The purpose of the program is to use an external API (Application Programming Interface) to convert exchange rates based on the data provided by the user. Thanks to this project, I learned how to use APIs and apply them to my another programming projects.

More about APIs.

Technologies Used

Features

  • The user can provide up to two arguments (date and three-letter currency code) when running the program.
  • The program can also be run with one argument or none. It doesn't matter what user entered - the date or the currency code.
  • If the user does not enter any data when starting the program, the program will ask for it itself.
  • Date can be entered in any way, for example: 13.12.2011, "15 May 2015" or 2016-06-16, or even 20091209.

Note that the date with spaces must be entered in "quotation marks".

Screenshots

Example screenshot

Setup

I assume you know how to cloning this repository. If not, I refer you to this publication.

At the beginning You need to make sure you have Python version up to 3.9, as one of the packages does not work with the latest versions of Python.

If You don't have any Python version, download and install from here.

To verify Python version, type in terminal:

$ python --version

If You are seeing this answer (* - any digits):

$ python --version
$ Python 3.9.*

We are at home! Now You need to install virtual environment like this:

$ python -m venv venv
$ cd venv\Scripts
$ activate
$ cd ..
$ cd ..

and install dependencies in the previously created virtual environment:

$ pip install -r requirements.txt

After installing this, run the program like bellow.

Usage

How does one go about using it? It's simple. To run program without any arguments type in terminal:

$ python currency-exchange.py

or to run program with GBP currency code for example as one of arguments:

$ python currency-exchange.py gbp

or to run program with two arguments (date and currency code):

$ python currency-exchange.py 20.11.2019 usd

Acknowledgements

About

This Python program converts currency exchange rates into Polish zlotys (PLN) according to the average exchange rates from Table A of the National Bank of Poland on a selected day (beginning from 2002-01-02)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages