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.2-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a97eb649781394a2e2a8ceb208b7d7a38e366dfb04a51fd5de8027333c06cddb |
|
MD5 | 7eb43e43600139fa585f2d3f166d9987 |
|
BLAKE2b-256 | 53aae9a88ddbfe6b09f57263cc5b13ea8746ac29339b1a84d2b0c6386f60d47a |
Hashes for stacrs-0.1.2-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5760d52898ed8508a8b5a6debc63da8f44f590b10e90ada610a0b8167b55025a |
|
MD5 | 18e0bd1269db0a8a30f79f6e10be521e |
|
BLAKE2b-256 | c66d30ed32642cc2acc91a82fbc32d19440ff9796d4c0106987c49b0fa08ed0f |
Hashes for stacrs-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 183ba879990d764133a4cd7a5857e5a3fa40b2eddd240ba88093e95013364295 |
|
MD5 | e2811ce67e3216be2644bac33bdfa1e0 |
|
BLAKE2b-256 | 10076e01be065e46fe4c91216ecec6d808a8261ca3ea68752452ccd6f44d3f9e |
Hashes for stacrs-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac6ff398a151fc8e74042a57b282488a6b7271febdb4aeab9ef2bbf359073dbb |
|
MD5 | 9034b92b9a49d0b542d2ba20236cca30 |
|
BLAKE2b-256 | 972551cca7266920c1e055538e241d04288fda79b71abf8caf6d8e6dd4bd930f |
Hashes for stacrs-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb980de11b5fc9026eeaac86dddfd564c3057de7b651acfdf644041ce7802291 |
|
MD5 | 37ce6adfe0d178b0dc8e303c98dfe29e |
|
BLAKE2b-256 | aceb4ccbac94580c4a26dec1890415938859973524110c8eec064c09851f7cd9 |
Hashes for stacrs-0.1.2-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f037976a89e8f42d215247cbcd0b0185612c20e4b82306e57484b47bf792970 |
|
MD5 | 556212fc92372a3032b9591676da0499 |
|
BLAKE2b-256 | e726dfd6306cb2e9a261084018dc79b375053a1f2e025689f840b6a16c7388ce |
Hashes for stacrs-0.1.2-cp311-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7982597452ab246efed2a55200370d7f2ca8ecd40b54c32e5981a35a48356ecb |
|
MD5 | f49bd7c3d9ba3809eb36587928314b5f |
|
BLAKE2b-256 | 893ea57500dafaaa40d238957679482453e61e54b24aab530df35ade106ee9dc |
Hashes for stacrs-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17b9aad1b87261268b88a2094b2f8d38104710f93249aaf12747aa630a7aa59d |
|
MD5 | 8c2c68e27c859f6c753a0cea329b3788 |
|
BLAKE2b-256 | 7fbd11250521a2897f6259536a1adb31e6bc1d769e604ee8bf3d379024204429 |
Hashes for stacrs-0.1.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 280dd3d3438ac4123e6eadf44b0f93a100b7f287ee2158b7e0461f6b82d64a66 |
|
MD5 | 1451949482f815d18530b2e4c1940659 |
|
BLAKE2b-256 | 8c4ea2992f24a47f1082e0343d1ee4b971d454806fef08ddecea063a0325820d |
Hashes for stacrs-0.1.2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5bb666a028ae661fd73c78b336a604128edada4e8a9ad0b3e218d08753c9c13 |
|
MD5 | 3cab0bee13941502a21d3e7a6cb1411d |
|
BLAKE2b-256 | c8e2bfce45320ba2c8095d8e4484f72548ff79f92ffe6463424ea6a701f0cba4 |
Hashes for stacrs-0.1.2-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b43c4f87f1f04bc59d465ca1a6618b85968d094ef5860d823f9f32e91d7af2 |
|
MD5 | e67f4781fa6457e617b63bbacbbb632f |
|
BLAKE2b-256 | 50372a884f948c71e0144d9793e8ee37430c8e8d43091fb7a0396be3491d676d |
Hashes for stacrs-0.1.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20226e3bc57f000924cfb5c0c6f5086f2a3f698164608baf0bc0a52bf9134889 |
|
MD5 | c13cd181bc98bffc1f3246e7d7b1310c |
|
BLAKE2b-256 | daf0d9e3757df0ab4544a425bfb2faf26abdb4c215d556f8ae9c38b2f0667a5e |
Hashes for stacrs-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b482021aa7f11907f617e17a2d8e789a97f7a12675a40efbaa9f3f452dd60d3f |
|
MD5 | dce0b29fe18fdecd8a9059c952e23cd2 |
|
BLAKE2b-256 | 07aa1c72050f701b968dfd8cc23f512b2c4ee22fb11096c0759781667ef6fc5a |
Hashes for stacrs-0.1.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 245fe50f5ba110aa82b8ee48cb9d5c3b0f88b12538ab94a44b97f1a445e9546d |
|
MD5 | d534e0d44b55fd76f47fe2b3e6390626 |
|
BLAKE2b-256 | cc9e119b672e71a27337d4fceaee0f92fce8acc52783f2234c371ea5b29715bd |
Hashes for stacrs-0.1.2-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 040f0cd1b3a0a8e12ee0d15d9849a96baefa46d30e5d66b8ddfe109e7a107b02 |
|
MD5 | bb84f266a837de62990f0b592ac5f3fc |
|
BLAKE2b-256 | 9e38b11df2547402cbc307edb79c6f227df25bd66ac4a85e97286028764a374f |
Hashes for stacrs-0.1.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 383a36c6929900b8bf37a711b73c8111d6e52008be2223a35708940201f41386 |
|
MD5 | 1c53bafbf1955b2882ff858575e93af0 |
|
BLAKE2b-256 | b728bd50eaf803995a652f4e3e5252dba42264bdf4174388e6f3064168667a3d |
Hashes for stacrs-0.1.2-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 869c3f9332301152c0ac53049d756a72a9b119776dd18280eb32a00a37266858 |
|
MD5 | 97aa85b6d7518361cef010e8268a3cd7 |
|
BLAKE2b-256 | 227080518e2dc8daa0a864101798d6b134887217d043b0b777b1468c1fd9f625 |
Hashes for stacrs-0.1.2-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38d48fa4ac8b165735a6cf2116bce6403d784d89330802cf811dc3acc7bdfa82 |
|
MD5 | ab537dff871506388994d949212a4b18 |
|
BLAKE2b-256 | cdba983baf57fbe397a4dff741bbada534805902b5ca523eb3554d0392dc670a |