Skip to main content

Rastless-CLI

A cli for managing data and user access for the cloud application rastless

Table of Content

Installation

Requires: Python >=3.8, <4.0

$ pip install rastless-cli

RastLess has to be configured before you can check if everything works. Make sure that your aws account is configured and has access to DynamoDb and S3.

You can check if everything works correctly by running:

$ rastless check-aws-connection

If it is not working, make sure to configure the aws connection by configuring the aws cli. You need an Access ID and a Secret ID from aws to configure. Please check the official instructions for further help.

Developer Installation
$ curl -LsSf https://astral.sh/uv/install.sh | sh
$ git clone https://github.com/EomapCompany/rastless-cli
$ cd rastless-cli
$ uv sync

Run tests

uv run pytest tests/ -v

Running the CLI

After installation you can run the ClI by using:

$ rastless --help

You can decide if you want to upload data to the production, development or test environment. By using the "dev" flag you upload it to development environment. By using the "test" flag you upload it to the test environment and without a flag you upload it to the production environment.

# Example development
$ rastless --dev list-layers

# Example test
$ rastless --test list-layers

# Example production
$ rastless list-layers

Commands Overview

Commands
add-mpl-colormap Add a custom colormap based on matplotlib or cmocean colormaps
add-discrete-colormap Add a discrete colormap based on matplotlib colormaps
add-sld-colormap Add a SLD file
add-permission Add a role to one or multiple layers
check-aws-connection Check if cli can connect to aws
change-layer-attributes Change one or more attributes of an existing layer
create-layer Create layer
create-timestep Create timestep entry and upload layer to S3 bucket
delete-colormap Remove a SLD file
delete-layer Delete a layer with all timestep entries
delete-permission Delete one or multiple permissions
delete-layer-timestep Delete one or multiple layer timesteps
delete-cache Deletes cache
list-layers List all layers
list-colormaps List all colormaps
layer-exists Check if layer id exists

Accomplishing a running system

1. Check if you have access to the system

$ rastless check-aws-connection

2. Create a new layer

  • All inputs are strings. You have to take care, that the element exists in the database e.g. the colormap name.
  • Multiple permissions can be set by using multiple -pe flags
$ rastless create-layer -cl hypos -pr tur -t Turbidity -cm log75_C2S8_32bit -u FTU -b <rgb uuid> -d "Some description" -r 1 -pe user#marcel -pe role#hypos:full-access

It will return a new uuid which you need to store, in order to upload timesteps to the particular layer

3. Upload Timesteps for layer

$ rastless create-timestep -d 2020-01-01T15:00:00 -s SENT2 -l <layer uuid> -t daily -p deflate

Change attributes of an existing layer

Only the attributes you pass are changed; --layer-id is required.

$ rastless change-layer-attributes -l <layer uuid> -t "New Title" -cm log75_C2S8_32bit -u FTU

Breaking changes

Version 0.3

The command "create-timestep" changed. Files need to be set as flag instead of normal input

  • Now it is possible to set multiple files per timestep by setting multiple file flags -f
  • To override a timestep which already exists you have to set the flag -o, otherwise you will be asked during uploading if you really want to override it
  • To append new files to an existing timestep you have to set the flag -a
  • Attention: If you append a file to an existing timestep and the filename already exists, it will be automatically overridden without further action

Version 1.0.0

Small naming changes:

  • fixing naming differences timestamp => timestep
    delete_layer_timestamps command changed to => delete_layer_timestep
  • permission parameter in all cli commands -p
    change affected create_layer command (before: -pe)
  • singular and plural inconsistencies (all create/ delete commands named singular)
    delete_layer_timesteps => delete_layer_timestep
# Before. Filepath without flag
rastless create-timestep file1.tif -d 2020-01-01T15:00:00 -s Sent2 -layer-id 1234 -t daily -p deflate

# Now: Single file. Flag: -f
rastless create-timestep -f file1.tif -d 2020-01-01T15:00:00 -s Sent2 -layer-id 1234 -t daily -p deflate

# Now: Multi file. Flag: -f <file1> -f <file1>
rastless create-timestep -f file1.tif -f file2.tif -d 2020-01-01T15:00:00 -s Sent2 -layer-id 1234 -t daily -p deflate

# Now: Override existing timestep. Flag: -o
rastless create-timestep -f file1.tif -f file2.tif -d 2020-01-01T15:00:00 -s Sent2 -layer-id 1234 -t daily -p deflate -o

# Now: Append file to existing timestep. Flag: -a
rastless create-timestep -f file2.tif -d 2020-01-01T15:00:00 -layer-id 1234 -p deflate -a

Version 1.7.0

  • Add new endoints to delete layer cache in s3 bucket and dynamodb
  • List-layer now has filter options for region_id, client and product

Publish and Release

When releasing we use semantic versioning to define the new version tag.

When pushing to master any commit message that includes #major, #minor, #patch will add a tag to the commit with the respective version bump, after which a package build and release to PyPI is triggered. If all steps were successful a new GitHub release is created.

A push whose head commit message contains none of #major/#minor/#patch (for example a plain Merge branch ... commit) creates no tag and triggers no release — the build/publish steps are skipped. To release such changes, make sure the version bump keyword is in the head commit message that lands on master.

Metadata

Release files for rastless-cli 1.13.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rastless-cli 1.13.2
File Size Uploaded
rastless_cli-1.13.2.tar.gz 5.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for rastless-cli 1.13.2
File Interpreter ABI Platform
rastless_cli-1.13.2-py3-none-any.whl Python 3 none any Details

Total release size: 5.5 MB

Release files / rastless_cli-1.13.2.tar.gz

Download URL rastless_cli-1.13.2.tar.gz
Size 5.5 MB
Tags Source
SHA-256 checksum
How to use checksums
8e35f93795a7489ea5c0dfe06efbb11374b3a1fab3a3b42c1d44124b47299143
BLAKE2b-256 checksum
How to use checksums
29a51fe8966a786a600fb62cfc7ac5f237616715dc74e9c910651853891a610d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rastless_cli-1.13.2-py3-none-any.whl

Download URL rastless_cli-1.13.2-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc11d76952c2fc38ec6dbf3deaaee2038183d029ec7dde652c2343828578afad
BLAKE2b-256 checksum
How to use checksums
9dc73b868596eb518ab006b8933ba127a16f0746bdb0b5e33cd470aebc695aae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.13.3

2 release files

This release

1.13.2 This release

2 release files

1.13.1

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.6

2 release files

1.11.5

2 release files

1.11.4

2 release files

1.11.3

2 release files

1.11.2

2 release files

1.11.1

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.5

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page