A no-dependency Python package for STAC, using Rust under the hood.
Project description
stacrs
A no-dependency Python package for STAC, using Rust under the hood.
Usage
Install via pip:
pip install stacrs
Then:
import stacrs
# Search a STAC API
items = stacrs.search(
"https://landsatlook.usgs.gov/stac-server",
collections="landsat-c2l2-sr",
intersects={"type": "Point", "coordinates": [-105.119, 40.173]},
sortby="-properties.datetime",
max_items=100,
)
# Write items to a stac-geoparquet file
stacrs.write("items.parquet", items)
# Read items from a stac-geoparquet file as an item collection
item_collection = stacrs.read("items.parquet")
# Use `search_to` for better performance if you know you'll be writing the items
# to a file
stacrs.search_to(
"items.parquet",
"https://landsatlook.usgs.gov/stac-server",
collections="landsat-c2l2-sr",
intersects={"type": "Point", "coordinates": [-105.119, 40.173]},
sortby="-properties.datetime",
max_items=100,
)
See the API documentation for details.
pystac
If pystac is present, stacrs.pystac
provides functions that take pystac objects as their inputs and outputs:
import pystac
import stacrs.pystac
item = pystac.read_file("item.json")
stacrs.pystac.validate(item)
items = list(stacrs.pystac.search(...))
You can install pystac with stacrs via an optional dependency:
pip install 'stacrs[pystac]'
Comparisons
This package (intentionally) has limited functionality, as it is not intended to be a replacement for existing Python STAC packages.
pystac is a mature Python library with a significantly richer API for working with STAC objects.
For querying STAC APIs, pystac-client is more feature-rich than our simplistic stacrs.search
.
That being said, it is hoped that stacrs will be a nice complement to the existing Python STAC ecosystem by providing a no-dependency package with unique capabilities, such as searching directly into a stac-geoparquet file.
Other info
This package is part of the stac-rs monorepo, see its README for contributing and license information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for stacrs-0.1.1-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 227026cd7cd1369f250622749def1d7fe2af3d811813660d51fbf59f7597761e |
|
MD5 | 0f3d9e58bcd9e27fc3ac2254273e888d |
|
BLAKE2b-256 | 91d60dc0f6e0316ea6fbe6a53f7fdccbabd71f09441be0034af6bd64a707a750 |
Hashes for stacrs-0.1.1-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08884e92937055cd78323487b9a47ca61e4d497acfef7feb55e43edaf1f313bf |
|
MD5 | f500f137098569dc525ce57bb47d2d08 |
|
BLAKE2b-256 | dd10e1967bdeb25242c5a99c8043930e3db9e4789b0fb6101b4a1fb18bea80de |
Hashes for stacrs-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bb8e7e1dbfff603e45d06ec5469338c15d31b46ddb862eefd86a5ef1b601fe4 |
|
MD5 | 1906f70e4678207f14049773d8c450bf |
|
BLAKE2b-256 | 03f59c42fa1b7e6a9ba65e0d2ef0f4b6d54ed51d53ec722f2f9309a0c168e0cc |
Hashes for stacrs-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c088c1859f5628f82190f082856b421e39b25ab61f4e1938f6b4da121365e3 |
|
MD5 | be6b48828a6bb0c1ed406af94854d92a |
|
BLAKE2b-256 | 68745ecdd7867a4c892dc3ce3d8811fec79fabb877186673fa546f4c206db128 |
Hashes for stacrs-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1f55082c08233fdcb1b45ba3edf476cd0f91d87fe80b7f951d0059125c20c47 |
|
MD5 | 4fbfeb1e0ff2668e4641c02b49c4b3c1 |
|
BLAKE2b-256 | 0aaafae52b316991386cf0e1357a5f8b2b101b588b1136ebfd98a35b17ac81f1 |
Hashes for stacrs-0.1.1-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fb0b098956ab18486435eb4849b5ce1947f0c106462392f36df024580488958 |
|
MD5 | db67f9ea58d86ec733f74fd920001f33 |
|
BLAKE2b-256 | 09c6677f1bee03013f35572197b10430c3b82b9e3e7ae012eae6e2cc127d06b2 |
Hashes for stacrs-0.1.1-cp311-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7cbb9c5814606e50ecfcbe464b275539e97b26533899ebf83b61087b38a5b6f |
|
MD5 | 4820291b59e07ffc7088adeb8886ba40 |
|
BLAKE2b-256 | 49af07741b07cff620a4148a524888e3e12725306ea689fc8dea6afec8b6e099 |
Hashes for stacrs-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 076915ab481e5e8e38e0333c9c1cbf7d8b03c5e61b2051d7bbaa384446b460ec |
|
MD5 | 6bb683c1bc7e4d2c4ef4b33173837c75 |
|
BLAKE2b-256 | bd82d5fd7380559e5ecc823f3f23daa8204cdd2e8111ad9d07432117f9d2221f |
Hashes for stacrs-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bda1ecb4ad3a8252663181fb799a9cee1c4bb820581d4373ee2b448735e12220 |
|
MD5 | 8037db0ca71710c6b4bec2f56ff9fe1f |
|
BLAKE2b-256 | 235c1a53f1c3f1d2e247b80a36d1d8ff7db13cd02259a6111a524f263435c307 |
Hashes for stacrs-0.1.1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6e64beaf77e800388b59c590b63ef8c0530cf2e72d9d81d25cb2fb25a0a879f |
|
MD5 | fa43d7dd45ae85319f170cf083580810 |
|
BLAKE2b-256 | 57d5601599ff8112f86868aab9ae12b41031f7050b300d980d3d4ee2eaae1e55 |
Hashes for stacrs-0.1.1-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9503f2ebc673ae0276029fcc79ae31c61835ee59435c813e3a8574676ef79f8 |
|
MD5 | 28db8734efd60c16c15bf81ecf479788 |
|
BLAKE2b-256 | 8c683ca3070a9099083b17cc92941e8fd9b66c7b61112d5c700e88b28d39510c |
Hashes for stacrs-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e737c1e1c8ae61d221cff0bec39ee6d1cad9d1719f427cb2a4b1b230e03cd73 |
|
MD5 | 81b56d3b8dff1ca9f7433431bd7053a2 |
|
BLAKE2b-256 | bb582c7ecec093d4ee4f34115ae8744da9d94e061f37f978baa569d4a5d3680a |
Hashes for stacrs-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 822942dc1918dec9eeb08345c31b9c8a0bd42fdc68a58527a258dfa3c23a8bcd |
|
MD5 | 21cbbb3b635fa4c582c62334a00b0b25 |
|
BLAKE2b-256 | cee4036a661bedcb709552a73b42c9a60db75a42f7a4ada7276c165a52836743 |
Hashes for stacrs-0.1.1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5e3a28bff7c3c83ae00ae939e7562b26a5bf93d6fa1896dac0dc90a75e3dfe0 |
|
MD5 | a1d5f2c91400fb468860ba55b217158a |
|
BLAKE2b-256 | c58da4a7253ff2f5918903523b1010e4376e9b71b77a5801eb8c4d232ead19ec |
Hashes for stacrs-0.1.1-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c28f7263a3a5283e0623cf0102fcaa5c17b67c3da8451076c6fd8070bc6379 |
|
MD5 | ff55629b079a52adb22b605635c3632e |
|
BLAKE2b-256 | 910e81cb7b1558de658b831f05256dcc89fbbd70ee3109aca56aee4fc4e186a0 |
Hashes for stacrs-0.1.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f42cd0bff982025440e18efc817a56833de3554fc10e306ba8ae5049c41cc49 |
|
MD5 | 2f1767cffb4524446e3cb364ad2e5818 |
|
BLAKE2b-256 | 0309e5b55966c1f8e8fc6400ee214b9cef829b04e15dd1ca1c8569546393e795 |
Hashes for stacrs-0.1.1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 895df63cbb319968ac439359621fb69f39bc78c8cd487f33f17316454539f480 |
|
MD5 | f88b632ca96218868f74b4d7a356b432 |
|
BLAKE2b-256 | 2b51bf03b283ae0ed64aaba8a080238ffb36cdc92ee6d8bf3eac91ecb5798303 |
Hashes for stacrs-0.1.1-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16d7fce6e4eda643cd7080413e358595982d1bcfbe605cf7e2549bb9b536b0fb |
|
MD5 | a60b5b06042c2d7af0927e0f0a7ef843 |
|
BLAKE2b-256 | 54bc79452719a3ad249e7729de01d0fa8e9674ddff62b377c67ea92b3a30410e |