Reusable Django utilities for PTech projects
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ptech_tools-0.1.0.tar.gz.
File metadata
- Download URL: ptech_tools-0.1.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcdf2f9c658f0db2b9b8075a5db79e471ddd0952b451d2a8397bd013efa08e42
|
|
| MD5 |
85d6f50f5d49ccaaa4b0ea15935b00c5
|
|
| BLAKE2b-256 |
c4476bccb94884b9cf68f99d6176bc20516b563c37907043a4dd41583e200971
|
Provenance
The following attestation bundles were made for ptech_tools-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on leandrocristovao/ptech-django-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ptech_tools-0.1.0.tar.gz -
Subject digest:
bcdf2f9c658f0db2b9b8075a5db79e471ddd0952b451d2a8397bd013efa08e42 - Sigstore transparency entry: 1672807427
- Sigstore integration time:
-
Permalink:
leandrocristovao/ptech-django-tools@816227c06e3586aca6b9c39f44c3c694df154a01 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/leandrocristovao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@816227c06e3586aca6b9c39f44c3c694df154a01 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ptech_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ptech_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7fafc3e15b65309fbb5e79869c89ccfe64b4bc21b64432182970b882cae6503
|
|
| MD5 |
cc98085c6990241c3ea0dbc65e5b4d13
|
|
| BLAKE2b-256 |
17ad39225400246146f75792fdf4b4ab8640e3017895e6ec9a8ab95903689df1
|
Provenance
The following attestation bundles were made for ptech_tools-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on leandrocristovao/ptech-django-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ptech_tools-0.1.0-py3-none-any.whl -
Subject digest:
e7fafc3e15b65309fbb5e79869c89ccfe64b4bc21b64432182970b882cae6503 - Sigstore transparency entry: 1672807473
- Sigstore integration time:
-
Permalink:
leandrocristovao/ptech-django-tools@816227c06e3586aca6b9c39f44c3c694df154a01 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/leandrocristovao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@816227c06e3586aca6b9c39f44c3c694df154a01 -
Trigger Event:
release
-
Statement type: