https://github.com/pyapp-org/pyapp.elasticsearch
🔎 Elasticsearch pyApp extension
https://github.com/pyapp-org/pyapp.elasticsearch
elasticsearch pyapp python
Last synced: 2 months ago
JSON representation
🔎 Elasticsearch pyApp extension
- Host: GitHub
- URL: https://github.com/pyapp-org/pyapp.elasticsearch
- Owner: pyapp-org
- License: other
- Created: 2020-08-10T03:38:56.000Z (almost 6 years ago)
- Default Branch: development
- Last Pushed: 2023-02-20T09:57:26.000Z (over 3 years ago)
- Last Synced: 2025-01-16T13:26:52.711Z (over 1 year ago)
- Topics: elasticsearch, pyapp, python
- Language: Python
- Homepage:
- Size: 91.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
######################
pyApp - Elastic Search
######################
*Let us handle the boring stuff!*
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: http://github.com/ambv/black
:alt: Once you go Black...
.. image:: https://github.com/pyapp-org/pyapp.elasticsearch/workflows/Testcases/badge.svg
:alt: Tests
.. image:: https://api.codeclimate.com/v1/badges/82a3ab9806df3765daf0/maintainability
:target: https://codeclimate.com/github/pyapp-org/pyapp.elasticsearch/maintainability
:alt: Maintainability
.. image:: https://api.codeclimate.com/v1/badges/82a3ab9806df3765daf0/test_coverage
:target: https://codeclimate.com/github/pyapp-org/pyapp.elasticsearch/test_coverage
:alt: Test Coverage
This extension provides a Elasticsearch client object configured via pyApp settings.
Installation
============
Install with *pip*::
pip install pyApp-elasticsearch-py
**For AsyncIO support either**::
pip install pyApp-elasticsearch-py[async]
# - OR -
pip install pyApp-elasticsearch-py aiohttp
Add the `ELASTICSEARCH` block into your runtime settings file::
ELASTICSEARCH = {
"default": {
"host": "localhost",
}
}
.. note::
In addition to the *host* any argument that can be provided to
``elasticsearch.Elasticsearch`` or ``elasticsearch.AsyncElasticsearch`` can
be provided.
Usage
=====
The following example creates an Elasticsearch client instance::
from pyapp_ext.elasticsearch import get_client
es = get_client()
Or an async Elasticsearch client instance::
from pyapp_ext.elasticsearch import get_async_client
es = get_async_client()
API
===