Repository navigation
Releases
Releases · utsmok/bibliofabric
v0.12.0
Breaking
- Zenodo:
ZenodoClient.oaireturns the sharedOaiPmhResource; the
methods are unchanged.bibliofabric.zenodono longer exports
OaiResource,OaiSyncResource, or theOai*models. Useclient.oai
and import the models frombibliofabric.oai. - arXiv:
parse_feedtakes the rootElementthatdecode_xml(response)
returns instead of the response text.
Changed
Resource.first()works on resources whose dialect has
page_size_param=None: it dropspage_sizeand reads the first record
of the page at the API's natural size. Thefirst()overrides that
existed only for that case are gone (hkdir, mirabel, re3data).- OpenAlex:
parent_works[].relationshipand the/linksrelationship
field becamelink_type(upstream, 2026-12-07). The models read both
field names and map old/relationships/ids to/link-types/; the
parent_works.link_typeandpull_notice_works.link_typefilters
replaceparent_works.relationship. Docs and docstrings use the new
part-of valuessubworkandcomponent, which replacedvolumeand
partin the same release; values still pass through unchanged.
Added
Resource.search_method: set it to"POST"to sendsearch(),
count(),iterate(), andbatch_get()chunks as JSON bodies instead of
query strings. The body comes from the new_build_search_body(params)
hook, which receives exactly what a GET search would send as the query
string and returns it unchanged by default.Resource._next_cursor(response, body):search()and cursor-mode
iterate()read the next cursor through it, so a resource can page
through a response header instead of the body.parse_link_header(value), exported frombibliofabric: reads an RFC 5988
Linkheader into a mapping ofreltoken to URL.Noneor an
unparsable value returns an empty dict.send_sparql(client, endpoint, query, ...)and
run_sparql(client, endpoint, query, ...)inbibliofabric._async.sparql
and its generated_synctwin: the shared sender for SPARQL endpoints.
The Wikidata SPARQL resource and the OpenCitationssparql()methods are
built on them with unchanged wire behavior.decode_xml(response), exported frombibliofabric: parses an XML body
into anElementand raisesAPIError, with the body quoted and the
response attached, when the body is not well-formed XML.- A shared OAI-PMH 2.0 harvester:
bibliofabric.oaiholds theOai*
answer models, andOaiPmhResourceinbibliofabric._async.oai(sync
twinOaiPmhSyncResource) serves the six verbs and the two iterators on
any repository endpoint.ArxivClient.oaimounts it on
https://oaipmh.arxiv.org/oaithrough a second client for that host,
which shares the settings and the rate budget of the query client. - ClinicalTrials.gov client (
bibliofabric.clinicaltrials): study search,
get, batch, and CSV download; data model metadata, search areas, enums;
the/statsroutes; andversion(), with typed study models derived from
the upstream OpenAPI document. bibliofabric.inspirehep: typed async and sync client for the INSPIRE-HEP
API, covering nine collections, identifier routes (DOI, arXiv, ORCID),
citation formats, and citing records.- HAL client (
bibliofabric.hal): document search over/search/with
offset andcursorMarkpaging, document lookups by docid, HAL identifier,
DOI, or record URL, portal- and collection-scoped searches, and the
structures, journals, authors, domains, instances, ANR and European
projects, metadata, and document type referentials. The client needs no
credentials and defaults to 3 requests per second. bibliofabric.dblp: a DBLP client with publication, person, and venue
search, prefix completions in the page metadata, and full record pages by
DBLP key.- GLEIF client
bibliofabric.gleif: LEI records with the relationship, ISIN,
and field-modification routes, the autocompletion endpoints, the registry
code lists, andexport_lei_records()for CSV, XLSX, and JSON export, with
thenormalize_lei()andis_lei()helpers ofbibliofabric.ids
normalizing and checking the identifier. - Dryad client (
bibliofabric.dryad): dataset search, records, versions,
files, digest lookup, reports, and downloads, which need a Dryad
application token. - Figshare client (
bibliofabric.figshare): articles, collections, projects,
the category, license, and item type vocabularies, and file downloads, with
optional token auth for private records. - NIH RePORTER client (
bibliofabric.nihreporter): project and publication
searches with criteria nesting, field selection, offset paging, and batch
reads by application id on projects and by PMID or core project number on
publications. - Dataverse client (
bibliofabric.dataverse): the search API (repeating
type/subtree/fq,sort/order), collections (contents, facets),
datasets with versions, files, typed metadata blocks and raw exports,
streaming downloads withformat=original, metadata block definitions,
server info, and the metrics routes;DATAVERSE_settings and the optional
DATAVERSE_API_KEYsent asX-Dataverse-key. Write routes are out of
scope. - Software Heritage client (
bibliofabric.softwareheritage): origins,
snapshots, revisions, releases, directories, contents, known, resolve, raw,
extid, provenance, metadata, vault, saves, forges, and stats resources for
the archive.softwareheritage.org API, with a generated sync twin, docs,
tests, and examples. - ChemRxiv client (
bibliofabric.chemrxiv):ChemRxivClientand
ChemRxivSyncClientwithitems(search, filters, sort tokens, get, DOI
lookup),categories,subjects,licenses, and OAI-PMH on/oai. The
chemrxiv.org API retired on 2026-01-21; the client follows the final
published spec 0.0.102 and the examples point at a live Cambridge Open
Engage instance through thebase_urloverride. - Open Policy Finder client (
bibliofabric.openpolicyfinder): the Jisc
Open Policy Finder API, with funders, funder groups, publishers,
publisher policies, journals, and the OpenDOAR repository directory as
therepositoryitem type. Typed filter models serialize into the JSON
filterparameter;limit/offsetpaging withsearch_afterfor
pages past the 10000-record offset window; the CSV/object_ids
directory parses intoObjectIdEntryrecords. Every route needs an API
key (OPENPOLICYFINDER_API_KEY, sent asx-api-key). bibliofabric.osfpreprints: OSF API v2 client for preprints (search,
filters, files, citations, versions, contributors, subjects,
identifiers, institutions) and preprint providers (list, preprints,
licenses, citation styles, subjects, taxonomies, moderators,
subscriptions, withdraw requests).- Gateway to Research client (
bibliofabric.ukrigtr) for the UKRI GTR-2
API: project, person, organisation, and fund search and records,
per-entity sub-routes, the merged outcomes stream plus 13 typed outcome
resources with project-scoped variants, and the configs and examples
metadata routes.batch_getis disabled (upstream ignores id filters)
and the merged outcomes route supports noiterate()/collect()
(upstream repeats records across pages); both raise
ConfigurationError. bibliofabric.core: client for the CORE API v3 (works, outputs,
journals, and data providers, with the shared GET and POST search routes,
aggregates, per-record stats, full text downloads, raw XML records, TEI
XML, discovery, and recommendations). Built and tested against the
published OpenAPI document; no live check ran.- RAiD client:
bibliofabric.raidtalks to the RAiD Federation API
(RaidClient/RaidSyncClient, prefixRAID_). It searches the
federated open-access RAiD dataset (q, one identifier filter,
updatedSince/createdSincesync windows, cursor paging), fetches
single RAiDs by handle, lists the RAiDs of one service point prefix, and
reads the service point directory.normalize_raid()andis_raid()in
bibliofabric.idsnormalize and check RAiD handle paths. bibliofabric.nsfawards: client for the NSF Award Search APIs, with award
search and filters, award records by id, project outcomes, search facets,
the v2 lookup vocabularies, and the fiscal-year export files with the
iter_export_awardsreader.- Mir@bel client (
bibliofabric.mirabel): title search over/titreswith
fixed 1000-record offset windows, title and journal-history detail with
transparent merged-id redirects, publishers by id and IdRef, online-access
lists by journal or title, the subject taxonomy and its per-journal and
per-grappe routes, and the partner-scoped/mes/routes (unverified,
needs a partner key). No credentials are needed for the public routes;
the client defaults to 1 request per second. - MeSH client (
bibliofabric.mesh): descriptor, entry term, and
descriptor-qualifier pair lookups with exact, contains, and startswith
matching, allowed qualifiers and descriptor details, the queryable years
and per-resource label lookups, JSON-LD records by id, and the SPARQL
endpoint with typed SELECT and ASK answers, raw multi-format queries,
and offset-paged row iteration. bibliofabric.lobidgndwithLobidGndClient,LobidGndSyncClient,
LobidGndSettings, theauthoritiesresource (search, offset iteration,
record lookup,gndIdentifierbatching, autocomplete suggestions, JSONL
bulk download) and thereconcileresource (service manifest and
Reconciliation Specification 0.2 queries).bibliofabric.identifiersdotorg: client for the Identifiers.org
resolution and registry APIs.resolve(),reverse(),similar(),
namespace_usage(), anddownload_resolver_dataset()on the client;
thenamespaces,resources,institutions, andlocationsregistry
resources with their search routes; `iter_resolver_datase...
v0.11.0
Breaking
OpenAlexClientandCrossrefClientexpose the rate-limit headers of
the last response as the public read-only property
last_rate_limit_headers. The private_last_rate_limit_headersname
is gone.- The module-level
get_settings()function is removed from every client
config.py. Build settings with the<Source>Settingsclass. walk_pagesinbibliofabric._async.resourcesis private
(_walk_pages).
Added
- Europe PMC
client.grantshascount(),first(), andcollect(). - ORCID
SolrResultdeclaresorcid_id,given_names, and
family_names.
Fixed
- Wikidata
entities.iterate_ids()raisesNotFoundErrorfor an id that
a successful response leaves out, as its docstring says. With
on_error="skip"the id is recorded infailures. Before, the id was
dropped without a trace. WikidataSettingssetsuniform_pace_clears_rate_limits, so an overall
max_requests_per_secondalso replaces the separate SPARQL pace, as in
the ROR, Zenodo, Crossref, and OpenAlex settings.- ISSN
records.count()raisesConfigurationErrorwhen the search page
carries no total, like every othercount(). It returned 0. - Europe PMC
articles.get()andpreprints.get()raiseNotFoundError
when the API answers an unknown id with HTTP 200 and an error list, and
exists()returnsFalsefor it. Before,get()raised
ValidationError. - Europe PMC
preprints.references(),preprints.citations(), and
preprints.full_text_xml()raiseConfigurationErrorbefore any
request, because the API answers 404 or 500 for preprint ids. - Several docs pages called methods or passed parameters that do not
exist: Wikidatasuggestions(properties=)isproperty_ids=, the rxiv
method table now matchesby_doi(),search(),first(), and
count(), and the ROR dumps listing isreleases().
tests/test_docs_drift.pynow checks everyclient.<resource>.<method>()
call in the client docs against the real signatures.
Removed
- The docs site no longer publishes the two internal review documents;
they moved toarchive/reviews/. The client pages state upstream
behavior without the dates of individual test runs.
Changed
- The sync copies of the tests are no longer committed. The repository
conftest.pygenerates them before every pytest run, and
scripts/unasync.py --checkcompares only the twins undersrc/. - The live API test suite is removed. The example scripts under
packages/bibliofabric/examples/are the live checks. - The thirteen per-client settings test files are replaced by one
parametrized module,packages/bibliofabric/tests/test_settings_matrix.py.
Handwritten tests that differed only in a literal value are now one
parametrized test with a row per literal, and tests that repeated every
assertion of another test are removed.
v0.10.0
This release redesigns the public API in one step. Code written for 0.9
needs changes; the list below names every rename. No old name is kept as an
alias.
Breaking
Core:
ResourceClientisResource. Sync twins addSyncbefore the kind
word:BaseApiSyncClient,SyncResource,WorksSyncResource,
OpenAlexSyncClient.- Every resource class is named
<Concept>Resource(WorksResource,
RecordsResource), without a source prefix. Client-specific resource
bases are no longer exported. - Hook and helper methods are private:
_build_filter_params,
_format_sort,_build_batch_params,_default_params,_search_path,
_normalize_id,_record_keys,_item_pathon resources, and
_rate_class,_on_response,_is_retryable,_parse_json,
_default_headers,_unwrapperon clients. - Client packages no longer re-export the core exceptions,
Page,
get_settings, unwrappers, dialect objects, or internal constants. Import
exceptions andPagefrombibliofabric. failureslists holdValidationErrorinstances (with.raw) instead
of(dict, Exception)tuples.count()raisesConfigurationErrorwhen the API reports no total.
search()raises whenpage_sizeis unsupported or whenpageand
cursorare both given.batch_get()caps each chunk at the resource'sbatch_size;
concurrency=Noneuses the client's limiter bound.QueryDialectparameter names default toNone.filters_modelis
gone. Settings objects are frozen, andget_settings()no longer caches.unsupported_operation()stubs are typedNoReturn.strip_url_prefixis no longer exported frombibliofabric.
Parameters and return types in every client:
- No resource attribute is named
search. Search lives on the resource
whose records it finds: Europe PMCclient.articles.search(), ORCID
client.records.search()andclient.records.expanded_search(),
Wikidataclient.entities.search(),client.items.search()and
client.properties.search(), ISSNclient.records.search(). - The field projection is
selecteverywhere (wasfieldsorprops),
rows per page arepage_size(waslimitorrows), a row offset is
offset(wasstart), and sorting takes onesortvalue such as
"submitted_date:desc"(wassort_by/sort_order,sort_field, or
order). - Parameters no longer use builtin names:
typebecameentity_type,
annotation_type, orvalue_type;formatbecameoutput_format;
filterbecamefiltersorfilter_query;setbecameoai_set;
propertybecameproperty_id. - Methods that return one page return
Page: ISSN search and LTWA,
Europe PMC grants and annotations, Semantic Scholar patent citations,
and the REST search routes of Wikidata. - Models use snake_case fields with the wire names as aliases (OpenAIRE,
Semantic Scholar, DOI, Wikidata, Europe PMC). Convenience values are plain
properties and no longer appear inmodel_dump().
Per client:
- OpenAlex:
search_scoped(text)issearch_scoped(query),
sample(n)issample(sample_size),group_by(group_by)is
group_by(field), andbatch_get_by_openalex_id()is removed (use
batch_get(ids)). - OpenAIRE: the
authparameter is removed (useauth_strategy=).
get_fields()is removed (usebatch_get(ids, select=[...])).
research_products.search_links()anditerate_links()are
relations()anditerate_relations();get_relations_info()is
relation_types(). Scholixsearch_links()anditerate_links()are
search()anditerate(), the_v2variants are removed, and
get_kpi()iskpi().group_by()is removed (usefacets()). - Crossref:
CrossRefDateandCrossRefTypeareCrossrefDateand
CrossrefType.ScopedWorksResourceis removed;works()on journals,
members, types, and prefixes returns aWorksResource.
facets(facets=...)isfacets(fields=...)andsample(n)is
sample(sample_size). Pool selection lives inCrossrefSettings.pool. - ROR:
dumps.list()isdumps.releases().find_by_external_id()and
find_by_funder_doi()areby_external_id()andby_funder_doi().
OrganizationFiltersfields lose the doubled words
(country_country_codeiscountry_code). - Zenodo:
ZenodoRecordsClientandZenodoCommunitiesClientare
RecordsResourceandCommunitiesResource.ZenodoFiles.keysis
filenames.export(id, format)isexport(id, output_format=). The
OAI methods takeoai_set=, andmetadata_prefixdefaults tooai_dc.
OaiErroris removed. - DataCite:
dois()on clients, providers, repositories, and prefixes
takes the explicit search keywords instead of**kwargs. - OpenCitations:
meta.author()andmeta.editor()areby_author()and
by_editor().SparqlTermisSparqlBindingValue, from
bibliofabric.sparql. - DOI:
handle(type=)ishandle(value_type=).AgencyAnswer.RAis
agency,AgencyAnswer.DOIisdoi, andHandleRecord.responseCode
isresponse_code. - Semantic Scholar:
papers.batch()andauthors.batch()are removed;
batch_get()uses the POST batch routes.datasets.latest()is removed
(userelease("latest")).papers.iterate()walks the bulk route by
default (via="search"keeps the relevance search).PatentCitationsis
removed. - ORCID:
client.recordisclient.records;client.searchand
client.expanded_searchare removed (see above), andcsv()takes
select=,page_size=, andoffset=.NormalizationErroris
NormalizationFailure. Thetext()helper is removed. Single-item
readers return typed models instead of dicts. - Europe PMC: the
SearchResultmodel isArticle.client.searchis
merged intoclient.articles, andfields()there isindex_terms().
Y/N flags arebool.AnnotationPageis removed. - Wikidata:
client.searchis removed (see above).
WikidataQueryClientis private. - DOAJ:
get_by_id()is removed;get()accepts an ISSN, a DOI, a DOAJ
id, or a doaj.org URL. - ISSN:
client.search.page()isclient.records.search(), and
ltwa.page()isltwa.search().SearchPageandLtwaPageare
removed. - arXiv:
search(start=)issearch(offset=).ArxivEntry.versionis
version_number, andpublishedandupdatedaredatetime. The
constants carry theARXIV_prefix. - bioRxiv and medRxiv:
details.get()andpublished.get()are
by_doi().published.biorxiv()andby_publisher()are
search_biorxiv()andsearch_by_publisher().serveris a keyword
that defaults tobiorxiv. Dates aredatetime.date, and statistic
years areint.
Added
- Every client constructor takes
mailto=, and the clients with
credentials take them as keywords:ZenodoClient(api_token=),
SemanticScholarClient(api_key=), and
OrcidClient(access_token=, client_id=, client_secret=).
CrossrefClienttakeshttp_client=. Pageiterates over its records and supportslen(); itstotal,
next_cursor, andpagefields have defaults.- New core modules:
bibliofabric.concurrency(Limiter,run_bounded,
maybe_await),bibliofabric.filters(serialize_filter_paramsand the
filter type aliases), andbibliofabric.sparql(SPARQL result models).
SafeInt,NullUnwrapper, andTokenAuthMethodare exported from
bibliofabric. batch_get(params=...), andexists()falls back toGETwhen the API
answersHEADwith 405 or 501.- Every disabled method names the call that works, for example
Use client.articles.search(query=...) instead. - More id forms: Europe PMC and PubMed URLs,
PPRpreprint ids,
semanticscholar.org URLs, bioRxiv content URLs, doaj.org URLs, and the
printedISSN 2049-3630form. - New methods: rxiv and ISSN
first()andcount(), arXivexists(),
Zenodo vocabularycollect(),first(), andcount(), Europe PMC
preprints.get()andexists(), and DOAJArticle.year,
Article.abstract, andArticle.journal_title. - Examples:
sync_quickstart.pyfor Crossref and ROR.
Fixed
batch_get()raisesConfigurationErroron a resource without a batch
route, and when given a bare string instead of a list of ids.- Unsupported methods on OpenAlex and OpenAIRE
links, DataCite
batch_get(), and RORsearch(query=, advanced=)raise before any
request. Zenodoexport()rejects an unknown format before the request. - DOAJ
iterate()stops at the 1,000-record cap with a warning instead of
raising. - Wikidata entities no longer leak a redirect marker into
model_extra. - Semantic Scholar patent search sends
/patent/search. - The default filter serialization joins list values with commas instead
of sending their Python repr.
v0.9.1
Changed
- The package README and the documentation site are reorganized around
using the clients. The site has one Crossref quick start, a guide for
setup, settings, paging, search, identifiers, errors, and combining
clients, and a quick start for each client. The guide and client pages
name only methods, fields, and settings that exist in the package.
Fixed
- Releases carry provenance again. The publish job signs a PEP 740
attestation for each file withpypa/gh-action-pypi-publish; 0.7.0 to
0.9.0 were uploaded withuv publish, which only uploads attestations
that already exist. - Crossref client:
works.batch_get()filters bydoiby default. Crossref
has noidfilter for works, so the inherited default made every batch
fail with HTTP 400. - Crossref client:
batch_get()onjournals,funders,members,
types,prefixes, andlicensesraisesConfigurationErrorbefore any
request. Crossref has noidfilter on those routes, so the inherited
default made every batch fail with HTTP 400 or 404. The works resources,
including the scoped ones such asjournals.works(issn), keep
batch_get(). - OpenAlex client:
Award.lead_investigator.affiliation.idsis a list of
InvestigatorAffiliationIdmodels. Some awards send a list there, and the
oldstrannotation madeawards.search()raiseValidationErroron
them. - Europe PMC client:
articles.supplementary_files()sends
Accept: application/zip. The route answers HTTP 406 to the
application/octet-streamheader the method used to send, so every call
raisedAPIError.
v0.9.0
Breaking
bibliofabricis one distribution. The packagesaireloom,aletheca,
andstavrophoraare discontinued; their clients ship insidebibliofabric
asbibliofabric.openaire,bibliofabric.openalex, and
bibliofabric.crossref. The
migration guide lists
every rename.- Client classes carry the name of their source.
AireloomClient,
AireloomSettings, andAireloomSyncClientbecomeOpenAireClient,
OpenAireSettings, andOpenAireSyncClient;Aletheca*becomes
OpenAlex*;Stavrophora*becomesCrossref*. Environment prefixes
follow:AIRELOOM_becomesOPENAIRE_,ALETHECA_becomesOPENALEX_,
andSTAVROPHORA_becomesCROSSREF_. OpenAireSettingsrenamesopenaire_client_id,openaire_client_secret,
andopenaire_refresh_tokentoclient_id,client_secret, and
refresh_token; the environment names becomeOPENAIRE_CLIENT_ID,
OPENAIRE_CLIENT_SECRET, andOPENAIRE_REFRESH_TOKEN.OpenAlexSettingsreads the key fromapi_keyandOPENALEX_API_KEY
only. Theopenalex_api_keyconstructor alias and the
ALETHECA_OPENALEX_API_KEYenvironment name are removed.- Only
bibliofabric.__version__exists; client subpackages export no
__version__. - The default user agent names the client subpackage
(bibliofabric.openalex/0.9.0) instead of the discontinued package.
Added
- Sixteen client subpackages, each with an async client and a generated sync
twin:bibliofabric.openalex(OpenAlex),bibliofabric.openaire(OpenAIRE
Graph and Scholexplorer),bibliofabric.crossref(Crossref REST and the
beta Data Citation API),bibliofabric.ror(ROR),bibliofabric.zenodo
(Zenodo and OAI-PMH),bibliofabric.datacite(DataCite REST and GraphQL),
bibliofabric.opencitations(OpenCitations Index and Meta),
bibliofabric.doi(DOI registration agencies, content negotiation,
Handles),bibliofabric.semanticscholar(Semantic Scholar),
bibliofabric.orcid(ORCID public API),bibliofabric.europepmc
(Europe PMC),bibliofabric.wikidata(Wikidata),bibliofabric.doaj
(DOAJ),bibliofabric.issn(ISSN Portal),bibliofabric.arxiv(arXiv),
andbibliofabric.rxiv(bioRxiv and medRxiv). Thirteen of them were never
released as separate packages. - Runnable example scripts for every client under
packages/bibliofabric/examples/<client>/, each with a README; every
client's docs index links its folder. - OpenAire client:
research_products.get()accepts a DOI (bare or as a
resolver URL) andpersons.get()accepts an ORCID iD. Both resolve through
theidsfilters and raiseNotFoundErrorwhen nothing matches; internal
OpenAIRE ids keep the by-id route. - Crossref client (changes after
stavrophora0.5.0):
client.data_citations.iterate()acceptslimit=,cursor=(the 0-based
page number to resume from;Page.next_cursorholds it as a string),
on_error=/failures=for skipping invalid records, and
on_page(page_number, next_page)for checkpoints (async callbacks are
awaited), pluscollect()andfirst()on the resource. - Crossref client:
on_response()also captures the beta route's singular
x-rate-limitheader intolast_rate_limit_headers. - Crossref client:
UpdateTois exported frombibliofabric.crossrefand
listed in__all__. - Crossref client:
works.batch_get_by_doi()raisesConfigurationError
before any request when a DOI lacks the10.<prefix>/<suffix>shape.
Crossref answers the whole batch with HTTP 400 for one malformed DOI. attached_request(response)exported frombibliofabric: returns the
request that produced a response, orNonewhen the response is detached
(hand-built or mocked), so callers never trip over theRuntimeErrorthat
readingresponse.requestraises for detached responses.BaseApiClient.download(path, dest, *, headers=None, follow_redirects=True)
(andSyncBaseApiClient.download): streams the body into a temporary file
next todestand moves it overdestonly after the last chunk arrived,
so a failed download leaves no partial file and parent directories are
created when missing.unsupported_operation(name)forResourceClientsubclasses: assigning
search = unsupported_operation("search")makes that inherited entry point
raiseConfigurationErrornaming the class and method before any HTTP
call;batch_size = 0disablesbatch_getthe same way.JsonApiUnwrapper.next_cursor()acceptslinks.nextas a JSON:API link
object ({"href": "<url>"}) in addition to a URL string.- An error the unwrapper raises from a parsed body (
APIErrorfor a wrong
envelope,NotFoundErrororRateLimitErrorfor an error payload answered
with HTTP 200) carries the request and response of the call when it comes
from aResourceClientmethod, with the auth strategy's query-parameter
credentials redacted in the message.
Changed
- Crossref client (changes after
stavrophora0.5.0):
data_citations.search()anddata_citations.iterate()takepage_size=
instead ofrows=; the wire parameter staysrows. - Crossref client: a malformed beta data citations envelope (no
message
object, ortotal-results/next-pagethat is neither an integer nor a
digit string) raisesAPIErrorwith the request and response attached
instead ofConfigurationErroror a rawValueError. - Crossref client:
Work.retractionsmatchesupdated-byentries
case-insensitively, andWork.is_retractedreturnsFalsewhen a
reinstatemententry is dated after the newest retraction. - Crossref client:
CrossrefSettings.plus_tokenis hidden fromrepr(); the
value stays readable on the attribute. - Crossref client: removed the local
SafeStrList; models use
bibliofabric.SafeList[str], which behaves the same.SafeIntand
IdSafeStrmoved tobibliofabric.crossref.models.base. - With
follow_redirects=True, a redirect that changes the origin (scheme,
host, or port) no longer carries headers or query parameters that an auth
strategy added, so credentials never cross to another host; httpx by itself
strips onlyAuthorization,Cookie, andProxy-Authorization.
Caller-suppliedAuthorizationandCookieheaders are still dropped on
origin changes as httpx does. Redirects are followed hop by hop, up to the
http client'smax_redirects, and its cookie jar still fills theCookie
header of every hop. ResourceClient.get()raisesValidationError(request and response
attached) when the unwrapped item contains none of the keys the model
declares, after alias resolution.search(),iterate(),collect(),
first(), andbatch_get()treat such records as validation failures:
raised by default, or skipped intofailureswithon_error="skip",
instead of validating them into models whose every field holds its default.
Models that declare no fields keep working.BaseApiClient.get_json()forwardstimeout,retry, and
follow_redirectstorequest()like every other call.ClientCredentialsAuth.invalidate_token(failed_token=None)clears the
cached token only when it still holds that token;BaseApiClientpasses
the rejected token on HTTP 401, so two concurrent 401s cannot drop a token
another request has already replaced.normalize_arxiv()lowercases the whole id, so the version suffix
normalizes too (1706.03762V1to1706.03762v1).normalize_issn()accepts ISSN Portal URLs such as
https://portal.issn.org/resource/ISSN/2049-3630.ResourceClient.search()anditerate()raiseConfigurationErrorfor
page_sizebelow 1 before any request, instead of sending it upstream.- A redirect loop under
follow_redirects=TrueraisesNetworkError(the
httpx.TooManyRedirectsis kept as__cause__) instead of leaking the
httpx exception, inrequest(),get_json(),stream(), anddownload(). AuthStrategy.invalidate_token()takes afailed_tokenargument. A custom
auth strategy written against the old zero-argument signature raises
TypeErroron an HTTP 401 and must add the parameter.
Fixed
- OpenAire client (fix after
aireloom0.9.1): the client imports with
pydantic 2.9.0, the declared floor ofbibliofabric. The three filter type
aliases are plainTypeAliasassignments again: pydantic builds a schema
from atypestatement (PEP 695) only from 2.10 on, so the import failed
with 2.9. - Crossref client:
client.data_citationsresolves/beta/datacitations
against the base URL's parent directory, so a custombase_urlpath prefix
(for examplehttps://mirror.example.org/crossref/v1) is preserved instead
of stripped. - Crossref client:
data_citations.iterate()validatespage_size,limit,
on_error, andcursorbefore the first request, stops on an empty page,
and stops whennext-pagerepeats or moves back instead of looping forever. _search_params()no longer callssearch_path(None)and no longer
compares path results to decide whetherquery=is supported. It checks
whether the subclass overridessearch_path, so a subclass may mapNone
or""to a wildcard and may rejectNoneitself without breaking valid
queries.- Identifier normalizers strip
#fragmentand?queryparts before trailing
slashes;normalize_isbn()andnormalize_isni()accept resolver URLs
with trailing slashes;normalize_ror()also strips
http://www.ror.org/andwww.ror.org/;normalize_wikidata_qid()
accepts barewikidata.orghosts and theProperty:namespace
(https://www.wikidata.org/wiki/Property:P31); digit checks reject Unicode
digits such as²instead of raisingValueError; the undocumented
gdz:GND prefix was removed. - A
User-Agentset indefault_headersis no longer dropped in favor of
the fallback User-Agent injected for a caller-owned `http_cli...
stavrophora-v0.5.1
Deprecated
stavrophorais discontinued. Its client ships asbibliofabric.crossref
inbibliofabric0.9.0 and later; see the
migration guide.
Importingstavrophoraemits aFutureWarningthat says so. This is the
last release.
aletheca-v0.5.2
Deprecated
alethecais discontinued. Its client ships asbibliofabric.openalexin
bibliofabric0.9.0 and later; see the
migration guide.
Importingalethecaemits aFutureWarningthat says so. This is the last
release.
aireloom-v0.9.2
Deprecated
aireloomis discontinued. Its client ships asbibliofabric.openairein
bibliofabric0.9.0 and later; see the
migration guide.
Importingaireloomemits aFutureWarningthat says so. This is the last
release.
v0.8.0
Companion client versions built on this release: aireloom 0.9.1, aletheca 0.5.1,
and stavrophora 0.5.0 (all pinning bibliofabric>=0.8,<0.9), and the eleven
Wave 1 libraries.
Added
BaseApiClient.default_headersproperty: headers sent with every
request()andstream()call, overridden per call byheaders=.follow_redirects: bool | None = NoneonBaseApiClient.request()and
BaseApiClient.stream(), overridingBaseApiSettings.follow_redirectsfor
one call (for example to read theLocationheader of a DOI resolver's 3xx
response, or to follow content-negotiation redirects).ResourceClient.default_params()hook: query parameters sent with every
list,count(), and batch request.ResourceClient.search_path(query)hook: the list route for search,
count(), and batch requests, for APIs that carry the query in the path.
query=is accepted when the dialect has noquery_paramas long as the
search path uses the query.JsonApiUnwrapperinbibliofabric.unwrap: reads JSON:API envelopes
(data,meta.total, and the cursor query parameter inlinks.next).- Identifier normalizers
normalize_isbn(ISBN-10 to ISBN-13),
normalize_isni,normalize_arxiv,normalize_pmid,normalize_pmcid,
normalize_wikidata_qid,normalize_gnd, andnormalize_viaf.
Changed
normalize_roralso strips theror.org/andhttps://www.ror.org/
prefixes.
stavrophora-v0.5.0
Added
client.data_citationsfor the beta Crossref Data Citations API
(/beta/datacitations):search()with thesubject_id,object_id,
member_id,relation,from_created_date, anduntil_created_date
filters and 0-based page numbers,iterate(), andcount(), with the
DataCitationandDataCitationEndmodels. The route runs in its own
datacitationsrate class at 3 requests per second.- Retraction helpers:
Work.retractions(theupdated-byentries of type
retraction) andWork.is_retracted, andUpdateTo.record_idfor the
Retraction Watch record id that Crossref attaches to entries with
source="retraction-watch".
Changed
- Requires
bibliofabric>=0.8,<0.9(the workspace core is now 0.8.0).