API reference
Generated from the source with mkdocstrings.
Client
bibliofabric.jufo.JufoClient
Client for the JUFO publication channel REST API v1.1.
The API needs no credentials. The client paces itself to 2 requests
per second with 2 concurrent requests. mailto sets the contact
address in the User-Agent; an explicit argument wins over the
settings value.
channels: ChannelsResource
cached
property
Full publication channel records by JUFO id, plus cross-type search.
journals: JournalsResource
cached
property
Search narrowed to journals and series.
book_publishers: BookPublishersResource
cached
property
Search narrowed to book publishers.
conferences: ConferencesResource
cached
property
Search narrowed to conferences.
The sync twin JufoSyncClient mirrors the client method for method and
exports from the same module: from bibliofabric.jufo import JufoSyncClient.
Settings
bibliofabric.jufo.JufoSettings
JUFO-specific client settings.
Inherits timeout, max_retries, max_retry_wait,
max_requests_per_second, max_concurrency, user_agent, and
mailto from :class:bibliofabric.config.BaseApiSettings and sets
JUFO defaults: 2 requests per second and concurrency 2. The API needs
no credentials.
Resources
Each resource inherits the generic list operations from
bibliofabric.Resource (search, iterate, collect, first). Only
the members that JUFO changes or adds are shown here.
bibliofabric.jufo.ChannelsResource
Single-channel route: full records by JUFO id, plus cross-type search.
The search methods stay on the base (search, iterate,
collect, first) and send no tyyppi, so every channel type
matches; :class:ChannelFilters carries the cross-type filters
including the tyyppi restriction.
exists(id: str | int) -> bool
async
Return True when the channel exists; a miss returns False.
Uses GET so the client reads the miss from the body. A missing
id answers 404 with an empty body; the empty-array answer of the
search route is a miss too, and both surface as NotFoundError.
bibliofabric.jufo.JournalsResource
Search route narrowed to journals and series (tyyppi=1).
by_issn(issn: str) -> list[ChannelHit]
async
Return the journals and series that carry the ISSN.
The ISSN must be in hyphenated form; anything else raises
:class:ConfigurationError before a request leaves the process.
bibliofabric.jufo.BookPublishersResource
Search route narrowed to book publishers (tyyppi=2).
by_isbn_prefix(isbn_prefix: str) -> list[ChannelHit]
async
Return the book publishers registered under an ISBN prefix.
The route matches the stored prefixes literally, so the value must
carry its hyphens (978-87-7496, not 978877496).
bibliofabric.jufo.ConferencesResource
Search route narrowed to conferences (tyyppi=3).
by_issn(issn: str) -> list[ChannelHit]
async
Return the conference proceedings that carry the ISSN.
by_abbreviation(abbreviation: str) -> list[ChannelHit]
async
Return the conferences known under the abbreviation.
Filters
The filter models live in bibliofabric.jufo.filters and are re-exported
from the top-level package. They forbid extra fields, because the API
silently ignores unknown parameters.
bibliofabric.jufo.filters.ChannelFilters
Filter model for the cross-type channel search.
channel_type (wire name tyyppi) restricts the answer to one
publication channel type: 1 journals and series, 2 book
publishers, 3 conferences. Without it, all types match.
bibliofabric.jufo.filters.JournalFilters
Filter model for the journal and series search.
Only issn exists upstream; query= carries the name search.
bibliofabric.jufo.filters.BookPublisherFilters
Filter model for the book publisher search.
Only isbn_prefix (wire name isbn) exists upstream; query=
carries the name search.
bibliofabric.jufo.filters.ConferenceFilters
Filter model for the conference search.
issn matches conference proceedings that carry one, and
abbreviation (wire name lyhenne) matches the established
abbreviation. query= carries the name search.
bibliofabric.jufo.filters.require_issn(value: str) -> str
Return the ISSN in hyphenated uppercase form after a check digit check.
Compact valid ISSNs (02625253) normalize into the hyphenated form
the route matches. A wrong check digit would only answer an empty
result upstream, so it raises :class:ConfigurationError.
bibliofabric.jufo.filters.require_isbn_prefix(value: str) -> str
Return the ISBN prefix after a shape check.
The route matches the stored hyphenated prefixes literally, so the
value must carry hyphens exactly as they should appear in the stored
form (978-87-7496, not 978877496); a hyphen-less value can
never match and raises.
bibliofabric.jufo.filters.require_abbreviation(value: str) -> str
Return the conference abbreviation after a shape check.
Models
The models live in bibliofabric.jufo.models and are re-exported from the
top-level package. They are plain Pydantic models with extra="allow".
bibliofabric.jufo.models.Channel
One publication channel of the JUFO database, by JUFO id.
Every field the single-channel route sends is a JSON string; numeric
fields validate into int or float and the empty string the API
sends for missing data becomes None. type reads Lehti/sarja
(journal or series), Kirjakustantaja (book publisher), or
Konferenssi (conference); the database also serves the spelling
Lehti/Sarja for a few records.
isbn_prefixes: list[str]
property
The ISBN roots of a book publisher, split from the joined string.
The wire value carries them separated by semicolons with a trailing
one ("978-87-986655;978-87-988027;").
level_history: dict[int, int]
property
The level of every evaluation year, parsed from jufo_history.
bibliofabric.jufo.models.ChannelHit
One row of a search answer: the stub the search route returns.
Rows whose channel left the current database carry an empty
Jufo_ID; that maps to None and such rows cannot be fetched by
id.