A little tool for quickly fetching ES index sizes using the Elasticsearch API.
.
├── notebooks # Directory for Jupyter notebooks
│ └── test.ipynb # Example Jupyter notebook for testing or development
├── src # Source code directory
│ └── get_es_index_sizes # Main package for the project
│ ├── __pycache__ # Directory for compiled Python files (automatically created)
│ ├── config # Directory for configuration files and settings
│ ├── libs # Directory for additional library files or modules
│ ├── __init__.py # Init file to make this directory a Python package
│ └── main.py # Main script file containing core functionality
├── tests # Directory for test files
│ ├── __pycache__ # Directory for compiled Python files for tests (automatically created)
│ ├── __init__.py # Init file to make this directory a Python package
│ └── test_my_app.py # Test script for testing the application's functionality
├── Dockerfile # Dockerfile for creating a Docker image of the application
├── Makefile # Makefile for automating tasks and commands
├── README.md # Readme file containing project description and instructions
├── conftest.py # Configuration file for pytest (optional, used for fixtures and settings)
├── docker-compose.yml # Docker Compose file for setting up multi-container Docker applications
├── poetry.lock # Poetry lock file for dependencies (generated by Poetry)
└── pyproject.toml # Configuration file for Poetry, specifying project dependencies and settings
-
Create a new virtualenv and install via Poetry
poetry install
-
Run pytest to make sure everything is still working
poetry run pytest
If the tests run without error then you have configured your project and you're ready to run.
-
Enable git pre-commit hooks
poetry run pre-commit install
If you are planning on further development these may be useful.
-
Run the app
poetry run get-es-index-sizes
You can also run the app using Docker.
First, build the docker container using the provided Makefile commands:
# Build the Docker container
make docker-build
Once the container is built, you can run it with:
# Run the Docker container
make docker-run