https://github.com/zero88/py-es
Simple and dynamic indexing Elastic Search data
https://github.com/zero88/py-es
elasticsearch python3
Last synced: 11 months ago
JSON representation
Simple and dynamic indexing Elastic Search data
- Host: GitHub
- URL: https://github.com/zero88/py-es
- Owner: zero88
- License: apache-2.0
- Created: 2018-10-13T19:09:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-13T19:58:07.000Z (over 7 years ago)
- Last Synced: 2025-02-10T09:32:12.954Z (about 1 year ago)
- Topics: elasticsearch, python3
- Language: Python
- Size: 7.81 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python ElasticSearch tool
Simple tool to index elastic search data. By adding your own `converter` data dynamically then a tool will take care the remaining process.
## HOW TO RUN
```bash
λ python run.py -h
usage: run.py [-h] [-c CONFIG] [-e {local,prod,aws}] -d DATA [-i INDEX]
[-t TYPE] [-s SCRIPT] [-v]
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
Config file in json
-e {local,prod,aws}, --env {local,prod,aws}
Environment name
-d DATA, --data DATA Data json file
-i INDEX, --index INDEX
Elastic search index
-t TYPE, --type TYPE Elastic search type
-s SCRIPT, --script SCRIPT
Data Conversion python script file
-v, --verbose Verbose log
```
Before execute `run.py`:
- Adapt your config file as follow [config.json](./config.json)
- Customize your `converter` as follow [converter.py](./converter.py). Ensure this file has function [`transform(datum: dict) -> dict`](./converter.py#L17)
## TODO
- [ ] Multi thread and async request
- [ ] CLI
- [ ] Test coverage
- [ ] Python 2 compatible