Skip to content

Commit 77d95a2

Browse files
Merge pull request #41 from stac-utils/release_0.1.1
Release 0.1.1
2 parents 3099834 + 5beb455 commit 77d95a2

File tree

6 files changed

+24
-16
lines changed

6 files changed

+24
-16
lines changed

.flake8

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ ignore = E126,E127,W503
1515

1616
exclude =
1717
docs/build
18-
.tox

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [v0.1.1] - 2021-04-16
10+
911
### Added
1012

1113
- `ItemSearch.items_as_collection` [#37](https://github.com/stac-utils/pystac-client/pull/37)
1214

1315
### Fixed
1416

1517
- Include headers in STAC_IO [#38](https://github.com/stac-utils/pystac-client/pull/38)
18+
- README updated to reflect actual CLI behavior
1619

1720
### Changed
1821

1922
- CLI: pass in heades as list of KEY=VALUE pairs
2023

21-
### Removed
22-
2324
## [v0.1.0] - 2021-04-14
2425

2526
Initial release.
2627

27-
[Unreleased]: <https://github.com/stac-utils/pystac-client/compare/v0.1.0...main>
28+
[Unreleased]: <https://github.com/stac-utils/pystac-client/compare/v0.1.1...main>
29+
[v0.1.1]: <https://github.com/stac-utils/pystac-client/compare/v0.1.0..v0.1.1>
2830
[v0.1.0]: <https://github.com/stac-utils/pystac-client/tree/v0.1.0>
2931

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2021 [name of copyright owner]
1+
Copyright 2021 Jon Duckworth
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ STAC API Client
77
[![Documentation](https://readthedocs.org/projects/pystac_client/badge/?version=latest)](https://pystac_client.readthedocs.io/en/latest/)
88
[![codecov](https://codecov.io/gh/stac-utils/pystac-client/branch/main/graph/badge.svg)](https://codecov.io/gh/stac-utils/pystac-client)
99

10-
A Python client for working with STAC Catalogs and APIs.
10+
A Python client for working with [STAC](https://stacspec.org/) Catalogs and APIs.
1111

1212
## Installation
1313

@@ -30,31 +30,38 @@ $ stac-client search --url https://earth-search.aws.element84.com/v0 -c sentinel
3030
1999 items matched
3131
```
3232

33+
The `--matched` switch performs a search with limit=0 so does not get any Items, but gets the total number of
34+
matches which will be output to the screen.
35+
3336
The environment variable `STAC_URL` can be set instead of having to explicitly set the Catalog URL with every call:
3437

3538
```
3639
$ export STAC_URL=https://earth-search.aws.element84.com/v0
37-
$ stac-client search -c sentinel-s2-l2a-cogs --bbox -72.5 40.5 -72 41 --datetime 2020-01-01/2020-01-31
40+
$ stac-client search -c sentinel-s2-l2a-cogs --bbox -72.5 40.5 -72 41 --datetime 2020-01-01/2020-01-31 --matched
3841
48 items matched
3942
```
4043

41-
The CLI performs a search with limit=0 so does not get any Items, it only gets the count. To fetch the items use one or both of the `--stdout` or `--save` switches.
42-
43-
Specifying `--stdout` will fetch all items, paginating if necessary. If `max_items` is provided it will stop paging once that many items has been retrieved. It then prints all items to stdout as an ItemCollection. This can be useful to pipe output to another process such as [stac-terminal](https://github.com/stac-utils/stac-terminal), [geojsonio-cli](https://github.com/mapbox/geojsonio-cli), or [jq](https://stedolan.github.io/jq/).
44+
Without the `--matched` switch, all items will be fetched, paginating if necessary. If `max_items` is provided
45+
it will stop paging once that many items has been retrieved. It then prints all items to stdout as an ItemCollection.
46+
This can be useful to pipe output to another process such as [stac-terminal](https://github.com/stac-utils/stac-terminal),
47+
[geojsonio-cli](https://github.com/mapbox/geojsonio-cli), or [jq](https://stedolan.github.io/jq/).
4448

4549
```
46-
$ stac-client search --stdout -c sentinel-s2-l2a-cogs --bbox -72.5 40.5 -72 41 --datetime 2020-01-01/2020-01-31 | stacterm cal --label platform
50+
$ stac-client search -c sentinel-s2-l2a-cogs --bbox -72.5 40.5 -72 41 --datetime 2020-01-01/2020-01-31 | stacterm cal --label platform
4751
```
4852

4953
![](docs/source/images/stacterm-cal.png)
5054

51-
The `--save` switch will save all fetched items (as with `--stdout`) to a file.
55+
If the `--save` switch is provided instead, the results will not be output to stdout, but instead will be saved to
56+
the specified file.
5257

5358
```
5459
$ stac-client search -c sentinel-s2-l2a-cogs --bbox -72.5 40.5 -72 41 --datetime 2020-01-01/2020-01-31 --save items.json
5560
```
5661

57-
If the Catalog supports the [Query extension](https://github.com/radiantearth/stac-api-spec/tree/master/fragments/query), any Item property can also be included in the search. Rather than requiring the JSON syntax the Query extension uses, pystac-client uses a simpler syntax that it will translate to the JSON equivalent.
62+
If the Catalog supports the [Query extension](https://github.com/radiantearth/stac-api-spec/tree/master/fragments/query),
63+
any Item property can also be included in the search. Rather than requiring the JSON syntax the Query extension uses,
64+
pystac-client uses a simpler syntax that it will translate to the JSON equivalent.
5865

5966
```
6067
<property><operator><value>
@@ -71,7 +78,7 @@ view:sun_elevation<20
7178
Any number of properties can be included, and each can be included more than once to use additional operators.
7279

7380
```
74-
$ stac-client search -c sentinel-s2-l2a-cogs --bbox -72.5 40.5 -72 41 --datetime 2020-01-01/2020-01-31 -q "eo:cloud_cover<10"
81+
$ stac-client search -c sentinel-s2-l2a-cogs --bbox -72.5 40.5 -72 41 --datetime 2020-01-01/2020-01-31 -q "eo:cloud_cover<10" --matched
7582
10 items matched
7683
```
7784

pystac_client/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.1.0'
1+
__version__ = '0.1.1'

tests/test_pystac_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33

44
def test_version():
5-
assert __version__ == '0.1.0'
5+
assert __version__ == '0.1.1'

0 commit comments

Comments
 (0)