Bookops-worldcat

Latest version: v1.0.0

Safety actively analyzes 613603 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

2.0

+ `MetadataSession` methods to support new functionality released in Metadata API 2.0
+ `bib_match`
+ `bib_get_classification`
+ `holdings_set_with_bib` and `holdings_unset_with_bib`
+ New `MetadataSession` methods to support existing Metadata API functionality
+ Bib Record Management and Validation
+ `bib_create`
+ `bib_replace`
+ `bib_validate`
+ Local Holdings Records
+ `lhr_create`
+ `lhr_delete`
+ `lhr_get`
+ `lhr_replace`
+ Local Bibliographic Data
+ `lbd_create`
+ `lbd_delete`
+ `lbd_get`
+ `lbd_replace`
+ Holdings Management
+ `holdings_get_codes`
+ Support for [automatic retries of failed requests](https://bookops-cat.github.io/bookops-worldcat/advanced/#token-refresh-and-request-retries)
+ Support for [multi-institution WSKeys](https://bookops-cat.github.io/bookops-worldcat/advanced/#identifying-your-institution)
+ Support for Python 3.11 and 3.12
+ New dev dependencies:
+ types-requests (2.31.0.20240125)
+ mkdocs-material (9.5.13)

Changed
+ `MetadataSession` methods that have been renamed and updated (replacing existing functionality in Bookops-Worldcat):
+ `get_brief_bib` is now `brief_bibs_get`
+ `get_full_bib` is now `bib_get`
+ `holding_get_status` is now `holdings_get_current`
+ `holding_set` is now `holdings_set`
+ `holding_unset` is now `holdings_unset`
+ `search_brief_bib_other_editions` is now `brief_bibs_get_other_editions`
+ `search_brief_bibs` is now `brief_bibs_search`
+ `search_current_control_numbers` is now `bib_get_current_oclc_number`
+ `search_general_holdings` is now `summary_holdings_search`
+ `search_shared_print_holdings` is now `shared_print_holdings_search`
+ `WorldcatAccessToken`
+ `scopes` arg now only accepts strings. A `TypeError` is raised if `scopes` arg is passed a list
+ `token_expires_at` attribute is now an aware `datetime` object (change made due to [`datetime.utcnow()`](https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow) deprecation)
+ Error handling:
+ `TypeError` and `ValueError` replace `WorldcatAuthorizationError` when `WorldcatAccessToken` is passed an invalid arg.
+ `MetadataSession` now raises `InvalidOclcNumber` exception when invalid OCLC identifiers are given
+ `pytest` configuration moved from `pytest.ini` to `pyproject.toml`
+ Updated and clarified type annotations for `MetadataSession` methods
+ 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/](https://bookops-cat.github.io/bookops-worldcat/) has been rewritten and reorganized

Fixed
+ `AttributeError` changed to `TypeError` if arg passed to `Query.prepared_request` is not a `PreparedRequest`
+ All args for methods within `MetadataSession` have been changed to camel case to be consisted with Metadata API documentation


Removed
+ `principalID` and `principalIDNS` as args for `WorldcatAccessToken`
+ Automatic handling of large sets of oclcNumbers
+ `_split_into_legal_volume` removed from `MetadataSession`; a `ValueError` is 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 `TypeError` or `ValueError` in `WorldcatSession`

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

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.

0.5.0

Adds:
+ methods to set and unset OCLC holdings for multiple institutions (for consortia): /ih/institutionlist endpoint
+ `__repr__` method to `WorldcatAccessToken` class
+ fuller response when `WorldcatRequestError` is raised that provides details returned by the service

Fixes:
+ authentication server response when request to obtain an access token fails

Changed:
+ test fixtures refactoring

0.4.1

+ Fixes handling of unexpected 206 HTTP code that is occasionally returned by the MetadataAPI /brief-bibs endpoint
+ Refactors `metadata_api` and moves requests into a new `query.Query` class

0.4.0

+ Changes to `MetadataSession.search_brief_bibs` method due to /brief-bibs endpoint changes:
+ removed deprecated argument `heldBy`
+ added `groupVariantRecord` and `preferredLanuage` argument
+ modified `groupRelatedEditions` to allow boolean arguments
+ Changes to `MetadataSession.search_general_holdings` method due to API changes:
+ added following arguements: `holdingsAllVariantRecords`, `preferredLanguage`
+ removed deprecated `heldBy` argument
+ Changes to `MetadataSession.search_brief_bib_other_editions`:
+ added `deweyNumber`, `datePublished`, `heldByGroup`, `heldBySymbol`,
`heldByInstitutionId`, `inLanguage`, `inCatalogLanguage`, `materialType`,
`catalogSource`, `itemType`, `itemSubType`, `retentionCommitments`,
`spProgram`, `topic`, `subtopic`, `audience`, `content`, `openAccess`,
`peerReviewed`, `facets`, `groupVariantRecords`, `preferredLanguage`,
and `orderBy`.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.