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)

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
Edit raw BibTeX BibDocument, BibEntry, BibField
Inspect rendered output Rendered.text, Rendered.html, Rendered.tree

refkit-core does not provide the one-call path helpers from refkit, 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 current Pyodide lane targets Python 3.14 and the pyemscripten_2026_0_wasm32 ABI.

Development

uv sync --all-packages --group dev
(cd packages/refkit-core-py && 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.1.tar.gz (64.0 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.1-cp311-abi3-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.11+Windows x86-64

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

Uploaded CPython 3.11+PyEmscripten 2026.0 wasm32

refkit_core-0.0.1-cp311-abi3-manylinux_2_34_x86_64.whl (2.7 MB view details)

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

refkit_core-0.0.1-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.1.tar.gz.

File metadata

  • Download URL: refkit_core-0.0.1.tar.gz
  • Upload date:
  • Size: 64.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","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.1.tar.gz
Algorithm Hash digest
SHA256 4567c8882295df555e9cb7546f54fe46705664b82019cf9f409383b03dfc87ce
MD5 df86b9bd7ea123e964a90f92b583ac81
BLAKE2b-256 0f5cbedff7fc1ee29862f3dd9d886e8fb91c0ade09ce64fba07c9d91019b20c9

See more details on using hashes here.

File details

Details for the file refkit_core-0.0.1-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: refkit_core-0.0.1-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.25 {"installer":{"name":"uv","version":"0.11.25","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.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 534d68af7f38d977e4c3ef1e8fc782a8e72f7bfb12850c1cf20ca3ce94363b38
MD5 6ae57b0264b97d5bfd27b2e430ee8092
BLAKE2b-256 2db39625cce29046631503c38746476ea7cfbc72fdc2e2f6d414cb5aaa5053f0

See more details on using hashes here.

File details

Details for the file refkit_core-0.0.1-cp311-abi3-pyemscripten_2026_0_wasm32.whl.

File metadata

  • Download URL: refkit_core-0.0.1-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.25 {"installer":{"name":"uv","version":"0.11.25","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.1-cp311-abi3-pyemscripten_2026_0_wasm32.whl
Algorithm Hash digest
SHA256 e3296483b4d742d7a4b21afa0e26d2bbf5cfa8fcbc85343289f5c2e01844eed8
MD5 4e579f98faa66022d48a5e17a93c0e0a
BLAKE2b-256 f5a051821625d79d864152af875e67af66db6710fc9f105c917634b485093f68

See more details on using hashes here.

File details

Details for the file refkit_core-0.0.1-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: refkit_core-0.0.1-cp311-abi3-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","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.1-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1a0bce8068db4af3db60c56cf88f58ce48665bb1b732663e651559cc09d954e3
MD5 694a8ca01dc64d3968d6623baa73c9de
BLAKE2b-256 91fa78fefe07b26d3dff786591c478d8c493f5b784fa89c4e61d151599cd8201

See more details on using hashes here.

File details

Details for the file refkit_core-0.0.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: refkit_core-0.0.1-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.25 {"installer":{"name":"uv","version":"0.11.25","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.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 03268105f36ab3369bf40f6f0efdf035ef642d6e19bc077f7d95171c4da6834e
MD5 f6a1ef3831890096e6f764c84c301c09
BLAKE2b-256 62d8752e544ff1c7b33ce481e048bbefa178a77996e7d9d25795a71d7f958859

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