Skip to content

Commit

Permalink
docs(python): use item collection for write example
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Oct 10, 2024
1 parent 0e15595 commit d44efe0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions python/python/stacrs/pystac.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ def write(
locally.
Examples:
>>> with open("simple-item.json") as f:
... item = json.load(f)
>>> stacrs.write("out.parquet", [item])
>>> with open("items.json") as f:
... items = json.load(f)
>>> stacrs.write("out.parquet", items)
"""
if isinstance(value, list):
d = ItemCollection(value).to_dict(transform_hrefs=transform_hrefs)
Expand Down
6 changes: 3 additions & 3 deletions python/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ use tokio::runtime::Builder;
/// locally.
///
/// Examples:
/// >>> with open("simple-item.json") as f:
/// ... item = json.load(f)
/// >>> stacrs.write("out.parquet", [item])
/// >>> with open("items.json") as f:
/// ... items = json.load(f)
/// >>> stacrs.write("items.parquet", items)
#[pyfunction]
#[pyo3(signature = (href, value, *, format=None, options=None))]
pub fn write<'py>(
Expand Down

0 comments on commit d44efe0

Please sign in to comment.