Welcome to python-bibtexparser, a parser for .bib
files with a long history and wide adaption.
Bibtexparser is available in two versions: V1 and V2. For new projects, we recommend using v2 which, in the long run, will provide an overall more robust and faster experience. For now, however, note that v2 is an early beta, and does not contain all features of v1. Install v2 using pip:
pip install python-bibtexparser --pre
Or you can install the latest development version directly from the main branch:
pip install --no-cache-dir --force-reinstall git+https://github.com/sciunto-org/python-bibtexparser@main
If instead, you want to use v1, install it using:
pip install bibtexparser~=1.0
Note that all development and maintenance effort is focussed on v2. Small PRs for v1 are still accepted, but only as long as they are backwards compatible and don't introduce much additional technical debt. Development of version one happens on the dedicated v1 branch.
The remainder of this README is specific to v2.
Go check out our documentation on https://bibtexparser.readthedocs.io/en/main/.
- 🚀 Order of magnitudes faster
- 🔧 Easily customizable parsing and writing
- 🌿 Access to raw, unparsed bibtex.
- 💩 Fault-Tolerant: Able to parse files with syntax errors
- 🀄 Massively simplified, robuster handling of de- and encoding (special chars, ...).
- ©️ Permissive MIT license
# Parsing a bibtex string with default values
bib_database = bibtexparser.parse_string(bibtex_string)
# Converting it back to a bibtex string, again with default values
new_bibtex_string = bibtexparser.write_string(bib_database)