From e21d165462dfb69acd904c53eeca8b730f771b58 Mon Sep 17 00:00:00 2001 From: Adeel Hassan Date: Fri, 29 Sep 2023 15:23:35 -0400 Subject: [PATCH] docs: add nest_asyncio note to README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 220fb0f..16cb32a 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,15 @@ item = pystac.read_file(href) item = stac_asset.blocking.download_item(item, ".") ``` +Note that the above will not work in some environments like Jupyter notebooks which already have their own `asyncio` loop running. +To get around this, you can use [`nest_asyncio`](https://pypi.org/project/nest-asyncio/). +Simply run the following before using any functions from `stac_asset.blocking`. + +```python +import nest_asyncio +nest_asyncio.apply() +``` + ### CLI To download an item using the command line: