Repository navigation
BookOps-Worldcat version 1.2.0 supports changes made in the June 2025 release of the OCLC WorldCat Metadata API (version 2.0).
New in bookops-worldcat version 1.2
- Support for
/worldcat/manage/institution-config/branch-shelving-locations,/worldcat/manage/institution/holdings/moveand/worldcat/search/institutionendpoints- Move an institution's holdings and all associated local holdings records (LHR) and local bibliographic data (LBD) records from one bibliographic record to another.
- Given an institution's Registry ID or OCLC Symbol, retrieve the associated Registry IDs and OCLC Symbols.
- Python 3.8 is no longer supported (see Status of Python Versions for more information on current support for different versions of Python)
Changelog
Added
- Added support for new new Metadata API functionality:
MetadataSession.branch_holding_codes_get()allows users to retrieve branch holding codes and shelving locations using the/worldcat/manage/institution-config/branch-shelving-locationsendpointMetadataSession.institution_identifiers_get()allows users to retrieve retrieve the Registry ID and OCLC Symbols for one or more institutions using the/worldcat/search/institutionendpointMetadataSession.holdings_move()allows users to move holdings and all associated LHR and LBD records from one bib record to another using the/worldcat/manage/institution/holdings/moveendpoint
- Added
verify_idsfunction inutils.pyto check OCLC Symbols and Registry IDs before passing values to API - GitHub Actions workflows to publish new versions to PyPI (
publish.yaml) and deploy docs to bookops-cat.github.io/bookops-worldcat/ (deploy-docs.yaml) when a new release is published
Changed
- restructured
pyproject.tomlfollowing the changes implemented with poetry 2.0. Several sections of thepyproject.tomlfile have been moved from thetool.poetrysection to theprojectsection.- The
projectsection now includesname,version,description,authors,license,keywords,dynamic(a list of sections with dynamic metadata),dependencies,requires-python, andreadme.- dev dependencies are still in the
tool.poetry.group.dev.dependenciessection
- dev dependencies are still in the
- The
tool.poetrysection now includes:,package-mode,exclude,packages, andclassifiersclassifiersis defined as having dynamic metadata in theprojectsection
- The
tool.poetry.urlssection is now theproject.urlssection and includes other urls previously included in thetool.poetrysection (ie.repositoryandhomepage).
- The
- updated dependencies:
requests(2.32.4)coverage(7.9.1)pytest(8.4.0)pytest-cov(6.2.1)urllib3(2.5.0)- made
types-requestsa required dependency
- updated
tool.pytest.ini_optionssection to include coverage options - updated
tool.coverage.runto omittestsanddocspaths from coverage report
Fixed
- Tests in
webtests/test_api_spec.pythat were failing due to new endpoints that were added in June 2025. - type annotations for
timeoutarg inMetadataSession,Query,WorldcatAccessTokenandWorldcatSessionclasses. Thetimeoutarg now takesNone, anint, afloat, or atuplecontaining a combination ofintandfloatobjects - type annotations for
recordarg inholdings_set_with_bib,holdings_unset_with_bib,lbd_create,lbd_replace,lhr_create, andlhr_replace. Therecordarg now takes astr, abytesobject, or aBinaryIOobject like other methods that take a MARC record as an arg.
Removed
- Support for python 3.8.
- Removed all
Dict,List, andTupleimports fromtypingmodule as they are no longer necessary as of python 3.9
- Removed all
pytest-mockas a dev dependency as it was unused.