bibpy v1.0.1
Python library for parsing bib(la)tex files and manipulating entries.
- Automatic conversion of entry fields to and from appropriate Python types
- Requirements-checking for entry fields
- String variable expansion and unexpansion
- Crossreference and xdata inheritance
- Accompanying tools
Installation
pip install bibpy
Quickstart
>>> import bibpy
>>> result = bibpy.read_file('references.bib') # Read a bib file
>>> entries = result.entries
>>> print len(entries)
6
>>> print entries[0].author
'D. J. Power'
>>> print entries[0].bibkey
'2006_power'
>>> print entries[0].bibtype
'online'
>>> 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.
Tools
bibpy also comes with three tools that are installed as runnable scripts.
bibformat: Clean up, format and align referencesbibgrep: Find and filter references using a simple query languagebibstats: Display statistics about bib files
All three tools are described in more detail in the tutorial.
Metadata
Release files for bibpy 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bibpy-1.0.1.tar.gz | 156.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bibpy-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 205.1 kB
Release files / bibpy-1.0.1.tar.gz
| Download URL | bibpy-1.0.1.tar.gz |
|---|---|
| Size | 156.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e24dfc5baf1b826d8d105ba652daf27f2b05cb431cde717482ad1fbf5593c39d
|
|
BLAKE2b-256 checksum How to use checksums |
ce3940e1fbc97049d741a5c24cf63d606fd028857b951cb92b42845afc7ff283
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.1
|
Release files / bibpy-1.0.1-py3-none-any.whl
| Download URL | bibpy-1.0.1-py3-none-any.whl |
|---|---|
| Size | 49.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08ae3c98cdd2198941e2395af0d47af3c5904ace8b92a4dad72b62f8b81740d6
|
|
BLAKE2b-256 checksum How to use checksums |
0fa876fcce28a4af04dbffaf1b729b7da15a07ea81a57b8db11683921dfe89e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.1
|