Skip to main content

REST API of the Brazilian Federal Government Open Data Portal

Project description

REST API of the Brazilian Federal Government Open Data Portal

Python package codecov PyPI Latest Release PyPI Downloads

dados.gov.br now manages the technological solution to improve the governance of federal investments in infrastructure, through monitoring and monitoring the execution of investments in Federal Government infrastructure projects. Optionally, other powers of the Union, States, Federal District and Municipalities may register investments in infrastructure with their own resources through a formal manifestation of their adhesion.

dados.gov.br, in addition to complying with various rulings from the Federal Court of Auditors, aims to meet society's demand for clear, updated and centralized information. Thus, it positively impacts the effectiveness of the execution of public policies and decision-making by managers, in addition to enabling social control through transparency.

The platform gathers information about the geolocation of investments and allows it to be integrated with other monitoring, control and inspection systems, thus optimizing citizens' access to information and strengthening transparency regarding the rational use of public resources.

For more information, visit: https://www.gov.br/transferegov/pt-br/obrasgov/sobre

Additional information

Python library created with the aim of contributing to the community, providing an alternative to facilitate the use of the Federal Government's APIs, thus making the column available for contributions aimed at maintaining and evolving this simple code base.

And last but not least, please use the information wisely and without political bias.

How to install

To install the library use Python's pip package manager.

Below are some examples of how to install.

pip install dados-gov-sdk

Example of installation from the latest available version

pip install dados-gov-sdk@1.0.0

Installation example stating a specific version

How to Get Token

Access the Brazilian Federal Government Portal with your access credentials using your CPF (Individual Person Registry). Access through the link https://dados.gov.br/.

Once logged in, generate an access token and that's it, you will already have the information at hand to access the APIs, have fun 🥳

How To Use

To use, first have the access key on hand, once that is done, there are some ways to configure it for use, either directly through the ApiClient(...) instance or through environment variables.

Configuring through environment variables, simply set them according to the names of the environment variable session, once this is done, simply instance the resources and use them.

Below are some examples.


Api Client initialization example


Resource Query Example

Environment variables.

Environment variables are one of the ways to configure the library for use, so none of the parameters are mandatory, assuming that if not informed, it is expected that the ApiClient(...) class.

Below is a table containing the accepted environment variables.

Name Description Default Optional
DATA_GOV_HOST API base URL https://dados.gov.br true
DATA_GOV_API_KEY Access key null true
DATA_GOV_TIMEOUT Timeout 5000 true
DATA_GOV_PROXY_HTTP Proxy HTTP null true
DATA_GOV_PROXY_HTTPS Proxy HTTPS null true

References

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

dados-gov-sdk-1.0.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

dados_gov_sdk-1.0.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file dados-gov-sdk-1.0.1.tar.gz.

File metadata

  • Download URL: dados-gov-sdk-1.0.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for dados-gov-sdk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9a527439779fb86911b6f8555f8bab0f3db0bfd0395b10f580cd9dc7c8e92825
MD5 c09ce03b09b9032e3f952be1d474f28f
BLAKE2b-256 9f4fc989e99e90e9229a1d9a7307d3fb1a4d8cfb538c385e9f0f47dffb31af71

See more details on using hashes here.

Provenance

File details

Details for the file dados_gov_sdk-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dados_gov_sdk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96eeda340f475fc434b8fda5a4cf016bbbcc397fb76868f2766f5c8ebed4e2e1
MD5 44045fccf9786e293b7c4d727879ad03
BLAKE2b-256 8fc706ac4429ea1339d9fcd4fc67be807abf8f5d9da67b1b1510e6b4797b688d

See more details on using hashes here.

Provenance

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