This script has as its objective to offer a pack of functions to work with Dollar, so it can be easily imported into your projects.
Project description
Currency-Converter
1. Description
This script has as its objective to offer a pack of functions to work with Dollar, so it can be easily imported into your projects.
2. Installation
This script is very easy to import, first, is necessary to move it to the directory of your project, after, you should install all dependencies necessary, for last, is just use the Import statement.
Example:
Import re
Import request
Import Dolar-BC
3. Methods
The script has four methods created for use. Above we will see what are they and their functions.
- Bilder: This method is responsible for access to the Banco Central page, to fix the form, get the values, and process these data. That method receives a date initial and a date final. Example:
USD = USD2BRL(“13/12/2022”, “14/12/2022”)
- show_values: This method returns the Dollar’s prince between the interval of dates informed. Example:
values = USD.show_values()
- BRL2USD: This method receives a value in BRL and returns the values in USD. Example:
conversion = USD. BRL2USD(30.90)
- USD2BRL: This method receives a value in USD and returns the values in BRL. Example:
conversion = USD. USD2BRL(30.90)
4. Docker
To use the Docker file of API, you, first, must download the Docker Desktop, after to copy the files at branch “Docker” to your computer, then, open a terminal, and execute the commands below:
Docker build -t dollar .
Press Enter, then:
Docker run -it dollar
Obs: The files need to be in the same folder in the folder “app”, which should be created containing the API. Tested with success on 01/31/2023.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dolar_bc-1.1.3.tar.gz
.
File metadata
- Download URL: dolar_bc-1.1.3.tar.gz
- Upload date:
- Size: 3.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 089fcf83a9af6bca0dd974f14e5f9042607c582d17677bbc9e61650f0affaee6 |
|
MD5 | 893243252b486a859dd0332f33700061 |
|
BLAKE2b-256 | d8e27af0166436cb62e1d12d8bd760f8f2bd81e822360a33145de15bfc346c86 |
File details
Details for the file dolar_bc-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: dolar_bc-1.1.3-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 042f6ee83bafbd00c7f6bd7a15816a82ddf71f2c254c47a485532218e1ec2728 |
|
MD5 | 49ef03e8d0f61408aefc7fec54751093 |
|
BLAKE2b-256 | 2fc51a53600943fd68c1d13f25d3f7d4c120c5e305a6960a109af62a0a6124ce |