Skip to main content

Native core for refkit citation parsing, rendering, and BibTeX editing

Project description

refkit-core

refkit-core is the native Rust/PyO3 package used by refkit. It exposes the extension module refkit_core._refkit_core and the Python import package refkit_core.

Most projects should install refkit:

pip install refkit

refkit pins one exact refkit-core version and checks that version at import time. Direct refkit_core imports are supported for native integration tests, packaging smoke tests, and low-level embedding.

import refkit_core

library = refkit_core.Library.parse_bibtex(
    """
@article{doe2024,
  author = {Doe, Jane},
  title = {Fast Citations},
  journal = {Journal of Citation Tests},
  year = {2024}
}
"""
)
document = refkit_core.Document(library, refkit_core.Style.load("apa"), locale="en-US")
rendered = document.render([refkit_core.Citation("intro", "doe2024")])

print(rendered["intro"].text)

Expected output:

(Doe, 2024)

tidy_bibtex formats BibTeX text through the same native package:

result = refkit_core.tidy_bibtex(
    "@ARTICLE{doe2024, pages={6-13}, year={2024}}\n",
    options=refkit_core.TidyOptions(sort_fields=True),
)

print(result.bibtex)

Package Contract

refkit-core owns the native implementation for:

Capability Public objects
Read normalized bibliography data Library.read, Library.parse_bibtex, Library.parse_yaml
Render citations Document.render, Citation, Cite, CitationGroup
Render bibliographies Document.cited_bibliography, Document.full_bibliography
Load CSL styles and locales Style.load, Style.from_path, Style.from_xml, Locale.load
Format BibTeX tidy_bibtex, TidyOptions, TidyResult, TidyWarning
Edit raw BibTeX BibDocument, BibEntry, BibField
Inspect rendered output Rendered.text, Rendered.html, Rendered.tree

Use refkit for one-call path helpers such as refkit.cite and refkit.full_bibliography.

Pyodide

Pyodide uses the same native extension package as CPython. The release workflow builds refkit-core for wasm32-unknown-emscripten with toolchain values from pyodide config get, then publishes the PyEmscripten wheel alongside the CPython wheels. The pure Python refkit package keeps the same exact dependency on refkit-core, so Pyodide resolves the matching wheel from PyPI. The Pyodide lane takes the Python target and PyEmscripten ABI from the release workflow.

Development

uv sync --all-packages --group dev
(cd packages/refkit-core && uv run maturin develop)
uv run pytest packages/refkit/tests --no-cov

Build only the native package:

uv build --package refkit-core --no-create-gitignore

License

refkit-core is licensed under the Apache License, Version 2.0, available in LICENSE. See NOTICE for upstream citation and bibliography component acknowledgements.

Project details


Download files

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

Source Distribution

refkit_core-0.0.4rc1.tar.gz (77.1 kB view details)

Uploaded Source

Built Distributions

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

refkit_core-0.0.4rc1-cp311-abi3-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.11+Windows x86-64

refkit_core-0.0.4rc1-cp311-abi3-pyemscripten_2026_0_wasm32.whl (1.9 MB view details)

Uploaded CPython 3.11+PyEmscripten 2026.0 wasm32

refkit_core-0.0.4rc1-cp311-abi3-manylinux_2_34_x86_64.whl (2.8 MB view details)

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

refkit_core-0.0.4rc1-cp311-abi3-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file refkit_core-0.0.4rc1.tar.gz.

File metadata

  • Download URL: refkit_core-0.0.4rc1.tar.gz
  • Upload date:
  • Size: 77.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 refkit_core-0.0.4rc1.tar.gz
Algorithm Hash digest
SHA256 aeee4410f89e79e4b85b333ebb6a777b1acddeda488d9a2b40aa5051fd7fb4ff
MD5 e27e927e5c0925ce8e57b9da4a08763b
BLAKE2b-256 5a207d20e6e45ce55a0e29922e82264b91644b17e9f6828bd990ecb1d837d416

See more details on using hashes here.

File details

Details for the file refkit_core-0.0.4rc1-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: refkit_core-0.0.4rc1-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 refkit_core-0.0.4rc1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2beb49ee8d8aaf3860ed2ba936aa46aff0a78c5473915829da7a17a150a2010a
MD5 c9429947c57c7d73dae9fb605c0dbce4
BLAKE2b-256 44e8cc05401ae10bea868b159bf5135a8b40024dab7197ca7df74ee8084d305d

See more details on using hashes here.

File details

Details for the file refkit_core-0.0.4rc1-cp311-abi3-pyemscripten_2026_0_wasm32.whl.

File metadata

  • Download URL: refkit_core-0.0.4rc1-cp311-abi3-pyemscripten_2026_0_wasm32.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.11+, PyEmscripten 2026.0 wasm32
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 refkit_core-0.0.4rc1-cp311-abi3-pyemscripten_2026_0_wasm32.whl
Algorithm Hash digest
SHA256 bbbae9ca09a18c33cd76a326a56fb36cc1c70958c6e9ffe695f5058e6e5b1c6c
MD5 e505c5af88279757394721dab2f6c5e8
BLAKE2b-256 39d3126b36ebb1e83f08075dc24609f0628aefd2225d89952f8c340ee2f0d9fc

See more details on using hashes here.

File details

Details for the file refkit_core-0.0.4rc1-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: refkit_core-0.0.4rc1-cp311-abi3-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 refkit_core-0.0.4rc1-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fc5698f0b2e008b909690fad8a074f4353e80b1d64eebbdded31547c7e738634
MD5 7277c45cbd380ebc6dec514582a13d4c
BLAKE2b-256 f3c8f71759069eebb55808147ce6060acc6c20fb6d6811fe6a66bbaecb959658

See more details on using hashes here.

File details

Details for the file refkit_core-0.0.4rc1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: refkit_core-0.0.4rc1-cp311-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.11+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 refkit_core-0.0.4rc1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 895160ed88739b53fc632105cbe48c710f29dc6b10c26f1010b752e29f8cd5a8
MD5 3f164f23d7bb35a58aae495a3b214c55
BLAKE2b-256 15365bbc0c1e193ec7f8cab4a8dae6a4e8763316e987986f910de7627f6e7e6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page