ページ内ナビ
概要
elasticsearch-pyはElasticsearchの公式Python clientです。JSON変換、persistent connection、node discovery、load balancing、failure backoff、TLS/authentication、検索やindex操作のhelperを提供します。
特徴と向いている用途
公式資料に基づく紹介・実機未検証 · 内容確認日:
主な特徴
Elasticsearch APIをPythonから呼び出しdocumentとindexを操作する
clientからindex作成、documentのindex/get/update/delete、search等のElasticsearch APIを呼び出せます。Python data typeとJSONの変換をclient側で扱います。
出典:[2]
node discovery・connection reuse・load balancing・TLSをclient層で管理する
cluster nodeのautomatic discovery、persistent connection、load balancing、failed connectionのpenalty、TLS/HTTP authentication、thread-safe request処理を提供します。
出典:[2]
向いている用途
Python serviceからElasticsearch検索・分析を直接利用する場合に向く
全文検索、document検索、log/analytics queryなどをapplicationから実行し、official clientでcluster接続とAPI compatibilityを管理したいbackendに適します。
出典:[2]
導入前の確認
参考にした公式資料
- [1]elastic/elasticsearch-py — GitHub repository(2026-10-06)
- [2]elasticsearch-py 9.5.1 — README(2026-10-06)
- [3]elasticsearch-py 9.5.1 — pyproject.toml(2026-10-06)
- [4]elasticsearch-py 9.5.1 release(2026-10-06)
- [5]elasticsearch-py Apache-2.0 license(2026-10-06)
編集部からの補足
Elasticsearch専用clientなので、generic HTTP clientよりcluster topologyやversion compatibilityをclient側で扱いやすいのが利点です。server/clientのmajor更新順序を守り、timeout・retry・TLS設定をproduction条件で固定してください。
3ステップで試す
- 1
elasticsearch-py 9.5.1を導入する
確認対象の公式Python clientをversion固定で導入します。Python 3.10以上が必要です。
python -m pip install "elasticsearch==9.5.1" - 2
検証用Elasticsearch endpointを指定する
localhostまたは変更してよい検証環境のURLへ置き換えます。認証が必要な環境ではcredentialをrepositoryへ保存しないでください。
export ELASTICSEARCH_URL='http://127.0.0.1:9200' - 3
cluster情報をread-onlyで取得する
info APIだけを呼び、documentやindexを変更せず接続とserver versionを確認します。
python - <<'PY' import os from elasticsearch import Elasticsearch client = Elasticsearch(os.environ['ELASTICSEARCH_URL']) info = client.info() print(info['version']['number']) client.close() PY
成長
成長の推移 · 直近30日
4,390 Stars
推移データを蓄積中です。
Built with
カテゴリとタグ
GitHubデータ
GitHubのデータGitHubの詳細データを見る
GitHub Topics
- client
- elasticsearch
- python
- search
- Stars
- 4,390
- Forks
- 1,222
- Watchers
- 390
- Open Issues
- 62
- Contributors
- 204
- 所有者種別
- Organization
- 主要言語
- Python
- ライセンス
- Apache-2.0
- リポジトリ最終更新
- 2026/10/05
関連情報
関連記事を投稿するこのOSSの使い方や活用事例をMarkdownで投稿できます。管理者が承認した後に公開されます。
あわせて探訪
- OpenSearch13,816 Stars
共通タグ 3件 · 共通カテゴリ 1件
分散indexで全文検索・analytics・observability・vector searchを支える
Java - redis-py13,648 Stars
共通タグ 2件 · 共通カテゴリ 1件 · 同じ言語
同期・非同期・Cluster対応を一つのAPIで扱うPython向けRedisクライアント
Python - SQLAlchemy12,201 Stars
共通タグ 2件 · 共通カテゴリ 1件 · 同じ言語
SQL式とORMを同じ基盤で扱い、PythonからリレーショナルDBを操作するデータアクセス基盤
Python - asyncpg8,098 Stars
共通タグ 2件 · 共通カテゴリ 1件 · 同じ言語
asyncioからPostgreSQLのbinary protocolを直接扱う高性能Pythonドライバ
Python - Baserow6,088 Stars
共通タグ 2件 · 共通カテゴリ 1件 · 同じ言語
表形式の業務データを、アプリ・自動化・集計画面へつなぐノーコード基盤
Python - Alembic4,431 Stars
共通タグ 2件 · 共通カテゴリ 1件 · 同じ言語
SQLAlchemyのモデル差分をDBスキーマ変更として履歴管理するマイグレーションツール
Python
情報の誤りを報告
掲載内容に誤りや古い情報があればお知らせください。