| Crates.io | crate2bib |
| lib.rs | crate2bib |
| version | 0.7.1 |
| created_at | 2025-01-21 03:01:43.199165+00 |
| updated_at | 2025-11-16 14:26:32.419225+00 |
| description | Create BibLaTeX entries for crates hosted on crates.io |
| homepage | |
| repository | https://github.com/jonaspleyer/crate2bib |
| max_upload_size | |
| id | 1524531 |
| size | 110,561 |
Converts a given crate and version number to a BibLaTeX entry.
The crate will try to determine if a publication is already available by scanning for possible
CITATION.cff files.
It will further generate entries from the information available at crates.io.
There are 4 distinct ways of using this package:
def get_biblatex(
crate_name: str,
semver: Optional[str] = None,
user_agent: Optional[str] = None,
branch_name: Optional[str] = None,
filenames: Sequence[str] = ['CITATION.cff', 'citation.bib'],
) -> typing.Any:
r"""
Wraps the [crate2bib::get_biblatex] function.
Args:
crate_name: Name of the crate to get BibLaTeX entry
version: A semver-compliant version number for the crate
user_agent: The name of the user agent. Defaults to None.
branch_name: Name of the branch where to look for citaiton files.
filenames: Filenames to search for within repository.
Returns:
list: A list of formatted BibLaTeX entries.
"""
...
import asyncio
from crate2bib import get_biblatex
async def obtain_result():
results = await get_biblatex(
"serde", "1.0.228", "crate2bib-py-testing-serde-user-agent"
)
biblatex = results[0]
print(biblatex)
> @software {Tolnay2025,
> author = {David Tolnay},
> title = {{serde}: A generic serialization/deserialization framework},
> url = {https://github.com/serde-rs/serde},
> date = {2025-09-27},
> version = {1.0.228},
> license = {MIT OR Apache-2.0},
> }