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

The sixteen clients are subpackages of bibliofabric, named after their source. The client table in the documentation is the canonical list: for each client it shows the import, what you get, and the optional credential. No client needs a key to start.

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 Resource 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.11.0

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.11.0
File Size Uploaded Provenance Actions
bibliofabric-0.11.0.tar.gz 475.3 kB With provenance Details for bibliofabric-0.11.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.2 MB

Release files / bibliofabric-0.11.0.tar.gz

Download URL bibliofabric-0.11.0.tar.gz
Size 475.3 kB
Tags Source
SHA-256 checksum
How to use checksums
65cef914d802e822f39f0274f4b48a885a295684f63b1c0a896f466d86238aeb
BLAKE2b-256 checksum
How to use checksums
9eecb65d873fe63ef9b9987c599b75c8d5adbb19524a0389f13cbbdfcec0fd46
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 30, 2026.

Transparency log

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

Download URL bibliofabric-0.11.0-py3-none-any.whl
Size 679.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e15f1d2df105a6697e64c9d7a0137aa3ab24630c0b491e5725eab008f91deb0b
BLAKE2b-256 checksum
How to use checksums
a58d705df4a80df5484ede0b27ba1d7ded536966bd8810678a6780709e18f486
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 30, 2026.

Transparency log

Security for bibliofabric 0.11.0

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.11.0.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 30, 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