Skip to main content

polars-refkit

polars-refkit parses, inspects, renders, and formats bibliography source inside eager and lazy Polars queries.

Install

python -m pip install polars-refkit

The package supports Python 3.11 through 3.14 and Polars 1.29 or newer. Importing polars_refkit registers the pl.Expr.refkit namespace.

Run a Citation Expression

import polars as pl
import polars_refkit

frame = pl.DataFrame(
    {
        "bibtex": ["@article{doe2024, author={Doe, Jane}, title={Fast Citations}, year={2024}}"],
        "key": ["doe2024"],
    }
)

result = frame.select(
    citation=pl.col("bibtex").refkit.cite("key"),
    entries=pl.col("bibtex").refkit.entry_count(),
)

Result:

shape: (1, 2)
┌─────────────┬─────────┐
│ citation    ┆ entries │
│ ---         ┆ ---     │
│ str         ┆ u32     │
╞═════════════╪═════════╡
│ (Doe, 2024) ┆ 1       │
└─────────────┴─────────┘

A plain string argument names a column. Wrap literal bibliography source and citation keys with pl.lit(...).

Expression Groups

Job Expressions
Parse and inspect entry_count, can_parse, has_diagnostics, keys, entries, diagnostics, parse_report
Render one citation cite, cite_html, cite_rendered
Render key lists cite_each*, cite_group*
Render every entry full_bibliography_text, full_bibliography_html, full_bibliography_rendered
Format source tidy_bibtex, tidy_bibtex_report

Each bibliography source row is an independent normalized library and render boundary. Value expressions map row-local input, parse, missing-key, and render failures to null. Report expressions expose parser or formatter details. Invalid dtypes, styles, projections, and broadcasting lengths raise when the query executes.

Documentation

polars-refkit is licensed under the Apache License 2.0.

Download files

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

Source Distribution

polars_refkit-0.0.5.tar.gz (82.3 kB view details)

Uploaded Source

Built Distributions

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

polars_refkit-0.0.5-cp311-abi3-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.11+Windows x86-64

polars_refkit-0.0.5-cp311-abi3-pyemscripten_2026_0_wasm32.whl (3.7 MB view details)

Uploaded CPython 3.11+PyEmscripten 2026.0 wasm32

polars_refkit-0.0.5-cp311-abi3-manylinux_2_34_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ x86-64

polars_refkit-0.0.5-cp311-abi3-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file polars_refkit-0.0.5.tar.gz.

File metadata

  • Download URL: polars_refkit-0.0.5.tar.gz
  • Upload date:
  • Size: 82.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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_refkit-0.0.5.tar.gz
Algorithm Hash digest
SHA256 8868a6e36120a759883d38e6101da8878b5e52196c5c07e6c0c12cf5de155906
MD5 b40470498be39fbb23e48e45541fbad1
BLAKE2b-256 f19bfccb09e1fe9826bce5c962999704e4c9034c6de9cc407d43082c8fe78227

See more details on using hashes here.

File details

Details for the file polars_refkit-0.0.5-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: polars_refkit-0.0.5-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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_refkit-0.0.5-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 166e6eea96114d2d30856c0f4d6479283c66351f827f9035e6b363248ac89e2e
MD5 673d8cc324811a342d50a97c5c54407f
BLAKE2b-256 f99c6250652739e6220523d9249a0dd761c2ef318d2eca57f5b38f9c4c7e8b6a

See more details on using hashes here.

File details

Details for the file polars_refkit-0.0.5-cp311-abi3-pyemscripten_2026_0_wasm32.whl.

File metadata

  • Download URL: polars_refkit-0.0.5-cp311-abi3-pyemscripten_2026_0_wasm32.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.11+, PyEmscripten 2026.0 wasm32
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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_refkit-0.0.5-cp311-abi3-pyemscripten_2026_0_wasm32.whl
Algorithm Hash digest
SHA256 b019f6b62856b83275d22bb664a20e31e45f4f3157bf1a32cc2403b50a2aa486
MD5 9485ceff5fff250890b6c9f96bbb1b85
BLAKE2b-256 61fe22e61ba9f8584457b6179f138f6cca277ba63efcd06f2488cefda1704a8e

See more details on using hashes here.

File details

Details for the file polars_refkit-0.0.5-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: polars_refkit-0.0.5-cp311-abi3-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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_refkit-0.0.5-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 82ddaf3353858100a6f400412f65b7086246051e8241e0e78d1116e9f8d0883e
MD5 1f14a3f05abd82e091e4a2e3a1fda0bd
BLAKE2b-256 7c61354ef0f45fe58ad6438da91e81b1c572216f60daa58059dd0d456c18c7de

See more details on using hashes here.

File details

Details for the file polars_refkit-0.0.5-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: polars_refkit-0.0.5-cp311-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.11+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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_refkit-0.0.5-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ffc8b92ac5395e58521f1b63f8026926f65efd4740f85ddcbcc7fc6166608c5f
MD5 6283f2c486815da558dc3176869de0b3
BLAKE2b-256 cd7883535e3cedf16dce3b6357f8392e62181513b5214dd12b3d781f78f586ba

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

5 files

0.2.1

5 files

0.2.0

5 files

0.1.1

5 files

0.1.0

5 files

0.0.8

5 files

0.0.7

5 files

This release

0.0.5 This release

5 files

0.0.3

5 files

0.0.2

5 files

0.0.1

4 files

0.0.0

2 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