Skip to main content

polars-hist-db

A Python library for building bitemporal data pipelines with Polars and MariaDB.

It ingests data from DSV files or NATS JetStream subjects, tracks history using MariaDB's system-versioned tables, and exposes everything as strongly-typed Polars DataFrames.

Features

  • Typed uploads — push Polars DataFrames into MariaDB with automatic type mapping between Polars, SQL, and SQLAlchemy.
  • Typed queries — read tables back into DataFrames with column types inferred from the database 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

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.

Download files

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

Source Distribution

polars_hist_db-0.12.73.tar.gz (948.7 kB view details)

Uploaded Source

Built Distribution

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

polars_hist_db-0.12.73-py3-none-any.whl (171.9 kB view details)

Uploaded Python 3

File details

Details for the file polars_hist_db-0.12.73.tar.gz.

File metadata

  • Download URL: polars_hist_db-0.12.73.tar.gz
  • Upload date:
  • Size: 948.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","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 polars_hist_db-0.12.73.tar.gz
Algorithm Hash digest
SHA256 958cf431044c09da783f7a18c6b572c26930f38d66b7d86dcb8ed93c3db9ff90
MD5 188782f6063f5d0eadfc3dadba9d7269
BLAKE2b-256 1af6ba4f426c9bcd7f06a203af43900a34d7c717b9d5dc5a0040b7fde419cc25

See more details on using hashes here.

File details

Details for the file polars_hist_db-0.12.73-py3-none-any.whl.

File metadata

  • Download URL: polars_hist_db-0.12.73-py3-none-any.whl
  • Upload date:
  • Size: 171.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","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 polars_hist_db-0.12.73-py3-none-any.whl
Algorithm Hash digest
SHA256 ccc6a85af7aff92e8a9bed67e2ba78e1d5a12e767d73d88d9d1327b8be462583
MD5 6c56c721b2c41a13b060a982a289a46d
BLAKE2b-256 330956a6d38a51a3313e64f5637da1f75ef29eeebf17ab8aa6ddf6c64019300f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.12.79

2 files

0.12.78

2 files

0.12.77

2 files

0.12.76

2 files

0.12.75

2 files

0.12.74

2 files

This release

0.12.73 This release

2 files

0.12.72

2 files

0.12.71

2 files

0.12.70

2 files

0.12.69

2 files

0.12.68

2 files

0.12.67

2 files

0.12.66

2 files

0.12.65

2 files

0.12.64

2 files

0.12.63

2 files

0.12.62

2 files

0.12.61

2 files

0.12.60

2 files

0.12.59

2 files

0.12.58

2 files

0.12.57

2 files

0.12.56

2 files

0.12.55

2 files

0.12.54

2 files

0.12.53

2 files

0.12.52

2 files

0.12.51

2 files

0.12.50

2 files

0.12.49

2 files

0.12.48

2 files

0.12.47

2 files

0.12.46

2 files

0.12.45

2 files

0.12.44

2 files

0.12.43

2 files

0.12.42

2 files

0.12.41

2 files

0.12.40

2 files

0.12.39

2 files

0.12.38

2 files

0.12.37

2 files

0.12.36

2 files

0.12.35

2 files

0.12.34

2 files

0.12.33

2 files

0.12.32

2 files

0.12.31

2 files

0.12.30

2 files

0.12.29

2 files

0.12.28

2 files

0.12.27

2 files

0.12.26

2 files

0.12.25

2 files

0.12.24

2 files

0.12.23

2 files

0.12.22

2 files

0.12.21

2 files

0.12.20

2 files

0.12.19

2 files

0.12.18

2 files

0.12.17

2 files

0.12.16

2 files

0.12.15

2 files

0.12.14

2 files

0.12.13

2 files

0.12.12

2 files

0.12.11

2 files

0.12.10

2 files

0.12.9

2 files

0.12.8

2 files

0.12.7

2 files

0.12.6

2 files

0.12.5

2 files

0.12.4

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.2

2 files

0.9.0

2 files

0.8.27

2 files

0.8.26

2 files

0.8.25

2 files

0.8.23

2 files

0.8.22

2 files

0.8.21

2 files

0.8.20

2 files

0.8.19

2 files

0.8.18

2 files

0.8.17

2 files

0.8.16

2 files

0.8.15

2 files

0.8.14

2 files

0.8.13

2 files

0.8.12

2 files

0.8.11

2 files

0.8.10

2 files

0.8.9

2 files

0.8.8

2 files

0.8.7

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

Supported by

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