Skip to main content

polars-hist-db

A Python library for building bitemporal data pipelines with Polars, MariaDB, and optional XTDB backend support.

It ingests data from DSV files or NATS JetStream subjects, tracks history through a typed temporal table contract, and exposes everything as strongly-typed Polars DataFrames.

Features

  • Typed uploads — push Polars DataFrames into MariaDB or XTDB with automatic type mapping between Polars, SQL, and SQLAlchemy/ADBC.
  • Typed queries — read tables back into DataFrames with column types inferred from the configured backend schema. Temporal query hints (asof, span, all) let you slice history without writing SQL.
  • YAML-driven pipelines — define scrape specifications that handle column typing, enrichment via custom transform functions, normalization across tables, and foreign-key deduction.
  • Deduplication — an audit log tracks what has already been ingested so re-runs skip previously processed files or messages.
  • Transactional ingestion — each file or message is processed in its own transaction; failures roll back cleanly without affecting other items.
  • Dual input sources — crawl directories for DSV files, or consume messages from NATS JetStream with configurable fetch/subscription strategies.
  • Delta upserts — staging tables detect changed rows, handle duplicates (take_first, take_last, error), and optionally mark disappeared rows as dropped.

Full documentation: jr200.github.io/polars-hist-db

Quick Start

uv sync
make test

Development

Development and CI use Python 3.15.2, selected by .python-version; uv installs that interpreter automatically. The library supports Python 3.12–3.15 (>=3.12,<3.16). The development interpreter is independent of this compatibility contract. Renovate may update the interpreter within that range, but changes to requires-python require an explicit compatibility review. With the current lockfile, Python 3.15 builds pycrdt, scandir-rs, and the optional ADBC driver manager from source. Install a Rust toolchain supporting the 2024 edition and a C/C++ compiler before running uv sync --group dev --extra xtdb.

make check       # ruff + mypy
make docs        # render and preview quarto docs
make bump PART=patch
make release

License

This project is licensed under the MIT license.

Metadata

Release files for polars-hist-db 0.12.86

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

Source distribution (sdist)

Source distribution for polars-hist-db 0.12.86
File Size Uploaded Provenance Actions
polars_hist_db-0.12.86.tar.gz 1.0 MB Without provenance Details for polars_hist_db-0.12.86.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for polars-hist-db 0.12.86
File Interpreter ABI Platform Actions
polars_hist_db-0.12.86-py3-none-any.whl Python 3 none any Details for polars_hist_db-0.12.86-py3-none-any.whl

Total release size: 1.2 MB

Release files / polars_hist_db-0.12.86.tar.gz

Download URL polars_hist_db-0.12.86.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
4a9e5bf355e462b45c961301a3e2d8d9c3b8b39868f1e00117ae2272377b07bd
BLAKE2b-256 checksum
How to use checksums
a3b0f794160ce633dcd87d5947df8a784497696353b22742144f59e7eeabf810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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}

Release files / polars_hist_db-0.12.86-py3-none-any.whl

Download URL polars_hist_db-0.12.86-py3-none-any.whl
Size 177.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea43e43fe066a6e9160c0d0b0b855796f0b13c64840cde1bd10b527f73a69b7b
BLAKE2b-256 checksum
How to use checksums
a36df12d656ef78d32c08477a99ece82f7027fbd4ffa83d5a9e659cb72c85fc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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}

Security for polars-hist-db 0.12.86

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

0.12.86 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