Skip to main content

Geovio client cli tool

Project description

GeoVisio Command Line Interface (cli)

GeoVisio logo

Command Line Interface tool to interact with a Geovisio instance.

[[TOC]]

Features

This tool allows you to:

  • Upload a sequence of pictures on a GeoVisio API

It is under heavy development, new features will appear in a near future 😉

Install

GeoVisio CLI can be installed using two methods:

From PyPI

Just launch this command:

pip install geovisio_cli

After this you should be able to use the CLI tool with the name geovisio:

geovisio --help

Alternatively, you can use pipx if you want all the script dependencies to be in a custom virtual env.

You need to install pipx, then:

pipx install geovisio_cli

From Git repository

Download the repository:

git clone https://gitlab.com/geovisio/cli.git geovisio_cli
cd geovisio_cli/

To avoid conflicts, it's considered a good practice to create a virtual environment (or virtualenv). To do so, launch the following commands:

# Create the virtual environment in a folder named "env"
python3 -m venv env

# Launches utilities to make environment available in your Bash
source ./env/bin/activate

Then, install the GeoVisio CLI dependencies using pip:

pip install -e .

You can also install the dev dependencies if necessary (to have lints, format, tests, ...):

pip install -e .[dev]

Then, you can use the geovisio command:

geovisio --help

Usage

All details of available commands are listed in USAGE.md documentation.

Upload pictures

The picture upload command is available under the upload subcommand:

geovisio upload --help

If you want to upload pictures from a my_sequence directory to a GeoVisio instance (running locally in this example), launch this command:

geovisio upload --path ./my_sequence --api-url http://localhost:5000/

Authentication

If the GeoVisio API requires a login for the upload, the user/password can either be set:

  • with command-line arguments (--user / --password)
  • with environment variables (GEOVISIO_USER / GEOVISIO_PASSWORD)

If no information is set but required by the GeoVisio instance, they will be asked interactively. This is the best way to enter the password so it will not be stored in the command-line history.

Note: the password is not stored, and sent directly to geovisio. If the future, this will be removed in favor of API keys when geovisio will support those.

Development

Tests

Tests are run using PyTest. By default, our tests use a Docker Compose environment (located in ./tests/integration/docker-compose-geovisio.yml) to set-up a temporary GeoVisio API to run onto. If you have Docker Compose enabled and running on your machine, you can simply run this command to launch tests:

pytest

If you don't have Docker Compose, or want to use an existing GeoVisio test instance (to speed up tests), you can pass the --external-geovisio-url option to pytest:

pytest --external-geovisio-url=http://localhost:5000

Documentation

High-level documentation is handled by Typer. You can update the generated USAGE.md file using this command:

make docs

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Copyright (c) GeoVisio team 2022-2023, released under MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geovisio_cli-0.0.1.tar.gz (1.5 MB view hashes)

Uploaded Source

Built Distribution

geovisio_cli-0.0.1-py2.py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page