Skip to main content

airflow-providers-tesouro-gerencial

Provider do Airflow para comunicação com Tesouro Gerencial.

Instalação

pip install airflow-providers-tesouro-gerencial

Conteúdo

  • Hook para conexão com Tesouro Gerencial, que contém métodos para:

    • Entrada e saída de contexto (clásula with), inicializando e encerrando sessão no Tesouro Gerencial
    • Execução e exportação de relatório
  • Transfers que carregam relatórios do Tesouro Gerencial para:

    • Arquivo local;
    • Banco MongoDB

Exemplo de Uso

Transferência de relatório para arquivo local:

from datetime import datetime, timedelta

from airflow.decorators import dag
from airflow.providers.tesouro_gerencial.transfers.relatorio_para_arquivo import RelatorioParaArquivo


@dag(schedule_interval=None, start_date=datetime(2021, 1, 1))
def teste_tesouro_gerencial():
    teste = RelatorioParaArquivo(
        task_id='teste1',
        id_conexao_siafi='teste',
        id_relatorio='970A89D511EC923631090080EFC5BFD1',
        caminho_arquivo='/tmp/tg.xlsx',
        respostas_prompts_valor=['622110000', '622120000'],
        retries=10,
        retry_delay=timedelta(minutes=2)
    )

minha_dag = teste_tesouro_gerencial()

Transferência para banco MongoDB

from datetime import datetime, timedelta

from airflow.decorators import dag
from airflow.providers.tesouro_gerencial.transfers.relatorio_para_mongo import RelatorioParaMongo


@dag(schedule_interval=None, start_date=datetime(2021, 1, 1))
def teste_tesouro_gerencial():
    teste = RelatorioParaMongo(
        task_id='teste2',
        id_conexao_siafi='teste',
        id_relatorio='970D89D511EC423631090080EFA5BFD1',
        id_conexao_mongo='teste_mongo',
        banco='teste',
        colecao='teste',
        respostas_prompts_valor=['622110000', '622120000'],
        truncar_colecao=True,
        nulos_para_zero=True,
        retries=10,
        retry_delay=timedelta(minutes=2)
    )


minha_dag = teste_tesouro_gerencial()

Metadata

Release files for airflow-providers-tesouro-gerencial 1.3.0

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

Source distribution (sdist)

Source distribution for airflow-providers-tesouro-gerencial 1.3.0
File Size Uploaded Provenance Actions
airflow-providers-tesouro-gerencial-1.3.0.tar.gz 12.2 kB Without provenance Details for airflow-providers-tesouro-gerencial-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for airflow-providers-tesouro-gerencial 1.3.0
File Interpreter ABI Platform Actions
airflow_providers_tesouro_gerencial-1.3.0-py3-none-any.whl Python 3 none any Details for airflow_providers_tesouro_gerencial-1.3.0-py3-none-any.whl

Total release size: 170.4 kB

Release files / airflow-providers-tesouro-gerencial-1.3.0.tar.gz

Download URL airflow-providers-tesouro-gerencial-1.3.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8f1da334dfbf6e1440e27a354ec19106e59de562c63e277be5bbfee42566c197
BLAKE2b-256 checksum
How to use checksums
c811b5a45a2767b1717cff757ee6b403230142ce839143fc624b20ed13bde467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Release files / airflow_providers_tesouro_gerencial-1.3.0-py3-none-any.whl

Download URL airflow_providers_tesouro_gerencial-1.3.0-py3-none-any.whl
Size 158.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fa57c40e06db494c9bfef93e481459169f11faa7282d22e38e12897dacc4b28
BLAKE2b-256 checksum
How to use checksums
bfbc1bfb717479bef61098a0f50b61907b89c991fdb5fa4f730db11684bac300
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Security for airflow-providers-tesouro-gerencial 1.3.0

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.

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