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, selected by .python-version; uv installs that interpreter automatically. The library continues to support Python 3.12+. 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.81

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.81
File Size Uploaded
polars_hist_db-0.12.81.tar.gz 1.0 MB Details

Built distribution (wheel)

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

Total release size: 1.2 MB

Release files / polars_hist_db-0.12.81.tar.gz

Download URL polars_hist_db-0.12.81.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
07c46e6385e4f4a42b5a4373e9b36f0c8902f512f3e188901542946baa7c1ca4
BLAKE2b-256 checksum
How to use checksums
6db37de89e597a60990133cbe5e8cc748d630da600f2925143628ec7c1bec37c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.81-py3-none-any.whl

Download URL polars_hist_db-0.12.81-py3-none-any.whl
Size 176.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdc09f226521b90d3f76db0ef49203cda18f7e783f9bc3d56f9aa0793f18d07d
BLAKE2b-256 checksum
How to use checksums
38c39a0bd20267b4d107eec5668d993a366120aa56fe5624780de5f601c7f583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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 history Release notifications | RSS feed

This release

0.12.81 This release

2 release files

0.12.9

2 release files

0.12.5

2 release files

0.12.4

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.9.2

2 release files

0.9.0

2 release files

0.8.27

2 release files

0.8.26

2 release files

0.8.25

2 release files

0.8.23

2 release files

0.8.22

2 release files

0.8.21

2 release files

0.8.20

2 release files

0.8.19

2 release files

0.8.18

2 release files

0.8.17

2 release files

0.8.16

2 release files

0.8.15

2 release files

0.8.14

2 release files

0.8.13

2 release files

0.8.12

2 release files

0.8.11

2 release files

0.8.10

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

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