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.67.tar.gz (911.0 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.67-py3-none-any.whl (143.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polars_hist_db-0.12.67.tar.gz
  • Upload date:
  • Size: 911.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.67.tar.gz
Algorithm Hash digest
SHA256 a209110e89e01f0c44b3c6c9d61d74e1637e6624ab306ddff4dc51ba43c16f9d
MD5 df0c85e82359654dbd541173c53eca40
BLAKE2b-256 a41a36b941b0df347b8c732dd818e7cd5c4d3d1be69e58bac308bc8435111106

See more details on using hashes here.

File details

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

File metadata

  • Download URL: polars_hist_db-0.12.67-py3-none-any.whl
  • Upload date:
  • Size: 143.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.67-py3-none-any.whl
Algorithm Hash digest
SHA256 071734d8987d00af96182add5aa611c4253013e630a3e83e17837184d64df96a
MD5 29949b8ddaa7e39d27be5581fa3b95b7
BLAKE2b-256 cbda768b279ccf7b18d67d895be5958551493b7cb72cd50b228fe26c39716740

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

0.12.73

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

This release

0.12.67 This release

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