refkit
refkit parses bibliography source, renders Citation Style Language citations and bibliographies, formats BibTeX, and preserves raw BibTeX for targeted field edits.
Install
python -m pip install refkit
RefKit supports Python 3.11 through 3.14. Pip selects a compatible native wheel when one is available. A source-distribution build requires a Rust toolchain and a working Python build environment.
Render A Citation
import refkit as rk
library = rk.Library.parse_bibtex(
"""
@article{doe2024,
author = {Doe, Jane},
title = {Fast Citations},
year = {2024}
}
"""
)
document = rk.Document(library, rk.Style.load("apa"), locale="en-US")
rendered = document.render([rk.Citation("intro", "doe2024")])
print(rendered["intro"].text)
Expected output:
(Doe, 2024)
Library owns normalized entries. Document stores the library, style, and locale inputs. Each render call receives the complete ordered citation document and returns named citations with their cited bibliography.
Choose A Model
| Model | Use it for |
|---|---|
Library |
Normalized parsing, lookup, selection, projection, and rendering. |
BibDocument |
Source-order blocks, duplicate occurrences, byte spans, existing-field edits, and preserving writes. |
Every Rendered value exposes text, rendered HTML, and a structured tree. TidyOptions configures canonical BibTeX formatting and duplicate handling.
Use from code-mode agents
Installing refkit also installs its Agent Plugin
and version-matched Agent Skill. Any
code-mode agent that can execute Python can import refkit.agent and inspect
the workflow for the installed API:
import refkit.agent as refkit_agent
help(refkit_agent)
For programmatic access, instructions() returns the packaged skill as Markdown
and resources() returns its known files by skill-relative name:
instructions = refkit_agent.instructions()
resources = refkit_agent.resources()
workflow = resources["references/workflows.md"].read_text()
The agent workflow uses the same Library, Document, BibDocument, and tidy
APIs as other Python callers. Any code-mode environment that can execute Python
can use these imports directly. Clients that understand Agent Plugin metadata
can also discover the packaged resources.
Marimo code mode also discovers refkit.agent
automatically through the capability entry point installed with the wheel.
Marimo currently exposes discovery through its internal preview code-mode
module. The agent integration guide
records both the general Python path and marimo discovery.
Documentation
RefKit is licensed under the Apache License 2.0.
Release files for refkit 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| refkit-0.0.5.tar.gz | 83.1 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| refkit-0.0.5-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| refkit-0.0.5-cp311-abi3-pyemscripten_2026_0_wasm32.whl | CPython 3.11 | abi3 | PyEmscripten 2026.0+ WebAssembly | Details |
| refkit-0.0.5-cp311-abi3-manylinux_2_34_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.34+ x86-64 | Details |
| refkit-0.0.5-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 10.0 MB
Release files / refkit-0.0.5.tar.gz
| Download URL | refkit-0.0.5.tar.gz |
|---|---|
| Size | 83.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab243f15ebb7144b684ca2bad8acea393314b3ea23be971b6b85df483de1d30e
|
|
BLAKE2b-256 checksum How to use checksums |
963f17a9ca3ad38590bfc44f13775cee8a17f7f92786921afb99a3fea825ffc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / refkit-0.0.5-cp311-abi3-win_amd64.whl
| Download URL | refkit-0.0.5-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
aa608273e100045f0fbad1d635f9210d6d2aa14027ccdffe3fb481f86c6390c7
|
|
BLAKE2b-256 checksum How to use checksums |
efa79320eafe305127950f8486f2e333e096092d758be7f9e6aad765dbeea94b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / refkit-0.0.5-cp311-abi3-pyemscripten_2026_0_wasm32.whl
| Download URL | refkit-0.0.5-cp311-abi3-pyemscripten_2026_0_wasm32.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 PyEmscripten 2026.0+ WebAssembly abi3 |
|
SHA-256 checksum How to use checksums |
8c4f690e29cc79647cc27d41722bd943c6b78454ec829e7bff63b0dbc75f1e5f
|
|
BLAKE2b-256 checksum How to use checksums |
ea05a5aa443b17132f4555a852ec56a625fddbed60e21c183efc5bca2e5d6923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / refkit-0.0.5-cp311-abi3-manylinux_2_34_x86_64.whl
| Download URL | refkit-0.0.5-cp311-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a54feabda192d4d1a3ac26e0d1134b6153d484ffc110bee6625b5fc1d5c3bde6
|
|
BLAKE2b-256 checksum How to use checksums |
6c07c4b34fa71dbc9fc5324b18f3f65b238881ab3aaa8e3e5a2d48d82e56892c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / refkit-0.0.5-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | refkit-0.0.5-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
df3adb9bf6d260855f305de62346e94d10d44c788d456d516bf210a8bfd01e98
|
|
BLAKE2b-256 checksum How to use checksums |
79d0a6fe8d5a706c9deade3069e1cff992c12c4903cc76fa5fc1378767dab5ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|