Skip to content

API reference

Generated from the source with mkdocstrings.

Client

bibliofabric.openpolicyfinder.OpenPolicyFinderClient

Client for the Jisc Open Policy Finder API.

Every route needs an API key, sent as the x-api-key header. Pass api_key= or set OPENPOLICYFINDER_API_KEY (environment or .env); without a key the client still constructs, and the first request fails with :class:bibliofabric.AuthError. The key stays out of logs and error strings through the auth strategy redaction.

The data is licensed CC BY-NC-ND 4.0, so the API is for non-commercial use; see the Jisc developer pages.

funders: FundersResource cached property

The funder records resource client.

funder_groups: FunderGroupsResource cached property

The funder group records resource client.

publishers: PublishersResource cached property

The publisher records resource client.

policies: PoliciesResource cached property

The publisher policy records resource client.

journals: JournalsResource cached property

The journal records resource client (item-type=publication).

repositories: RepositoriesResource cached property

The repository records resource client (the OpenDOAR directory).

object_ids: ObjectIdsResource cached property

The CSV id directory resource client.

The sync twin OpenPolicyFinderSyncClient mirrors the client method for method and exports from the same module: from bibliofabric.openpolicyfinder import OpenPolicyFinderSyncClient.

Settings

bibliofabric.openpolicyfinder.OpenPolicyFinderSettings

Open Policy Finder client settings.

Inherits timeout, max_retries, max_retry_wait, max_requests_per_second, max_concurrency, user_agent and mailto from :class:bibliofabric.config.BaseApiSettings. Jisc publishes no request-rate budget for the API, so the client keeps the core defaults and lets callers pace themselves.

Every API route needs an API key. Request one from Jisc and set OPENPOLICYFINDER_API_KEY (or pass api_key= to the client); the key travels in the x-api-key header.

Resources

Each item-type resource inherits the generic operations from bibliofabric.Resource (get, exists, search, iterate, collect, first, count). The shared base maps get and exists onto /retrieve_by_id and injects each resource's item-type; it stays private, like every client-scoped resource base.

bibliofabric.openpolicyfinder.FundersResource

Funder records (item-type=funder), filterable with FunderFilters.

bibliofabric.openpolicyfinder.FunderGroupsResource

Funder group records (item-type=funder_group).

The documentation lists no filter fields for this item type, so search() accepts only paging arguments and params=.

bibliofabric.openpolicyfinder.PublishersResource

Publisher records (item-type=publisher).

bibliofabric.openpolicyfinder.PoliciesResource

Publisher policy records (item-type=publisher_policy).

bibliofabric.openpolicyfinder.JournalsResource

Journal records (item-type=publication).

get() takes the numeric id or an ISSN of the journal, because the identifier parameter of /retrieve_by_id accepts both.

bibliofabric.openpolicyfinder.RepositoriesResource

Repository records (item-type=repository), the OpenDOAR directory.

bibliofabric.openpolicyfinder.ObjectIdsResource

The CSV id directory of every item type.

The rows carry only the numeric id and the last-modified date; fetch full records through the item-type resources.

entries(item_type: str, *, limit: int | None = None, offset: int | None = None, search_after: str | None = None, params: Mapping[str, Any] | None = None) -> list[ObjectIdEntry] async

Fetch one page of id entries.

limit defaults to the 5000 rows the API serves per page. search_after takes the id of the last row of the previous page.

iterate(item_type: str, *, limit: int | None = None, search_after: str | None = None, params: Mapping[str, Any] | None = None) -> AsyncIterator[ObjectIdEntry] async

Yield every id entry of the item type, paging by last id.

The walk ends when a page comes back short or empty, which is how the CSV route signals exhaustion.

Filter models

bibliofabric.openpolicyfinder.FunderFilters

Filter fields of item-type=funder.

name and acronym are synonyms of the subfields name_name and name_acronym; funderid is a synonym of id. The client sends the short names the documentation lists first.

bibliofabric.openpolicyfinder.PublisherFilters

Filter fields of item-type=publisher.

name and acronym are synonyms of name_name and name_acronym; publisherid is a synonym of id.

bibliofabric.openpolicyfinder.PublisherPolicyFilters

Filter fields of item-type=publisher_policy.

publisher_policyid is a synonym of id. open_access_prohibited takes the stored values yes and no.

bibliofabric.openpolicyfinder.PublicationFilters

Filter fields of item-type=publication, the journal records.

title and acronym are synonyms of title_title and title_acronym; publicationid is a synonym of id. issn takes one ISSN, and publisher_id and publisher_policy_id take the numeric ids of the linked records.

bibliofabric.openpolicyfinder.RepositoryFilters

Filter fields of item-type=repository, the OpenDOAR directory.

Record models

The records a user receives; nested pieces live in bibliofabric.openpolicyfinder.models.

bibliofabric.openpolicyfinder.Funder

A funder record of item-type=funder.

bibliofabric.openpolicyfinder.FunderGroup

A funder group record of item-type=funder_group.

bibliofabric.openpolicyfinder.Publisher

A publisher record of item-type=publisher.

bibliofabric.openpolicyfinder.PublisherPolicy

A publisher policy record of item-type=publisher_policy.

bibliofabric.openpolicyfinder.Publication

A journal record of item-type=publication.

bibliofabric.openpolicyfinder.Repository

A repository record of item-type=repository.

The policies section carries free-form objects that the source documents as under review, so it stays raw.

bibliofabric.openpolicyfinder.ObjectIdEntry

One id,date_modified row of an /object_ids response.