Useful commands for Elasticsearch
Project description
A command-line tool and API for various Elasticsearch operations.
Install
pip install elastic-companion
Note: The 1.X versions of elastic-companion support Elasticsearch 1.X and the 5.X versions support Elasticsearch 5.X. This is similar to the versioning of the official library
Commands
To see the list of commands, use the -h or --help flag.
Each command has a corresponding Python module that can be imported and used as an API rather than from the command-line.
Developing
If you are using Docker and Docker Compose, then you don’t need to fiddle with python and pip manually. Otherwise, see below.
Download Python 3, then:
$ pyvenv-3.X venv $ source venv/bin/activate $ pip3 install -r requirements.txt $ ./cli.py -h
On Ubuntu, there’s a bit of an issue with pip3 and the above might not work. Then:
$ pyvenv-3.X venv --without-pip $ source venv/bin/activate $ cd venv $ wget https://bootstrap.pypa.io/get-pip.py $ python3 get-pip.py $ cd .. $ pip3 install -r requirements.txt $ ./cli.py -h
Testing
Use nose:
$ nosetests
or:
$ docker-compose run --rm companion nosetests
Deploying
You need access to the pypi repository first, then it’s just a matter of:
$ python setup.py sdist bdist_wheel $ twine upload dist/*
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 Distribution
Hashes for elastic_companion-5.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2e3f27ea28a0931f3ae389be4bb0673c54d34081aca8acfdf53792f394dd59b |
|
MD5 | 813de5a0e21375d2597f0b7ccfd5a3e8 |
|
BLAKE2b-256 | 356ebff80436bcbd2e767869095ca3b8b8489f7a1054497969c72b2401dde224 |