This is a simple Flask application that converts currency using data from DuckDuckGo's cryptocurrency API.
- Clone repository:
git clone <repository_url>
- Change directory to the project folder:
cd <project_folder>
- Create virtual environment:
python3 -m venv venv
- Activate virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source ve 610F nv/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Run the Flask app:
python app.py
- Build image:
docker build -t <image_name> .
- Run the image:
docker run -p 5000:5000 <image_name>
To use the currency converter API, send a GET request to the root endpoint with the following query parameters:
- from: The source currency code (e.g., USD).
- to: The target currency code (e.g., BRL).
- amount: The amount to convert.
Example:
GET http://127.0.0.1:5000/?from=USD&to=BRL&amount=1