Skip to main content

A Python library to retrieve information on Ptax rates

Project description

PyPtax

PyPtax is a Python library to retrieve information on Ptax rates.

What is Ptax?

Ptax exchange rate is the reference exchange rate for U.S. Dollar, expressed as the amount of Brazilian Reais per one U.S. Dollar, published by the Central Bank of Brazil.

Installation

$ pip install pyptax

Usage

Get closing rates on a certain date

>>> from pyptax import ptax

>>> close_report = ptax.close('01-20-2020')
>>> close_report.as_dict
{'datetime': '2020-01-20 13:09:02.871', 'bid': '4.1823', 'ask': '4.1829'}
>>> close_report.datetime
'2020-01-20 13:09:02.871'
>>> close_report.bid
'4.1823'
>>> close_report.ask
'4.1829'
>>> print(close_report)
'2020-01-20 13:09:02.871 - bid: 4.1823 - ask: 4.1829'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyptax-0.2.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

pyptax-0.2.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page