Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

perfact-api-base-model

SQLAlchemy declarative base for all PerFact API models. Part of the perfact.api.base namespace.

What it provides

Base

Declarative base for all ORM table mappings. Subclasses automatically get:

  • id — BigInteger primary key
  • modtime — DateTime with timezone, defaults to now()
  • author — set from the DB session user via db_username()
  • Column names are automatically prefixed with the table name (e.g. a field name on AppUser becomes the DB column appuser_name)
  • __tablename__ is derived from the class name in lowercase if not set explicitly

View

Separate declarative base for SQL view definitions. Views are not created as tables during schema generation. Columns must be declared with explicit names matching the view definition.

Re-exports

ForeignKey, relationship, Mapped, mapped_column are re-exported so model packages only need to import from this module.

Usage

from perfact.api.base.model import Base, ForeignKey, Mapped, mapped_column, relationship

class MyEntity(Base):
    name: Mapped[str]
    parent_id: Mapped[int | None] = mapped_column(ForeignKey("myentity.myentity_id"))

Dependencies

  • sqlalchemy
  • psycopg[c]
  • pydantic-settings

Maintainers

Metadata

Release files for perfact-api-base-model 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for perfact-api-base-model 0.5
File Size Uploaded Provenance
perfact_api_base_model-0.5.tar.gz 5.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for perfact-api-base-model 0.5
File Interpreter ABI Platform
perfact_api_base_model-0.5-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 10.1 kB

Release files / perfact_api_base_model-0.5.tar.gz

Download URL perfact_api_base_model-0.5.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
62e1b08f2f007b5c5a6b2295c0b5571edfe756ca5404dbef54395c28143732aa
BLAKE2b-256 checksum
How to use checksums
c5814d1741f64d48034a9a31ef492dac30014df4360b02d8024f7c79329c045b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / perfact_api_base_model-0.5-py2.py3-none-any.whl

Download URL perfact_api_base_model-0.5-py2.py3-none-any.whl
Size 4.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
537892166997b79ea8898990ac621ebf8d3cacc69d31eaf5ac82fb2deb441b3a
BLAKE2b-256 checksum
How to use checksums
a3ffe51490886ef196bac00f1b0eda15ddfe395c046bc6b660699918384555c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for perfact-api-base-model 0.5

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