Getting started#
Create a Bookshelf facade and address a published book by volume and version. Omitting edition= resolves the latest published edition.
from bookshelf import Bookshelf
with Bookshelf() as bs:
entry = bs.book("rcmip-emissions", "v5.1.0")["magicc"]
frame = entry.as_df(year_min=2020, year_max=2100)
From async code, run each call in a worker thread:
import asyncio
book = await asyncio.to_thread(bs.book, "rcmip-emissions", "v5.1.0", edition=1)
frame = await asyncio.to_thread(book["magicc"].as_df)
Publishing capabilities are part of the same SDK. Install the publish extra when notebook execution is required:
The how-to guides go further on both sides. Each one is a notebook executed against a live deployment when these docs are built, so its output is real.
Reading a public book needs no credential. For private books and for publishing, see Authentication.