stacrs-cli


Namestacrs-cli JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://stac-utils.github.io/stac-rs
SummaryA STAC command-line interface written in Rust
upload_time2025-02-03 12:20:33
maintainerNone
docs_urlNone
authorPete Gadomski <pete.gadomski@gmail.com>
requires_python>=3.8
licenseMIT OR Apache-2.0
keywords stac geospatial
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # stac-cli

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/stac-utils/stac-rs/ci.yml?branch=main&style=for-the-badge)](https://github.com/stac-utils/stac-rs/actions/workflows/ci.yml)
[![docs.rs](https://img.shields.io/docsrs/stac-cli?style=for-the-badge)](https://docs.rs/stac-cli/latest/stac_cli/)
[![Crates.io](https://img.shields.io/crates/v/stac-cli?style=for-the-badge)](https://crates.io/crates/stac-cli)
![Crates.io](https://img.shields.io/crates/l/stac-cli?style=for-the-badge)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](./CODE_OF_CONDUCT)

Command Line Interface (CLI) for [STAC](https://stacspec.org/), named `stacrs`.

## Installation

```shell
python -m pip install stacrs-cli
```

Or:

```sh
cargo install stac-cli
```

Then:

```shell
# Search
$ 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 1000 \
    items.parquet

# Translate formats
$ stacrs translate items.parquet items.ndjson
$ stacrs translate items.ndjson items.json

# Migrate STAC versions
$ stacrs translate item-v1.0.json item-v1.1.json --migrate

# Search stac-geoparquet (no API server required)
$ stac search items.parquet

# Server
$ stacrs serve items.parquet  # Opens a STAC API server on http://localhost:7822

# Validate
$ stacrs validate item.json
```

## Usage

**stacrs** provides the following subcommands:

- `stacrs search`: searches STAC APIs and geoparquet files
- `stacrs serve`: serves a STAC API
- `stacrs translate`: converts STAC from one format to another
- `stacrs validate`: validates a STAC value

Use the `--help` flag to see all available options for the CLI and the subcommands:

## Features

This crate has two features:

- `pgstac`: enable a [pgstac](https://github.com/stac-utils/pgstac) backend for `stacrs serve` (enabled by default)
- `python`: create an entrypoint that can be called from Python (used to enable `python -m pip install stacrs-cli`)

## Other info

This crate is part of the [stac-rs](https://github.com/stac-utils/stac-rs) monorepo, see its README for contributing and license information.


            

Raw data

            {
    "_id": null,
    "home_page": "https://stac-utils.github.io/stac-rs",
    "name": "stacrs-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "stac, geospatial",
    "author": "Pete Gadomski <pete.gadomski@gmail.com>",
    "author_email": "Pete Gadomski <pete.gadomski@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6d/e8/d5351333ee6f01ed8d794706170e16a8dd0b015dacb4d923d9860da8a912/stacrs_cli-0.5.0.tar.gz",
    "platform": null,
    "description": "# stac-cli\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/stac-utils/stac-rs/ci.yml?branch=main&style=for-the-badge)](https://github.com/stac-utils/stac-rs/actions/workflows/ci.yml)\n[![docs.rs](https://img.shields.io/docsrs/stac-cli?style=for-the-badge)](https://docs.rs/stac-cli/latest/stac_cli/)\n[![Crates.io](https://img.shields.io/crates/v/stac-cli?style=for-the-badge)](https://crates.io/crates/stac-cli)\n![Crates.io](https://img.shields.io/crates/l/stac-cli?style=for-the-badge)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](./CODE_OF_CONDUCT)\n\nCommand Line Interface (CLI) for [STAC](https://stacspec.org/), named `stacrs`.\n\n## Installation\n\n```shell\npython -m pip install stacrs-cli\n```\n\nOr:\n\n```sh\ncargo install stac-cli\n```\n\nThen:\n\n```shell\n# Search\n$ stacrs search https://landsatlook.usgs.gov/stac-server \\\n    --collections landsat-c2l2-sr \\\n    --intersects '{\"type\": \"Point\", \"coordinates\": [-105.119, 40.173]}' \\\n    --sortby='-properties.datetime' \\\n    --max-items 1000 \\\n    items.parquet\n\n# Translate formats\n$ stacrs translate items.parquet items.ndjson\n$ stacrs translate items.ndjson items.json\n\n# Migrate STAC versions\n$ stacrs translate item-v1.0.json item-v1.1.json --migrate\n\n# Search stac-geoparquet (no API server required)\n$ stac search items.parquet\n\n# Server\n$ stacrs serve items.parquet  # Opens a STAC API server on http://localhost:7822\n\n# Validate\n$ stacrs validate item.json\n```\n\n## Usage\n\n**stacrs** provides the following subcommands:\n\n- `stacrs search`: searches STAC APIs and geoparquet files\n- `stacrs serve`: serves a STAC API\n- `stacrs translate`: converts STAC from one format to another\n- `stacrs validate`: validates a STAC value\n\nUse the `--help` flag to see all available options for the CLI and the subcommands:\n\n## Features\n\nThis crate has two features:\n\n- `pgstac`: enable a [pgstac](https://github.com/stac-utils/pgstac) backend for `stacrs serve` (enabled by default)\n- `python`: create an entrypoint that can be called from Python (used to enable `python -m pip install stacrs-cli`)\n\n## Other info\n\nThis crate is part of the [stac-rs](https://github.com/stac-utils/stac-rs) monorepo, see its README for contributing and license information.\n\n",
    "bugtrack_url": null,
    "license": "MIT OR Apache-2.0",
    "summary": "A STAC command-line interface written in Rust",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://stac-utils.github.io/stac-rs",
        "Issues": "https://github.com/stac-utils/stac-rs/issues",
        "Repository": "https://github.com/stac-utils/stac-rs"
    },
    "split_keywords": [
        "stac",
        " geospatial"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8afd76852ad6406e9c43e501cdd21a1abb9f7da8af0e4c5d749929faf33488a6",
                "md5": "7f29a7a2925a93a1a03956ec98abe091",
                "sha256": "d73d77a02824a9437fef631529bab03485c86034a36ccae3c040f2f76f7d79e0"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7f29a7a2925a93a1a03956ec98abe091",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3578,
            "upload_time": "2025-02-03T12:20:23",
            "upload_time_iso_8601": "2025-02-03T12:20:23.068707Z",
            "url": "https://files.pythonhosted.org/packages/8a/fd/76852ad6406e9c43e501cdd21a1abb9f7da8af0e4c5d749929faf33488a6/stacrs_cli-0.5.0-py3-none-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "70512173f1bd63ca736e38c4d1d97593df8bd6d4d55096cdd8fc231d63906166",
                "md5": "22919af890d70984a4ceed6a522edadd",
                "sha256": "d459bb6b6e0de8450ca30b0eb262197b64b30f594a8b8fe95e7be07868eec65f"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "22919af890d70984a4ceed6a522edadd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3769,
            "upload_time": "2025-02-03T12:20:21",
            "upload_time_iso_8601": "2025-02-03T12:20:21.427321Z",
            "url": "https://files.pythonhosted.org/packages/70/51/2173f1bd63ca736e38c4d1d97593df8bd6d4d55096cdd8fc231d63906166/stacrs_cli-0.5.0-py3-none-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ff093296c61a9259de779fe5c04ee8ca3020c7bbfa070c3c12bc67878f2afa97",
                "md5": "ea6692f4e0dafc6217db82b9cac4492f",
                "sha256": "0029325376a85335a8415cbb6d2ad19de114720304fdde7106c59ffdf79ce2d0"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "ea6692f4e0dafc6217db82b9cac4492f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5915,
            "upload_time": "2025-02-03T12:20:15",
            "upload_time_iso_8601": "2025-02-03T12:20:15.096429Z",
            "url": "https://files.pythonhosted.org/packages/ff/09/3296c61a9259de779fe5c04ee8ca3020c7bbfa070c3c12bc67878f2afa97/stacrs_cli-0.5.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bcd3232f302ff6ba0b64f4156fc1f584096d18b15e51eefb307533166c734871",
                "md5": "a519383e81898e54cf83274b37dcd12b",
                "sha256": "4dad396a726d12b782d3be17d2fb509cc7b036d0c28071d4a40364fd86c421f5"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "a519383e81898e54cf83274b37dcd12b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 237622,
            "upload_time": "2025-02-03T12:20:17",
            "upload_time_iso_8601": "2025-02-03T12:20:17.088093Z",
            "url": "https://files.pythonhosted.org/packages/bc/d3/232f302ff6ba0b64f4156fc1f584096d18b15e51eefb307533166c734871/stacrs_cli-0.5.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1e9d850f805f31db12ebf26d984da6feaec77cedc274110e87a2330e4a16e82a",
                "md5": "cec529f5368570c6d02e7e846a37a770",
                "sha256": "fc4e77ddaf9cf4f80cdd4b302ff207b787671d7faf2fb093d342d335e382bb4d"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl",
            "has_sig": false,
            "md5_digest": "cec529f5368570c6d02e7e846a37a770",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5239,
            "upload_time": "2025-02-03T12:20:18",
            "upload_time_iso_8601": "2025-02-03T12:20:18.939327Z",
            "url": "https://files.pythonhosted.org/packages/1e/9d/850f805f31db12ebf26d984da6feaec77cedc274110e87a2330e4a16e82a/stacrs_cli-0.5.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bdf958e1282d544a68533710b2a0520412da6fbc7e2af1a3932bb3c5edc63491",
                "md5": "2304735cd6f63f42e0b68ec9ae4ab625",
                "sha256": "e18c7558135d95657fa43bcb3593c46ffa28dd037f2ea4563c42eb3f44854905"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2304735cd6f63f42e0b68ec9ae4ab625",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5211,
            "upload_time": "2025-02-03T12:20:20",
            "upload_time_iso_8601": "2025-02-03T12:20:20.504808Z",
            "url": "https://files.pythonhosted.org/packages/bd/f9/58e1282d544a68533710b2a0520412da6fbc7e2af1a3932bb3c5edc63491/stacrs_cli-0.5.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3bf814f3bd56b7cfab5f1ba7c04b7715c1a7c0f891f4c62a2d1f7e35dc4d6fa9",
                "md5": "9cfe4d9c64cbbc19b88ab1df792218ce",
                "sha256": "d3783a5db97cc5fdd890a86e96a9ca9f668005b87bd3f4da25ec4c5c8d29bea9"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "9cfe4d9c64cbbc19b88ab1df792218ce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 187255,
            "upload_time": "2025-02-03T12:20:24",
            "upload_time_iso_8601": "2025-02-03T12:20:24.849344Z",
            "url": "https://files.pythonhosted.org/packages/3b/f8/14f3bd56b7cfab5f1ba7c04b7715c1a7c0f891f4c62a2d1f7e35dc4d6fa9/stacrs_cli-0.5.0-py3-none-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aacc9b890d2e4baa64e7072499572ff0cc4ef6cc572f2bf7b0fdfe9b22d7027b",
                "md5": "60f4b49d9741781eaf6e2f913d4279d8",
                "sha256": "6e5a46f46393b79e8c12b6baf8a85cdbdc029158eb301d28826187d8aac1a8d4"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-musllinux_1_2_armv7l.whl",
            "has_sig": false,
            "md5_digest": "60f4b49d9741781eaf6e2f913d4279d8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 269696,
            "upload_time": "2025-02-03T12:20:26",
            "upload_time_iso_8601": "2025-02-03T12:20:26.752306Z",
            "url": "https://files.pythonhosted.org/packages/aa/cc/9b890d2e4baa64e7072499572ff0cc4ef6cc572f2bf7b0fdfe9b22d7027b/stacrs_cli-0.5.0-py3-none-musllinux_1_2_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9a104a2688a737737fbc260fb4c022a6bfbdf94e77e91edb33c3941bcf278026",
                "md5": "b501910201f2e8240ec7db4da9ccc160",
                "sha256": "d6c1c509aefc9a45df3838397ff87abd6ba23ac6adca2d817529c8bd339e9c2b"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-musllinux_1_2_i686.whl",
            "has_sig": false,
            "md5_digest": "b501910201f2e8240ec7db4da9ccc160",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 191311,
            "upload_time": "2025-02-03T12:20:29",
            "upload_time_iso_8601": "2025-02-03T12:20:29.001574Z",
            "url": "https://files.pythonhosted.org/packages/9a/10/4a2688a737737fbc260fb4c022a6bfbdf94e77e91edb33c3941bcf278026/stacrs_cli-0.5.0-py3-none-musllinux_1_2_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1d0fe5ebc3f8e8940f28beb47969156bfb47baffe117ff82d8488b8fb7ac9747",
                "md5": "fcc529561b1bf17636d00a80727cbd26",
                "sha256": "e6300e656e3e6fdd9acf1e41e4a8e8b0266765df7485e651fc7d63ebc3e58926"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0-py3-none-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "fcc529561b1bf17636d00a80727cbd26",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 177222,
            "upload_time": "2025-02-03T12:20:30",
            "upload_time_iso_8601": "2025-02-03T12:20:30.581962Z",
            "url": "https://files.pythonhosted.org/packages/1d/0f/e5ebc3f8e8940f28beb47969156bfb47baffe117ff82d8488b8fb7ac9747/stacrs_cli-0.5.0-py3-none-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6de8d5351333ee6f01ed8d794706170e16a8dd0b015dacb4d923d9860da8a912",
                "md5": "15368a9938245e876d6bde52cf5d902d",
                "sha256": "2428436c4c5331f0eea1ca22daa2c64b5b21958eefed21bef5e24b6dd8288e46"
            },
            "downloads": -1,
            "filename": "stacrs_cli-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "15368a9938245e876d6bde52cf5d902d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1689986,
            "upload_time": "2025-02-03T12:20:33",
            "upload_time_iso_8601": "2025-02-03T12:20:33.583315Z",
            "url": "https://files.pythonhosted.org/packages/6d/e8/d5351333ee6f01ed8d794706170e16a8dd0b015dacb4d923d9860da8a912/stacrs_cli-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-03 12:20:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "stac-utils",
    "github_project": "stac-rs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "stacrs-cli"
}
        
Elapsed time: 0.43465s