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.3-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e4bca9923e25a78cb66aab26fafcbe0870d92e08384057b821a72fb7dfab19f |
|
MD5 | b504357efac979588be2b2d02eec95d9 |
|
BLAKE2b-256 | 216259b49c028b434c547690ed12225a3b1c568b554dca0d498fe21e499c6085 |
Hashes for stacrs-0.1.3-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf02d2f5460ff6e8d2dd0e5ff6cc5f18b058dbdfd87917ef755e519394392bbf |
|
MD5 | 113928cbb20857bac18ec90410a4d589 |
|
BLAKE2b-256 | 7cb2fbec9ec0d2f7dc695ea3ba2956ff5a40ebb5af1bf0ee018bc5099da9582b |
Hashes for stacrs-0.1.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 317d761d3c9e3334c2ec92da27f5159fab3e002b8eaaa2a365267efee42d8696 |
|
MD5 | cb7e57a74aff6aef8a91a5cbbca8cd0d |
|
BLAKE2b-256 | 76fb2d8354d24d1425815b20f2e34680127d01a8f8e750d43073756ea6f95505 |
Hashes for stacrs-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 202883223e1d5837e5731adfdae9aeb5f726e878c5a604368cf4250f354332a8 |
|
MD5 | 88554d9f22b259737bbe312c2d592023 |
|
BLAKE2b-256 | 96d44ecc477c121c99a7045f9bad444b1aacafa446b12d745e7a2e211035f606 |
Hashes for stacrs-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 863431356be8fd0f31d1721c145683723e34df6c71648571eb32038112ce96a8 |
|
MD5 | 92ef622d0721c0fc23b3ad164c1342cf |
|
BLAKE2b-256 | 426b0a656533a29971e0503ad2acd0f9194f34c36ee68480bbb2a3fb6397e7a9 |
Hashes for stacrs-0.1.3-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1c5db67ca4d9d3992299504284a09a7cc0a226b1dba495cef8f501a9e59db37 |
|
MD5 | b7965a4071735e6f757f36e2c13a8cdd |
|
BLAKE2b-256 | b5fb79194bd64c18ca7f4f73e5c5befb074dbd7356d30afd97fd8d2e3457cc89 |
Hashes for stacrs-0.1.3-cp311-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8226af6e27c5e19447e13fe75fa399198f56c0b9f841c8e07d2850f862364f82 |
|
MD5 | 32cc66ea080dac11ba0d424e483caa33 |
|
BLAKE2b-256 | 3da33bd265d77680297a92472c805fd455f4178e37ec4f8579ed56e5f457f196 |
Hashes for stacrs-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0070550ed71f0ad637dc936f9d06064ab95d06f3bdd4a81479f35672b3c2c3e5 |
|
MD5 | 06695d2973a5b420579cf1072f1a6fdf |
|
BLAKE2b-256 | e6e319a5311242da8d9996a8977370236d98bc188277b18034b0acea7ac8e308 |
Hashes for stacrs-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7538841bbe77d3768010c2803218fb693b82aca6c1d290aae594677779d4e86a |
|
MD5 | bd0fc187c9a0fb7b2ecbd9b9fe1e9398 |
|
BLAKE2b-256 | 0504f4e96dda74d3cd33876441e342cf349198c95da588859e7d8aeddee05699 |
Hashes for stacrs-0.1.3-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52ab5431aabd235ffeea95a0216901a90b0e5ba94aaee1361b7a7622c7926e0b |
|
MD5 | cf738dc2de88b07b24af6903c4b0ce61 |
|
BLAKE2b-256 | 9353febcb5c186bbb418827b937c92c8ce143f7ebde678cbc21a2b70841fe0ab |
Hashes for stacrs-0.1.3-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a72c46aa63628259a92d78795c24f9c39c9b2fdf4d3c55c701f863d35a7dcffa |
|
MD5 | aeb2d8057b011120334b970cb6bea095 |
|
BLAKE2b-256 | f8c1717968ad63cd2b3ba79aa993c662d7b363e0d714a3560e35f0a18e7d31be |
Hashes for stacrs-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2166afa78d5585ffb5daf694ba643e3088d237bab540f4bb41f5a1ad524dc993 |
|
MD5 | 9894f44a99ef05eedfe20c594e2c9aeb |
|
BLAKE2b-256 | 04e48afb63f840bbe784be1f0a3c1bf08b6b9f87c17ebc79ae0f8856ad071725 |
Hashes for stacrs-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f7d4e7f5c2285fb0ef3d52a4f364bd46c7226a9e67d72a01f960ae741775e1 |
|
MD5 | 8d609275ccce806194862d8e635b5d5d |
|
BLAKE2b-256 | 86c3856bf28c6bb805dbe9bb98f0d537f4f4e6f47a8eaf2590bb3fc820e49825 |
Hashes for stacrs-0.1.3-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78ce2210fc2c30fb671e91a5158ea2377d52ec7a0b7241bc91190d85b4c80904 |
|
MD5 | 629191ccbb2787ebe321777eda32ea27 |
|
BLAKE2b-256 | 31d0bf3cca0a66f0f8717701298c111caea71d0908c098a4ceac54d62d4c0a0a |
Hashes for stacrs-0.1.3-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdd9b76b35ebf064054527c04337d9cafdcfa7a6080038db58e37104d8aac00d |
|
MD5 | 48677fcf554e2e1e77872c180a8ab1a2 |
|
BLAKE2b-256 | beb9d56de7a14be1c0195e1e8d606d3f330dfb60d645a88a5654b64e2fe1801d |
Hashes for stacrs-0.1.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7bd227a0e36f3978ee62acf131728e8d23b80da7bf672fd3a2a9c74396f382f |
|
MD5 | ea7b696f1f3f492a3c4e8a68c6b4c13c |
|
BLAKE2b-256 | a91774f6216d82e9ffba0fe730bdffaf0182ed3792af2fe5e79922bd13175149 |
Hashes for stacrs-0.1.3-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19e714323e22ff2c3b2365a937f122faadb0ed78b27960a2a81da660b68ffca4 |
|
MD5 | 47723aa2785ab58faf3e04936d29e5a1 |
|
BLAKE2b-256 | 9d32e807401416824355590f4c321cc913ffc9a8f914b812c0b18ff56c8a9b5f |
Hashes for stacrs-0.1.3-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1db7708e3fe2b03fb9f91491b216d5ab093c1b565c47882aae13e007ce45217 |
|
MD5 | 94b32fe264a4a6c7df276fab1bc815f4 |
|
BLAKE2b-256 | db2e4a1e43fa5a68a8092c4bd3d420e427cbdd5f2cc0559bdb686ed0369615be |