Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,49 @@
" format=\"parquet[snappy]\",\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Search performance\n",
"\n",
"Here's a performance comparison when searching with **stacrs** versus [pystac-client](https://pystac-client.readthedocs.io/)."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pystac-client: 7.5231709480285645s (467 items)\n",
"stacrs: 7.2893760204315186s (467 items)\n"
]
}
],
"source": [
"import time\n",
"from pystac_client import Client\n",
"import stacrs\n",
"\n",
"client = Client.open(\"https://stac.eoapi.dev\")\n",
"start = time.time()\n",
"item_search = client.search(collections=[\"WildFires-LosAngeles-Jan-2025\"])\n",
"items = list(item_search.items_as_dicts())\n",
"end = time.time()\n",
"print(f\"pystac-client: {end - start}s ({len(items)} items)\")\n",
"\n",
"start = time.time()\n",
"items = await stacrs.search(\n",
" \"https://stac.eoapi.dev\", collections=[\"WildFires-LosAngeles-Jan-2025\"]\n",
")\n",
"end = time.time()\n",
"print(f\"stacrs: {end - start}s ({len(items)} items)\")"
]
}
],
"metadata": {
Expand Down
18 changes: 12 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ ignore_missing_imports = true
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"

[tool.uv]
dev-dependencies = [
[dependency-groups]
dev = [
"maturin>=1.7.4",
"mike>=2.1.3",
"mkdocs-jupyter>=0.25.1",
"mkdocs-material[imaging]>=9.5.45",
"mkdocstrings[python]>=0.27.0",
"mypy>=1.11.2",
"pyarrow>=18.0.0",
"pystac[validation]>=1.11.0",
Expand All @@ -52,6 +48,16 @@ dev-dependencies = [
"ruff>=0.6.9",
"stac-geoparquet>=0.6.0",
]
docs = [
"mike>=2.1.3",
"mkdocs-jupyter>=0.25.1",
"mkdocs-material[imaging]>=9.5.45",
"mkdocstrings[python]>=0.27.0",
"pystac-client>=0.8.5",
]

[tool.uv]
default-groups = ["dev", "docs"]

[build-system]
requires = ["maturin>=1.7,<2.0"]
Expand Down
36 changes: 28 additions & 8 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.