Skip to main content

csc-essentials

Pequeno utilitário para integração com Google Cloud (BigQuery, Secret Manager, Cloud Logging, Compute).

Instalação

pip install csc-essentials

Quickstart (exemplo rápido)

from google.cloud import bigquery
from csc_essentials.logging import GeradorLog
from csc_essentials.secrets import get_secrets
from csc_essentials.database import inserir_banco_dados

log = GeradorLog("exemplo")
# Ler segredo do Secret Manager (ex.: token Slack)
raw = get_secrets("projects/MEU_PROJ/secrets/SLACK_SECRET/versions/latest")

# Preparar cliente BigQuery
client = bigquery.Client()

# Carregar arquivo NDJSON para uma tabela
inserir_banco_dados(
    arquivo_path="/tmp/dados.ndjson",
    projeto="meu-projeto",
    dataset="meu_dataset",
    tabela="minha_tabela",
    log=log,
    client=client,
    wait_job=True,
)

print("Upload iniciado")

Documentação

  • Documentação por módulo em docs/ (veja docs/overview.md).
  • Principais módulos: logging, secrets, utils, database, oracle, calendario.

Contribuindo

  • Abra uma issue descrevendo o problema ou feature.
  • Envie um Pull Request com testes e descrição clara das mudanças.
  • Formato de código: siga o estilo existing do projeto e execute os testes (pytest).

Licença

Este repositório está licenciado conforme o arquivo LICENSE na raiz.

Notas rápidas

  • Verifique permissões GCP ao usar bigquery.Client() e secretmanager.SecretManagerServiceClient.
  • Em desenvolvimento local, você pode desativar o envio para Cloud Logging configurando GCP_LOGGING_ATIVO=false.

Metadata

Release files for csc-essentials 1.4.9

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

Source distribution (sdist)

Source distribution for csc-essentials 1.4.9
File Size Uploaded Provenance Actions
csc_essentials-1.4.9.tar.gz 23.1 kB Without provenance Details for csc_essentials-1.4.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for csc-essentials 1.4.9
File Interpreter ABI Platform Actions
csc_essentials-1.4.9-py3-none-any.whl Python 3 none any Details for csc_essentials-1.4.9-py3-none-any.whl

Total release size: 46.7 kB

Release files / csc_essentials-1.4.9.tar.gz

Download URL csc_essentials-1.4.9.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
285909d91f57c869ee69ce8a04461e65e96935aca69943fd81e2083173ef09c1
BLAKE2b-256 checksum
How to use checksums
472247537f24acb9ab7ad09f144ac26926c4211bd7432de4f05d24e75e60bd2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / csc_essentials-1.4.9-py3-none-any.whl

Download URL csc_essentials-1.4.9-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1916cebcb724ba078c2809a4b4338c1d6b05ca67b1c3e67347f2808a059f2808
BLAKE2b-256 checksum
How to use checksums
b24c21327e6a7911ef3844a9af9a4dfcb3684347c47169a509cbf2f9f55a11f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for csc-essentials 1.4.9

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.4.9 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