Skip to main content

orcamentobr

Download Official Data on Brazil's Federal Budget

PT-BR: Baixe Dados Oficiais sobre o Orçamento Federal do Brasil

Description

The orcamentobr Python library allows users to download and analyze official data on Brazil's federal budget through the SPARQL endpoint provided by the Integrated Budget and Planning System (SIOP). This library enables access to detailed information on budget allocations and expenditures of the federal government, making it easier to analyze and visualize these data.

PT-BR: A biblioteca orcamentobr em Python permite aos usuários baixar e analisar dados oficiais sobre o orçamento federal do Brasil através do endpoint SPARQL fornecido pelo Sistema Integrado de Planejamento e Orçamento (SIOP). Esta biblioteca facilita o acesso a informações detalhadas sobre alocações e despesas orçamentárias do governo federal, tornando mais fácil analisar e visualizar esses dados.

Technical information on the Brazilian federal budget is available (Portuguese only) at the Budget Technical Manual.

PT-BR: Informações técnicas sobre o orçamento federal brasileiro estão disponíveis (apenas em português) no Manual Técnico do Orçamento.

Installation

pip install orcamentobr

Usage

Here are some examples of how to use the library functions:

PT-BR: Aqui estão alguns exemplos de como usar as funções da biblioteca:

Main Functions PT-BR: Funções Principais

quais_membros / which_members

Lists all members in a Brazilian Federal Budget dimension for a given year.

PT-BR: Lista todos os membros em uma dimensão do orçamento federal brasileiro para um determinado ano.

Example of using the quais_membros function

from orcamentobr import quais_membros
members = quais_membros(2023, dimensao="funcao")

despesa_detalhada / detailed_expenditure

Downloads expenditure data from the Brazilian federal budget.

PT-BR: Baixa dados de despesas do orçamento federal brasileiro.

Examples of using the despesa_detalhada function

from orcamentobr import despesa_detalhada

detailed_expenses_2017 = despesa_detalhada(2017, detalhe_maximo=True)
expenses_fcdf = despesa_detalhada(2020, uo = "73901", valor_ploa = False)
expenses_2023 = despesa_detalhada(exercicio = 2023, resultado_primario = "6")
expenses = despesa_detalhada(
    exercicio = None,
    esfera = False,
    orgao = False,
    uo = False,
    funcao = False,
    sub_funcao = False,
    programa = False,
    acao = False,
    plano_orcamentario = False,
    subtitulo = False,
    categoria_economica = False,
    gnd = False,
    modalidade_aplicacao = False,
    elemento_despesa = False,
    fonte = False,
    id_uso = False,
    resultado_primario = False,
    valor_ploa = True,
    valor_loa = True,
    valor_loa_mais_credito = True,
    valor_empenhado = True,
    valor_liquidado = True,
    valor_pago = True,
    inclui_descricoes = True,
    detalhe_maximo = False,
    ignore_secure_certificate = False,
    timeout = 0,
    print_url = False,
)

References

Read the Budget Technical Manual for more information.

PT-BR: Leia o Manual Técnico do Orçamento para mais informações.

License

This project is licensed under the terms of the GPL (>= 3). See the LICENSE file for more details.

PT-BR: Este projeto está licenciado sob os termos da licença GPL (>= 3). Veja o arquivo LICENSE para mais detalhes.

Authors

Daniel G. Reiss (author and creator) - ORCID: 0000-0003-1634-760X

Gabriel S. Vera (co-author) - ORCID: 0009-0006-8693-6732

Gustavo José de Guimarães e Souza (contribuitor) - ORCID: 0000-0002-0718-2295

Ministério do Planejamento e Orçamento (co-author and funder)

Metadata

Release files for orcamentobr 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orcamentobr 1.0.1
File Size Uploaded Provenance Actions
orcamentobr-1.0.1.tar.gz 17.0 kB Without provenance Details for orcamentobr-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for orcamentobr 1.0.1
File Interpreter ABI Platform Actions
orcamentobr-1.0.1-py3-none-any.whl Python 3 none any Details for orcamentobr-1.0.1-py3-none-any.whl

Total release size: 32.2 kB

Release files / orcamentobr-1.0.1.tar.gz

Download URL orcamentobr-1.0.1.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
478dc68fc97224fc04e6de1ef6bab386c6979c9440f539af9012bf2ad9dd923c
BLAKE2b-256 checksum
How to use checksums
dab2ff6d17d4df6250edcc52067d57374446f6b61c6c7c63c04ed567cbe106d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / orcamentobr-1.0.1-py3-none-any.whl

Download URL orcamentobr-1.0.1-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51a0b6ca15e6aac8b2c3604e4868370d98dc21c3d7a4596c36cf6d86b0102a5b
BLAKE2b-256 checksum
How to use checksums
5de150a00448e6be8e73338c8d6f818b4030de5f48d0fc3ec168439ec76dc72e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for orcamentobr 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page