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.60.tar.gz (899.5 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.60-py3-none-any.whl (140.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polars_hist_db-0.12.60.tar.gz
  • Upload date:
  • Size: 899.5 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.60.tar.gz
Algorithm Hash digest
SHA256 a2ac8102218775c85e8cbb874cd2969617fbeee3e3865d39e3222d3607fb75a3
MD5 18e1ded8c36af1f0f290e5b26e6fa1d4
BLAKE2b-256 577c2c6da13d43030b65d1ce79148e32a32c921528001a937542b5b6df701571

See more details on using hashes here.

File details

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

File metadata

  • Download URL: polars_hist_db-0.12.60-py3-none-any.whl
  • Upload date:
  • Size: 140.1 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.60-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf38c8e0ba26cc08c965acb145f0af9177c18ae3a61f446bbc359d07d21b275
MD5 9fa41248e87780be7872bee3be9e0cd1
BLAKE2b-256 6f550774f98e305d67bbc94ca7dc3dbc303edfdec5cd1b79ff02944196a62003

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

0.12.64

2 files

0.12.63

2 files

0.12.62

2 files

0.12.61

2 files

This release

0.12.60 This release

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