Skip to main content

ptech-tools

Pacote reutilizavel de utilitarios Django/Python para os projetos da PTech.

Instalacao

pip install ptech-tools

Requer Django 5.2 ou superior.

Uso no Django

Adicione o app em INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    "ptech_tools.apps.PtechToolsConfig",
]

Comando inicial

O pacote ja expoe o comando export_db:

python manage.py export_db

Configuracao opcional via settings.py:

from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent.parent

PTECH_TOOLS = {
    "EXPORT_DB": {
        "output_dir": BASE_DIR / "backups",
        "database_alias": "default",
        "compress": True,
        "include_tables": ["users", "orders"],
        "exclude_tables": ["audit_log"],
    }
}

O comando tambem aceita flags diretas:

python manage.py export_db --compress --include-table users --include-table orders

Quando compress=True ou --compress estiver ativo, o arquivo final termina em .gz. Use --no-compress para forcar saida sem compactacao, mesmo se compress=True estiver configurado.

include_tables e exclude_tables aceitam listas no settings.py e valores separados por virgula nas variaveis de ambiente.

Publicacao

O fluxo de publicacao para TestPyPI e PyPI esta documentado em docs/publishing.md.

Metadata

Release files for ptech-tools 0.1.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 ptech-tools 0.1.0
File Size Uploaded Provenance Actions
ptech_tools-0.1.0.tar.gz 9.2 kB With provenance Details for ptech_tools-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ptech-tools 0.1.0
File Interpreter ABI Platform Actions
ptech_tools-0.1.0-py3-none-any.whl Python 3 none any Details for ptech_tools-0.1.0-py3-none-any.whl

Total release size: 19.0 kB

Release files / ptech_tools-0.1.0.tar.gz

Download URL ptech_tools-0.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bcdf2f9c658f0db2b9b8075a5db79e471ddd0952b451d2a8397bd013efa08e42
BLAKE2b-256 checksum
How to use checksums
c4476bccb94884b9cf68f99d6176bc20516b563c37907043a4dd41583e200971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

Release files / ptech_tools-0.1.0-py3-none-any.whl

Download URL ptech_tools-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7fafc3e15b65309fbb5e79869c89ccfe64b4bc21b64432182970b882cae6503
BLAKE2b-256 checksum
How to use checksums
17ad39225400246146f75792fdf4b4ab8640e3017895e6ec9a8ab95903689df1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

Security for ptech-tools 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ptech_tools-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

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

0.1.0 This release

2 release files Full 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