elastic-tools-1.0.3
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | elastic-tools-1.0.3 |
| نام | elastic-tools |
| نسخه کتابخانه | 1.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/petricore-tech/elastictools.git |
| آدرس اینترنتی | https://pypi.org/project/elastic-tools/ |
| مجوز | - |
# ElasticTools - high-speed utilities for ElasticSearch data manipulations
`ElasticTools` is a python package developed as a handy utility for cases when it comes to **streaming**, **manipulation** or **processing** of any sort of data stored (or prone to be stored) within ElasticSearch.
The key features are:
- **Highly performant**. Written purely in python with a dense usage of concurrency thanks to AsyncIO.
- **Intuitive**. Though almost every commandline argument has a detailed explanation of *what* is it and *why* we need it, one can intuitively answer those questions.
## Installation
### Create and activate a virtual environment
```bash
python3 -m venv venv
source venv/bin/activate
```
### Install the package using **pip**
```bash
pip install elastic-tools
```
## Usage
### **1. Dump Elasticsearch index**
```bash
elasticdump --elastic_address <ES_ADDRESS> --index <INDEX_NAME> --output_dir <TARGET_DIRECTORY> --chunk_size <CHUNK_SIZE>
```
*Example call:*
```bash
elasticdump --elastic_address localhost:9200 --index products --output_dir ./dump/ --chunk_size 500
```
### **2. Restore Elasticsearch index**
```bash
elasticload --elastic_address <ES_ADDRESS> --index <INDEX_NAME> --input_dir <DIR_WITH_DUMPED_DATA> --chunk_size <CHUNK_SIZE> --connection_pool_size <PARALLEL_CONNECTIONS_COUNT> --mode <MODE>
```
*Example call:*
```bash
elasticload --elastic_address localhost:9200 --index products --input_dir ./dump/ --chunk_size 1000
```
Based on the situation you may want to load *only data* or *both data and settings*. For this purposes `mode` argument is very helpful. Run `mongo2elastic -h` for more info.
### **3. Stream data from MongoDB to Elasticsearch**
```bash
mongo2elastic --mongo_address <MONGO_ADDRESS> --mongo_db <MONGO_DATABASE_NAME> --mongo_collection <MONGO_COLLECTION_NAME> --elastic_address <ES_ADDRESS> --elastic_index <ES_INDEX_NAME> --batch_size <BATCH_SIZE> --connection_pool_size <CONNECTION_POOL_SIZE> --mode <MODE>
```
*Example call:*
```bash
mongo2elastic --mongo_address localhost:27017 --mongo_db store --mongo_collection products --elastic_address localhost:9200 --elastic_index products --batch_size 500 --connection_pool_size 5 --mode default
```
Based on the situation you may want to stream *only data*, *only updates* or *both*. For this purposes `mode` argument is very helpful. Run `mongo2elastic -h` for more info.
نیازمندی
| مقدار | نام |
|---|---|
| ==0.6.0 | aiofiles |
| ==3.7.4.post0 | aiohttp |
| ==2.5.6 | astroid |
| ==3.0.1 | async-timeout |
| ==20.3.0 | attrs |
| ==3.3.0 | bleach |
| ==0.4.0 | build |
| ==2020.12.5 | certifi |
| ==4.0.0 | chardet |
| ==0.4.4 | colorama |
| ==0.17.1 | docutils |
| ==1.0.1 | elastic-tools |
| ==7.12.1 | elasticsearch |
| ==3.1 | idna |
| ==4.0.1 | importlib-metadata |
| ==5.8.0 | isort |
| ==23.0.1 | keyring |
| ==1.6.0 | lazy-object-proxy |
| ==0.6.1 | mccabe |
| ==2.4.0 | motor |
| ==5.1.0 | multidict |
| ==0.4.3 | mypy-extensions |
| ==20.9 | packaging |
| ==0.10.0 | pep517 |
| ==1.7.0 | pkginfo |
| ==2.9.0 | Pygments |
| ==2.8.2 | pylint |
| ==3.11.4 | pymongo |
| ==2.4.7 | pyparsing |
| ==29.0 | readme-renderer |
| ==2.25.1 | requests |
| ==0.9.1 | requests-toolbelt |
| ==1.5.0 | rfc3986 |
| ==1.16.0 | six |
| ==0.10.2 | toml |
| ==4.60.0 | tqdm |
| ==3.4.1 | twine |
| ==1.4.3 | typed-ast |
| ==3.10.0.0 | typing-extensions |
| ==4.0.2 | ujson |
| ==1.26.4 | urllib3 |
| ==0.5.1 | webencodings |
| ==9.0.2 | websockets |
| ==1.12.1 | wrapt |
| ==1.6.3 | yarl |
| ==3.4.1 | zipp |
نحوه نصب
نصب پکیج whl elastic-tools-1.0.3:
pip install elastic-tools-1.0.3.whl
نصب پکیج tar.gz elastic-tools-1.0.3:
pip install elastic-tools-1.0.3.tar.gz