Repository navigation
Bookops-Worldcat 1.0.0
Bookops-Worldcat version 1.0 supports changes released in version 2.0 (May 2023) of the OCLC Metadata API and has expanded coverage to all endpoints of the Metadata API. This version introduces many breaking changes due to the complete refactor of the Metadata API.
New functionality in 1.0
- Send requests to all endpoints of WorldCat Metadata API
- Match bib records and retrieve bib classification
- Create, update, and validate bib records
- Create, retrieve, update, and delete local bib and holdings records
- Add automatic retries to failed requests
- Authenticate and authorize for multiple institutions within
MetadataSession - Support for Python 3.11 and 3.12
Changelog
Added
- Support for OCLC Metadata API Version 2.0
MetadataSessionmethods to support new functionality released in Metadata API 2.0bib_matchbib_get_classificationholdings_set_with_bibandholdings_unset_with_bib
- New
MetadataSessionmethods to support existing Metadata API functionality- Bib Record Management and Validation
bib_createbib_replacebib_validate
- Local Holdings Records
lhr_createlhr_deletelhr_getlhr_replace
- Local Bibliographic Data
lbd_createlbd_deletelbd_getlbd_replace
- Holdings Management
holdings_get_codes
- Bib Record Management and Validation
- Support for automatic retries of failed requests
- Support for multi-institution WSKeys
- Support for Python 3.11 and 3.12
- New dev dependencies:
- types-requests (2.31.0.20240125)
- mkdocs-material (9.5.13)
Changed
MetadataSessionmethods that have been renamed and updated (replacing existing functionality in Bookops-Worldcat):get_brief_bibis nowbrief_bibs_getget_full_bibis nowbib_getholding_get_statusis nowholdings_get_currentholding_setis nowholdings_setholding_unsetis nowholdings_unsetsearch_brief_bib_other_editionsis nowbrief_bibs_get_other_editionssearch_brief_bibsis nowbrief_bibs_searchsearch_current_control_numbersis nowbib_get_current_oclc_numbersearch_general_holdingsis nowsummary_holdings_searchsearch_shared_print_holdingsis nowshared_print_holdings_search
WorldcatAccessTokenscopesarg now only accepts strings. ATypeErroris raised ifscopesarg is passed a listtoken_expires_atattribute is now an awaredatetimeobject (change made due todatetime.utcnow()deprecation)
- Error handling:
TypeErrorandValueErrorreplaceWorldcatAuthorizationErrorwhenWorldcatAccessTokenis passed an invalid arg.MetadataSessionnow raisesInvalidOclcNumberexception when invalid OCLC identifiers are given
pytestconfiguration moved frompytest.initopyproject.toml- Updated and clarified type annotations for
MetadataSessionmethods - Updated dependencies:
- requests: (2.31)
- Updated dev dependencies:
- black (23.3.0)
- mike (2.0.0)
- mypy (1.0.14)
- Documentation on https://bookops-cat.github.io/bookops-worldcat/ has been rewritten and reorganized
Fixed
AttributeErrorchanged toTypeErrorif arg passed toQuery.prepared_requestis not aPreparedRequest- All args for methods within
MetadataSessionhave been changed to camel case to be consisted with Metadata API documentation
Removed
principalIDandprincipalIDNSas args forWorldcatAccessToken- Automatic handling of large sets of oclcNumbers
_split_into_legal_volumeremoved fromMetadataSession; aValueErroris now raised if a method is passed too many oclcNumbers
Deprecated
- Support for Python 3.7
- 409 error handling for holdings set/unset requests
WorldcatSessionError- Replaced with
TypeErrororValueErrorinWorldcatSession
- Replaced with