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

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.8
File Size Uploaded Provenance Actions
csc_essentials-1.4.8.tar.gz 23.2 kB Without provenance Details for csc_essentials-1.4.8.tar.gz

Built distribution (wheel)

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

Total release size: 46.8 kB

Release files / csc_essentials-1.4.8.tar.gz

Download URL csc_essentials-1.4.8.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0739bdebf00018bdacc40322780507c9e9052e052c9f483bc168aa8ae11763ea
BLAKE2b-256 checksum
How to use checksums
7af3daaaaa866f4de5068d10dd567005c2de067d6c1d79e102d9199a50aa1e1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","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.8-py3-none-any.whl

Download URL csc_essentials-1.4.8-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d33ae69f704243a48359d1cd7e000854fc463299ff3a5022aee3cda8b728d3c
BLAKE2b-256 checksum
How to use checksums
18a1aa0f68f957bed88f26a1c59941dca8d2d0b564e88eb2698c5b22845de807
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","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.8

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