Skip to main content

bibliofabric: Python clients for scholarly metadata APIs

Samuel Mok // s.mok@utwente.nl

bibliofabric is one package with sixteen clients for scholarly metadata APIs. A client fetches records from one source as typed models, with plain Python calls. Every client comes in an async version and a sync version that share the same methods, and all of them stand on one core that handles HTTP, retries, rate limits, paging, and error mapping.

Installation

uv add bibliofabric

Requires Python 3.12 or newer. The clients aireloom, aletheca, and stavrophora were folded into this package as bibliofabric.openaire, bibliofabric.openalex, and bibliofabric.crossref; the migration guide lists every rename.

Use a client

from bibliofabric.crossref import CrossrefSyncClient

with CrossrefSyncClient() as client:
    work = client.works.get("10.1038/nature12373")
    print(work.primary_title)

The script prints Nanometre-scale thermometry in a living cell. The async client makes the same calls with await:

import asyncio

from bibliofabric.crossref import CrossrefClient


async def main() -> None:
    async with CrossrefClient() as client:
        work = await client.works.get("10.1038/nature12373")
        print(work.primary_title)


asyncio.run(main())

The sync client uses httpx.Client, time.sleep, and threads. It never starts an event loop, so it works in plain scripts, in Jupyter, and inside a running event loop.

The Quick start continues with search, paging, and error handling. The guide What every client gives you explains the methods that all clients share, and every client has its own quick start and guide at utsmok.github.io/bibliofabric.

Clients

Each client is a subpackage of bibliofabric, named after its source. No client needs a key to start. Where a key exists, the table names the variable that holds it.

Client Import What you get Key
OpenAlex bibliofabric.openalex works, authors, sources, institutions, topics, funders, and the citation graph free key recommended, OPENALEX_API_KEY
OpenAIRE bibliofabric.openaire research products, projects, organizations, data sources, persons, and links between publications and data none, OPENAIRE_CLIENT_ID and OPENAIRE_CLIENT_SECRET for a larger quota
Crossref bibliofabric.crossref works, journals, funders, members, prefixes, licenses, and the beta data citation index none, CROSSREF_MAILTO for the faster pool
ROR bibliofabric.ror research organizations and funders, with search and bulk data dumps none
Zenodo bibliofabric.zenodo records, files, communities, vocabularies, and OAI-PMH harvesting none, ZENODO_API_TOKEN for private records
DataCite bibliofabric.datacite DOIs, clients, providers, repositories, prefixes, events, and GraphQL none
OpenCitations bibliofabric.opencitations citation links between DOI-identified publications, and their metadata none
DOI bibliofabric.doi the registration agency of a DOI, metadata as CSL, DataCite, or Schema.org, and Handle records none
Semantic Scholar bibliofabric.semanticscholar papers, authors, citations, references, recommendations, datasets, snippets, and patents key recommended, SEMANTICSCHOLAR_API_KEY
ORCID bibliofabric.orcid researcher records with works, employment, education, and peer reviews none, ORCID_ACCESS_TOKEN for a larger quota
Europe PMC bibliofabric.europepmc articles, full text, citations, references, annotations, grants, and preprints none
Wikidata bibliofabric.wikidata entities, claims, search, site links, lexemes, and SPARQL none
DOAJ bibliofabric.doaj open access journals and articles none
ISSN Portal bibliofabric.issn ISSN records and title word abbreviations none
arXiv bibliofabric.arxiv preprints by query, with paging none
bioRxiv and medRxiv bibliofabric.rxiv preprints, their versions, the articles they became, funders, and usage statistics none

What every client does the same way

Every client shares one set of methods, so you learn them once. get() fetches one record. search() returns one page, and iterate(), collect(), first(), and count() work with the whole result set. batch_get() fetches many records at once. Clients read their settings from environment variables, accept identifiers such as DOIs in several forms, raise typed exceptions, and retry after a rate limit on their own.

Build a client on the core

A client for a source that isn't covered yet defines four things: a settings subclass, a response unwrapper, a query dialect, and one ResourceClient subclass per endpoint. The sync twin is generated from the async code. The guide to building a client walks through every step with a complete example, and the pages next to it describe the core (BaseApiClient, QueryDialect, Page, and the exception hierarchy).

Contributing and license

See the contributing guide. This project is licensed under the MIT License.

Metadata

Release files for bibliofabric 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bibliofabric 0.9.1
File Size Uploaded Provenance Actions
bibliofabric-0.9.1.tar.gz 447.4 kB With provenance Details for bibliofabric-0.9.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bibliofabric 0.9.1
File Interpreter ABI Platform Actions
bibliofabric-0.9.1-py3-none-any.whl Python 3 none any Details for bibliofabric-0.9.1-py3-none-any.whl

Total release size: 1.1 MB

Release files / bibliofabric-0.9.1.tar.gz

Download URL bibliofabric-0.9.1.tar.gz
Size 447.4 kB
Tags Source
SHA-256 checksum
How to use checksums
369c17cb88f721d6711305dde0b0c6a81d976a185727c3f91fa54abe68a8df9c
BLAKE2b-256 checksum
How to use checksums
8f6d5b8297a8636129e9c93aa1a8e7d154906643e0a97ac3294a48bb321c7535
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / bibliofabric-0.9.1-py3-none-any.whl

Download URL bibliofabric-0.9.1-py3-none-any.whl
Size 655.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1482addedca8f8ff63f85c4f5367bcfc147af245a46034e26e500a233f680bb
BLAKE2b-256 checksum
How to use checksums
38ecd876dfc5cd7673b7d31499f1f22ff4699d3da43f1b6610ecbd02deb2ebdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for bibliofabric 0.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bibliofabric-0.9.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page