LDPy/README.md

1.8 KiB
Raw Permalink Blame History

LDPy

This project moved to: git.afpy.org

🚧 work in progress, take a look on other branches if you are curious…


An OVH Log Data Platform python client.

Log Data Platform is a log management platform based on opensearch.

💡 Idea

  1. Access LDP stream
  2. Query the logs
  3. Trigger actions

🚀 Use quick-start

Get the source & edit settings:

git clone git@git.afpy.org:fcode/LDPy.git && cd ldpy
cp client.sample.py client.py
${EDITOR} client.py

Set up environment & run help:

mkdir ~/.venvs && python3 -m venv ~/.venvs/ldpy
source ~/.venvs/ldpy/bin/activate
pip install -r requirements.txt
./ldpy.py -h
  • Get stream mapping: ./ldpy.py --mapping
  • Get last n entries: ./ldpy.py --last

🚧 Devel quick-start

  • Built with Python 3.8
  • Code linting with flake8, pylint, black & pydocstyle.
  • Install development tools:
    • pip install -r requirements-dev.txt
  • A Makefile with tools: run make help to have a look
  • Use the pre-commit git hook
    • echo "make --no-print-directory --quiet lint" > .git/hooks/pre-commit
    • chmod u+x .git/hooks/pre-commit

📌 Dependences

Details in requirements.txt & requirements-dev.txt

Talk about this project