Skip to main content

dbzero-modelkit

Reusable model primitives for projects that store Python objects with dbzero.

dbzero-modelkit provides small, focused building blocks for common model patterns: sparse calendars, active-date windows, month-indexed storage, multilingual strings, FIFO queues, and tag-based object locks. The package is application-neutral and is intended to be imported by any Python project using dbzero.

Installation

pip install dbzero-modelkit

Requirements:

  • Python 3.9 or newer
  • One db backend extra:
    • dbzero-modelkit[dbzero] for dbzero>=0.4.0
    • dbzero-modelkit[dbzero-pro] for dbzero-pro>=0.3.3

Included Models

  • ActiveBase and ActiveIndex for objects that are active only within a date or datetime range.
  • Calendar, MonthCalendar, get_month_index, and get_date_from_month_index for sparse date-based values.
  • LanguageCode and ML_String for primary text values with optional translations.
  • FiFoQueue and FQ_Item for dbzero-backed FIFO queues.
  • MonthStore for one-object-per-month storage with lazy item creation.
  • ObjectLock for temporary tag-based locking of dbzero objects.

Quick Start

Initialize dbzero before creating or loading dbzero-backed model objects:

from datetime import date

import dbzero as db0

from dbzero_modelkit import Calendar, FiFoQueue

db0.init("./db0_data", read_write=True)
db0.open("main", "rw")

calendar = Calendar(base_year=2026)
calendar.set(date(2026, 1, 1), "available")

queue = FiFoQueue()
queue.push_back(kind="email", recipient="user@example.test")

assert calendar.get(date(2026, 1, 1)) == "available"
assert queue.pop_front(1) == [
    {"kind": "email", "recipient": "user@example.test"},
]

db0.close()

Metadata

Release files for dbzero-modelkit 1.2.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 dbzero-modelkit 1.2.0
File Size Uploaded Provenance Actions
dbzero_modelkit-1.2.0.tar.gz 17.3 kB With provenance Details for dbzero_modelkit-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dbzero-modelkit 1.2.0
File Interpreter ABI Platform Actions
dbzero_modelkit-1.2.0-py3-none-any.whl Python 3 none any Details for dbzero_modelkit-1.2.0-py3-none-any.whl

Total release size: 29.5 kB

Release files / dbzero_modelkit-1.2.0.tar.gz

Download URL dbzero_modelkit-1.2.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f5d24574a0068828e2a843231eb3a240bfc48d4feb3651d496d368223e725728
BLAKE2b-256 checksum
How to use checksums
c91bc6d7fec25ab06ec37aa4b443959d482ae6fcf7beb4eba0d05f34996e6fd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.

Transparency log

Release files / dbzero_modelkit-1.2.0-py3-none-any.whl

Download URL dbzero_modelkit-1.2.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bc66646688060bac89ad3ae8a1fcf02d7c5ed409437fea627eba1d5ec68d886
BLAKE2b-256 checksum
How to use checksums
f6c84bf785d7e37538e0319e69ca8bd1d8fb529d0cbee68fcdf24ab173e0f910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.

Transparency log

Security for dbzero-modelkit 1.2.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dbzero_modelkit-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.

Transparency log

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