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.5.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 csc-essentials 1.5.0
File Size Uploaded Provenance Actions
csc_essentials-1.5.0.tar.gz 23.2 kB Without provenance Details for csc_essentials-1.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 46.9 kB

Release files / csc_essentials-1.5.0.tar.gz

Download URL csc_essentials-1.5.0.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a0bc15f5b02931c02f68f0305554aa525cb8b018075d606aeaa31e9fc562e323
BLAKE2b-256 checksum
How to use checksums
37f474dd7ef0f00cec4321ea92b58bd978e4f449d8d6a392f36ab94a1681acd1
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.5.0-py3-none-any.whl

Download URL csc_essentials-1.5.0-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc489a3c8b94a0f6b7d1d2c37e66d6576e217695e24512c32cbc86f37a7b4847
BLAKE2b-256 checksum
How to use checksums
5558178ba4d39d9a05c74a5d21e55ffbf81f940d6d713badeaded6917ca8570e
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.5.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.

Release history Release notifications | RSS feed

This release

1.5.0 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