Skip to main content

perfact-api-base

Base package for PerFact API common infrastructure. 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 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 perfact-api-base 1.0
File Size Uploaded Provenance
perfact_api_base-1.0.tar.gz 11.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 17.0 kB

Release files / perfact_api_base-1.0.tar.gz

Download URL perfact_api_base-1.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
db87428275353a05d8a288b47714580361db29b1d7b522ae2f76f9a7761ec146
BLAKE2b-256 checksum
How to use checksums
d1c5cffd747d1dfaa225759d46ba78981651bc65138623f35e27d45efcab38f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / perfact_api_base-1.0-py2.py3-none-any.whl

Download URL perfact_api_base-1.0-py2.py3-none-any.whl
Size 5.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4e0b96fd59c81ba5290e0b068f56092d3c39310f175ebf4b22f8468719e064ea
BLAKE2b-256 checksum
How to use checksums
10d2674a1e68fb75d9f9e9e3762ddee54e5e67eb06cb96e4ce86ffed0e527684
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for perfact-api-base 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.

Release history Release notifications | RSS feed

This release

1.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