bibliography-io
bibliography-io provides standalone APIs for loading and writing
bibliographic records. Using the base installation does not require CoLRev or
GROBID.
Installation
Install the base bibliography-io package with:
python -m pip install bibliography-io
Optional dependencies enable Markdown parsing and Excel file support:
python -m pip install "bibliography-io[markdown]"
python -m pip install "bibliography-io[excel]"
python -m pip install "bibliography-io[all]" # both
Markdown parsing uses the standalone grobid-tei client and requires a
GROBID service started by the caller. The loader is designed to operate
independently of the workflow application that uses it; it does not start, stop,
or otherwise manage GROBID. The service URL defaults to
http://localhost:8070; set the BIBLIOGRAPHY_IO_GROBID_URL environment
variable to provide another URL. An unavailable service raises
BackendExecutionError. Excel loading and writing require the excel
extra. Markdown table writing is included in bibliography-io without an extra.
Quick example
from bibliography_io import load_raw, write
records = load_raw("references.bib")
write(records, path="references.ris")
File APIs infer formats from recognized filename suffixes. String APIs require an explicit format:
from bibliography_io import to_string
from bibliography_io import loads_raw
records = loads_raw("@article{example, title={An example}}", format="bib")
bibtex = to_string(records, format="bib")
See Usage for supported formats, API reference for the public interface, Source extensions for bibliography-io for CoLRev source hooks, and Design principles for the standalone API and compatibility contract.