Published Book handles shared by synchronous and asynchronous consumers.
AsyncBook
Bases: _BookBase
An asynchronously resolved published Book indexed by Entry name.
Source code in packages/bookshelf/src/bookshelf/_consume/books.py
| class AsyncBook(_BookBase):
"""An asynchronously resolved published Book indexed by Entry name."""
def __getitem__(self, name_in_book: str) -> AsyncBookEntry:
return AsyncBookEntry(
self._client,
self._cache,
self.book_id,
self._entry(name_in_book),
)
|
Book
Bases: _BookBase
A resolved published Book indexed by Entry name.
Source code in packages/bookshelf/src/bookshelf/_consume/books.py
| class Book(_BookBase):
"""A resolved published Book indexed by Entry name."""
def __getitem__(self, name_in_book: str) -> BookEntry:
return BookEntry(
self._client,
self._cache,
self.book_id,
self._entry(name_in_book),
)
|