-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add __enter__ and __exit__ method to enable context manager usage. Ad…
…d FolioClientClosed custom exception. Bump version to 0.61.1.
- Loading branch information
Showing
4 changed files
with
114 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import importlib.metadata | ||
|
||
__version__ = importlib.metadata.version("folioclient") | ||
|
||
from folioclient.FolioClient import FolioClient | ||
from folioclient.exceptions import FolioClientClosed | ||
|
||
__version__ = importlib.metadata.version("folioclient") | ||
__all__ = ["FolioClient", "FolioClientClosed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
Custom exceptions for the folioclient package. | ||
""" | ||
|
||
|
||
class FolioClientClosed(Exception): | ||
""" | ||
Raised when an operation is attempted on a closed FolioClient. | ||
""" | ||
|
||
def __init__(self, message: str = "The FolioClient is closed") -> None: | ||
super().__init__(message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "folioclient" | ||
version = "0.61.0" | ||
version = "0.61.1" | ||
authors = ["Theodor Tolstoy <[email protected]>", "Brooks Travis <[email protected]>"] | ||
description = "An API wrapper over the FOLIO LSP API Suite OKAPI." | ||
repository = "https://github.com/FOLIO-FSE/folioclient" | ||
|