Skip to main content

SQLite db and generated Python models for EBA DPM 2.0 databases with full type safety

Project description

DPM2

Generated Python models for EBA DPM 2.0 databases with full type safety and SQLAlchemy integration.

Purpose

This package contains auto-generated, type-safe Python models for working with EBA DPM 2.0 databases. It provides:

  • Fully typed SQLAlchemy ORM models
  • Relationship mapping between tables
  • Bundled SQLite database ready to query
  • IDE support with autocompletion and type checking

Installation

pip install dpm2

Usage

from sqlalchemy import select
from dpm2 import get_db, models

# Get an in-memory engine backed by the bundled database (default)
engine = get_db()

# Type-safe queries with full IDE support
with engine.connect() as conn:
    stmt = select(models.ConceptClass)

    for row in conn.execute(stmt):
        print(row)

Engine options

from dpm2 import get_db, disk_engine

# In-memory copy (default) - fast, safe for temporary work
engine = get_db()

# Read-only file-backed engine - lower memory usage
engine = get_db(in_memory=False)

# Custom path with disk_engine
from pathlib import Path
engine = disk_engine(Path("my_local_copy.sqlite"))

Features

  • Complete Type Safety - All columns, relationships, and constraints are fully typed
  • IDE Integration - Full autocompletion and error detection
  • SQLAlchemy 2.0+ - Uses modern SQLAlchemy with Mapped annotations
  • Relationship Navigation - Foreign keys mapped to navigable Python objects
  • Bundled Database - Ships with a ready-to-query SQLite database

Generated Models

This package is automatically generated from the latest EBA DPM release and includes models for all DPM tables with proper relationships and constraints.

Regeneration

Models are regenerated with each new EBA DPM release. Install the latest version to get updated schemas and data structures.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpm2-2026.3.9.1.tar.gz (91.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dpm2-2026.3.9.1-py3-none-any.whl (91.9 MB view details)

Uploaded Python 3

File details

Details for the file dpm2-2026.3.9.1.tar.gz.

File metadata

  • Download URL: dpm2-2026.3.9.1.tar.gz
  • Upload date:
  • Size: 91.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dpm2-2026.3.9.1.tar.gz
Algorithm Hash digest
SHA256 c97a573bf632ca2a378ff72ebfd7678fbce77dbbc4a04b87df511dc405e0938a
MD5 90fe660106f219a908d48097414eb4a1
BLAKE2b-256 8fd3bbcdc664618458fac02c58ac36dfba40158af586eb648c7779aa4ba75f0a

See more details on using hashes here.

File details

Details for the file dpm2-2026.3.9.1-py3-none-any.whl.

File metadata

  • Download URL: dpm2-2026.3.9.1-py3-none-any.whl
  • Upload date:
  • Size: 91.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dpm2-2026.3.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9022a5b2d1edf6c76b1aeb2aa2667591868b1d5d278cfd88d945f1150f716d0
MD5 2ea8fec7aad42c49f17bd5345e7c0e75
BLAKE2b-256 f69b36a8b49d51ab7ddf3cfa410f947bcde355d193507e9bf8eb367c68ff9def

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page