- Test ability of developer to design, test and implement a given project within a given deadline using the necessary tools
- Ability to design and implement a project in Python
- Develop an application in Python that can convert any(pre-defined set) input currency to any(pre-defined set) output currency
- Use data available on the web to ascertain conversion rates between currencies on any given day
- Develop an API and/or a web interface (to be decided during implementation) for the application
- Daily updates and August 18, 2023
- Python 3.11
- Django-Ninja (for API only)
- Django for web application backend
- HTML, CSS and js as part of Bootstrap V5 for application frontend (for Web GUI only)
- Clone or download the repository and create a virutal environment inside the outermost folder that holds the repository by running
python -m venv env
in the command line. Hereenv
is the name of the virutal environment - Activate the virutal environment in by running
./env/Scripts/activate
in Powershell. Enclose the command within double quotes as"./env/Scripts/activate"
if you use the native windows Command Prompt - Install all the required packages provided in the
requirements.txt
files by runningpip install -r requirements.txt
- Run all database migrations to get ready to run the Django application by running
python manage.py migrate
from inside the outermost Django folder folder - Before running the Django development server you will need to register with Fixer.io to obtain an API for use with this application.
- Copy and paste the API key into the
myproject/mysite/settings.py
and assign to a variableAPI_KEY
- Get your application up and running using the command
python manage.py runserver
- Access the homepage at the default local server
127.0.0.1:8000/converter/
- The documentation for the API is accessible at
127.0.0.1:8000/api/docs
when the application is running. This page provides an overview all available APIs - Each API URL can be tested either on this page, or by using external API testing platforms like Postman
- This repository uses Selenium for testing the web application-browser interface
- Run
python manage.py test
from the outermost project directory to run unit test provided in thetests
package
- Input and repeat forms have been modified and work correctly now
- DB migrated and code refactored to use Foreign Key connections between tables
- Cosmetic imporvements to how list view is displayed and how results are stored (2 decimal rounding)
- Complete Working Test suite implemented with Python unittest, Django Tests and Selenium (All tests passing) with custom dataset
- Potential Feature Addition(s): Search for Exchange Rates, Search/Display Historical Changes in Rates
- Use Selenium to write automated web browser tests for the application in conjunction with Django Tests.
- Tests run independent of existing server and databases using the LiveServerTestCase class and the Chrome WebDrivers available for use with Selenium.
- This Project stands complete
- Complete APIs for fetching currency names, symbols and conversion with raw data/form data
- APIs cover all (potentially) externally accessible parts of the application
- Complete working Currency Converter without full API
- Completed and Working backend for currency converter
- Data fetching is supposed to occur only once per week (to minimize API calls), so if conversion uses existing data from db, rates will be outdated
- Display of final result can be made better (front-end)
- API implementation pending
- Complete use of
requests
to obtain and store currency symbols in local database (SQLlite) from Fixer API - Use
requests
to obtain current conversion rate using Fixer API - Complete conversion logic based on input -> USD -> output
- Debugging in progress
- APIs pending
- use
requests
package to performGET
requests to any foreign exchange data server API to get country names and symbols - use
requests
package to performGET
requests to any foreign exchange server API to get current conversion rates (once per day) - Build Django application with function-based views (not class-based views) to support Django-Ninja with a GUI front-end (HTML, CSS and JS)
- use Django-Ninja for APIs on function-based views in Django