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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8868a6e36120a759883d38e6101da8878b5e52196c5c07e6c0c12cf5de155906
|
|
| MD5 |
b40470498be39fbb23e48e45541fbad1
|
|
| BLAKE2b-256 |
f19bfccb09e1fe9826bce5c962999704e4c9034c6de9cc407d43082c8fe78227
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
166e6eea96114d2d30856c0f4d6479283c66351f827f9035e6b363248ac89e2e
|
|
| MD5 |
673d8cc324811a342d50a97c5c54407f
|
|
| BLAKE2b-256 |
f99c6250652739e6220523d9249a0dd761c2ef318d2eca57f5b38f9c4c7e8b6a
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b019f6b62856b83275d22bb664a20e31e45f4f3157bf1a32cc2403b50a2aa486
|
|
| MD5 |
9485ceff5fff250890b6c9f96bbb1b85
|
|
| BLAKE2b-256 |
61fe22e61ba9f8584457b6179f138f6cca277ba63efcd06f2488cefda1704a8e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82ddaf3353858100a6f400412f65b7086246051e8241e0e78d1116e9f8d0883e
|
|
| MD5 |
1f14a3f05abd82e091e4a2e3a1fda0bd
|
|
| BLAKE2b-256 |
7c61354ef0f45fe58ad6438da91e81b1c572216f60daa58059dd0d456c18c7de
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffc8b92ac5395e58521f1b63f8026926f65efd4740f85ddcbcc7fc6166608c5f
|
|
| MD5 |
6283f2c486815da558dc3176869de0b3
|
|
| BLAKE2b-256 |
cd7883535e3cedf16dce3b6357f8392e62181513b5214dd12b3d781f78f586ba
|