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.64.tar.gz (907.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.64-py3-none-any.whl (142.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polars_hist_db-0.12.64.tar.gz
  • Upload date:
  • Size: 907.7 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.64.tar.gz
Algorithm Hash digest
SHA256 fa6dc7b0b81d405c91eba487350c291179e690576c505700cb14b464d92b8061
MD5 a590b87fd916c058668e14b5ac57c5bd
BLAKE2b-256 0b76e8c1518dc1b759ff724af38f2ba26d99ecfadce448e9666b4a5059c021a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: polars_hist_db-0.12.64-py3-none-any.whl
  • Upload date:
  • Size: 142.4 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.64-py3-none-any.whl
Algorithm Hash digest
SHA256 1060b9151c92b87a13b3aa8d9d91e88629a5be2109cffadc501e68bd1a8b95bf
MD5 b5a862f3ae873678878dc027bcbb69c7
BLAKE2b-256 b91298ddc1e110938204678865bfff913947ad5991c1ac3b36a2f496d967f1f1

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

0.12.67

2 files

0.12.66

2 files

0.12.65

2 files

This release

0.12.64 This release

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