Skip to main content

Bib(la)tex parsing and useful tools

Project description

bibpy v1.0.0

Build status Read the Docs Coverage Status GitHub license PyPI PyPI wheel Python version

Python library for parsing bib(la)tex files and manipulating entries.


pip install bibpy


>>> import bibpy
>>> result = bibpy.read_file('references.bib')  # Read a bib file
>>> entries = result.entries
>>> print len(entries)
>>> print entries[0].author
'D. J. Power'
>>> print entries[0].bibkey
>>> print entries[0].bibtype
>>> print entries[0].valid('bibtex')
True  # Entry is a valid bibtex entry
>>> print entries[0].valid('biblatex')
False  # But is not a valid biblatex entry (missing field 'date' or 'year')
>>> print entries[0].aliases('bibtex')
>>> print entries[0].aliases('biblatex')
['electronic', 'www']
>>> bibpy.write_file('references.bib', entries)

See the examples folder for more usage examples or read the tutorial.


bibpy also comes with three tools that are installed as runnable scripts.

  • bibformat: Clean up, format and align references
  • bibgrep : Find and filter references using a simple query language
  • bibstats : Display statistics about bib files

All three tools are described in more detail in the tutorial.

Project details

Download files

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

Files for bibpy, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size bibpy-1.0.0-py3-none-any.whl (53.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size bibpy-1.0.0.tar.gz (153.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page