8000 GitHub - lucas-r-leite/challenge-bravo: Backend code challenge
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lucas-r-leite/challenge-bravo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Currency Converter

This is a simple Flask application that converts currency using data from DuckDuckGo's cryptocurrency API.

Setup

  1. Clone repository:
git clone <repository_url>
  1. Change directory to the project folder:
cd <project_folder>
  1. Create virtual environment:
python3 -m venv venv
  1. Activate virtual environment:
  • On Windows:

    venv\Scripts\activate
  • On macOS and Linux:

    source ve
    610F
    nv/bin/activate
  1. Install the required packages:
pip install -r requirements.txt
  1. Run the Flask app:
python app.py

Or use Docker

  1. Build image: docker build -t <image_name> .
  2. Run the image: docker run -p 5000:5000 <image_name>

Usage

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

About

Backend code challenge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.7%
  • Dockerfile 9.3%
0