Skip to main content

Ferramentas para otimizar o consumo paralelizado de api do pipefy, trantando os retornos.

Project description

utils-api-pipefy

Biblioteca que possui um kit de ferramentas úteis para ações usualmente rotineiras de quem trabalha com Pipefy, desde consulta de cards a criação de Pipes, Tables e atualizações em geral.

Utilizamos como apoio as collection requests e python-dotenv.

Instalação

pip install utils-api-pipefy

.env

HOST_PIPE=app or seu_host_pipefy
PIPE= seu_numero_pipe
NONPHASES= [numeros_fases_ignoradas]
TOKEN= seu_token
LOGENV = DEV or PROD [ PROD remove urlib3 logs ]
LOGNAME = nome_arquivo_logs
DISABLELOG = True or False [False disabilita a criação de pasta e arquivo de logs, temos essa opção para utlização em plataformas como Google Cloud Platform, neste caso o logging apenas imprime da tela, sem salvar o log.]

Exemplo de uso

import os
import json
import time
import logging
from dotenv import load_dotenv
from utils_api_pipefy.libs.engine import Engine
from utils_api_pipefy.libs.excepts import exceptions
from utils_api_pipefy.libs.log import log

load_dotenv(dotenv_path=fr"{os.getcwd()}\.env")
log().loginit()

if __name__ == "__main__":
    
    try:
        eng = Engine()
        
        # ALGUMAS DAS UTILIDADES DO ENGINE
        logging.info(eng.columns)
        print(json.dumps(eng.phases_id, ensure_ascii=False, indent=2))
        print(json.dumps(eng.fields, ensure_ascii=False, indent=2))
        print(json.dumps(eng.phases, ensure_ascii=False, indent=2))
        
        a = time.time()
        data=eng.run_all_data_phases()
        print(f"\n\nTempo total: {time.time()-a}\n\n")
        print()
    except Exception as err:
        raise exceptions(err)

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

utils-api-pipefy-0.2.7.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

utils_api_pipefy-0.2.7-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file utils-api-pipefy-0.2.7.tar.gz.

File metadata

  • Download URL: utils-api-pipefy-0.2.7.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.6 Windows/10

File hashes

Hashes for utils-api-pipefy-0.2.7.tar.gz
Algorithm Hash digest
SHA256 ba9301c3de33cba9631534e7c645240c75bf7bff5b9fb79c794a9cef7049299b
MD5 27f1a14bf4b5f18b85571eab7f609b17
BLAKE2b-256 1a9aa19c4d18867731fe8cd6c05f42335bdf8e6caa71fb2738e65ec8561ea2bd

See more details on using hashes here.

File details

Details for the file utils_api_pipefy-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: utils_api_pipefy-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.6 Windows/10

File hashes

Hashes for utils_api_pipefy-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3efc7d32df9eece09e2d425a4929440465c48ccff70db8f6d1c37837fa0d4a97
MD5 3aa0b5aa77c65e478cf8a087153cd128
BLAKE2b-256 5565d61c34b4f7d6e52dbdae319cca8a33810af5b6c5bbe2ef1e23ea0be48472

See more details on using hashes here.

Supported by

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