Skip to main content

mtpk_postgres

Adaptación a Postgres (vía psycopg 3) de mtpk_mariadb: define tus tablas con dataclasses (Tabla, Columna, ForeignKey, Index), sincroniza la estructura de la base de datos automáticamente (CREATE/ALTER TABLE, índices, claves foráneas) y usa AsyncCrudBase para CRUD asíncrono.

No modifica ni depende de mtpk_mariadb; es un paquete independiente. Ver docs/mtpk-postgres-adaptacion.md en el repo para el detalle de las diferencias frente a la versión MariaDB.

Instalación

pip install -e .

Notas de la adaptación

  • Identificadores citados con "comillas dobles" en vez de backticks.
  • auto_increment=True genera GENERATED ALWAYS AS IDENTITY en vez de AUTO_INCREMENT; como Postgres no tiene lastrowid, las inserciones vía AsyncCrudBase.insert()/insertar() añaden RETURNING id.
  • Tabla.to_sql() ya no incluye índices ni comentarios inline (Postgres no lo permite dentro de CREATE TABLE): usa Tabla.to_sql_indices() y Tabla.to_sql_comentarios() para las sentencias CREATE INDEX y COMMENT ON correspondientes. ManagerDB ya las ejecuta automáticamente al crear tablas.
  • ENUM/SET se traducen a TEXT + CHECK; al reconstruir la estructura desde la base de datos ambos se reportan como ENUM (Postgres no permite distinguirlos después del hecho).
  • A diferencia de MariaDB, el DDL en Postgres es transaccional: los métodos de ManagerDB confirman (COMMIT) explícitamente tras crear tablas, triggers y procedimientos.

Metadata

Release files for mtpk-postgres 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 mtpk-postgres 0.1.0
File Size Uploaded Provenance Actions
mtpk_postgres-0.1.0.tar.gz 30.5 kB Without provenance Details for mtpk_postgres-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mtpk-postgres 0.1.0
File Interpreter ABI Platform Actions
mtpk_postgres-0.1.0-py3-none-any.whl Python 3 none any Details for mtpk_postgres-0.1.0-py3-none-any.whl

Total release size: 62.7 kB

Release files / mtpk_postgres-0.1.0.tar.gz

Download URL mtpk_postgres-0.1.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5320e21d33af1103aab969c07c6055b69dfac5381fb69fb8fcaa3aaab3224622
BLAKE2b-256 checksum
How to use checksums
9aeb056359fb45d6e23fde39ea6ad290386e2f27f98b4566af22c6ecce48eb4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

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

Download URL mtpk_postgres-0.1.0-py3-none-any.whl
Size 32.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63ffa84b5532e1db0d21bc887f05ad424b3a02e28eee6b203ca23dbb5c5ce725
BLAKE2b-256 checksum
How to use checksums
9bcac7dd59682ce85147e7ed5e836fddfd59d81a2fb2b233f6863e6ae2b191c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for mtpk-postgres 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.

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.

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