Skip to content

Commit

Permalink
Add import line to make example easier to run
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Feb 14, 2025
1 parent c67a86f commit f990322
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def add_client_usage_example(app, what, name, obj, options, lines):
" :class:`~elasticsearch.Elasticsearch` client. For example::"
)
lines.append("")
lines.append(" from elasticsearch import Elasticsearch")
lines.append("")
lines.append(" # Create the client instance")
lines.append(" client = Elasticsearch(...)")
lines.append(f" # Use the {sub_client_name} client")
Expand Down

0 comments on commit f990322

Please sign in to comment.