Skip to content

Commit 48b3482

Browse files
Convert README to markdown for static HTML embedding (elastic#2599)
* Convert README to markdown for static HTML embedding * Fix README name in setup.py * Fix Elasticsearch-PHP mention Co-authored-by: Miguel Grinberg <[email protected]> --------- Co-authored-by: Miguel Grinberg <[email protected]>
1 parent d4b16e1 commit 48b3482

File tree

5 files changed

+130
-141
lines changed

5 files changed

+130
-141
lines changed

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include CONTRIBUTING.md
22
include LICENSE
33
include MANIFEST.in
4-
include README.rst
4+
include README.md
55
include NOTICE
66
include CHANGELOG.md
77
include setup.py

README.md

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<p align="center">
2+
<img src="https://github.com/elastic/elasticsearch-py/raw/main/docs/logo-elastic-glyph-color.svg" width="20%" alt="Elastic logo" />
3+
</p>
4+
5+
# Elasticsearch Python Client
6+
7+
<p align="center">
8+
<a href="https://pypi.org/project/elasticsearch"><img alt="PyPI Version" src="https://img.shields.io/pypi/v/elasticsearch" /></a>
9+
<a href="https://pypi.org/project/elasticsearch"><img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/elasticsearch" /></a>
10+
<a href="https://anaconda.org/conda-forge/elasticsearch"><img alt="Conda Version" src="https://img.shields.io/conda/vn/conda-forge/elasticsearch" /></a>
11+
<a href="https://pepy.tech/project/elasticsearch?versions=*"><img alt="Downloads" src="https://static.pepy.tech/badge/elasticsearch" /></a>
12+
<br/>
13+
<a href="https://github.com/elastic/elasticsearch-py/actions/workflows/ci.yml?query=workflow%3ACI"><img alt="Build Status on GitHub" src="https://github.com/elastic/elasticsearch-py/workflows/CI/badge.svg" /></a>
14+
<a href="https://buildkite.com/elastic/elasticsearch-py-integration-tests"><img alt="Buildkite Status on Buildkite" src="https://badge.buildkite.com/68e22afcb2ea8f6dcc20834e3a5b5ab4431beee33d3bd751f3.svg" /></a>
15+
<a href="https://elasticsearch-py.readthedocs.io"><img alt="Documentation Status" src="https://readthedocs.org/projects/elasticsearch-py/badge/?version=latest" /></a><br>
16+
</p>
17+
18+
*The official Python client for Elasticsearch.*
19+
20+
21+
## Features
22+
23+
* Translating basic Python data types to and from JSON
24+
* Configurable automatic discovery of cluster nodes
25+
* Persistent connections
26+
* Load balancing (with pluggable selection strategy) across available nodes
27+
* Failed connection penalization (time based - failed connections won't be
28+
retried until a timeout is reached)
29+
* Support for TLS and HTTP authentication
30+
* Thread safety across requests
31+
* Pluggable architecture
32+
* Helper functions for idiomatically using APIs together
33+
34+
35+
## Installation
36+
37+
[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)
38+
or
39+
[sign-up](https://cloud.elastic.co/registration?elektra=en-ess-sign-up-page)
40+
for a free trial of Elastic Cloud.
41+
42+
Refer to the [Installation section](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_installation)
43+
of the getting started documentation.
44+
45+
46+
## Connecting
47+
48+
Refer to the [Connecting section](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_connecting)
49+
of the getting started documentation.
50+
51+
52+
## Usage
53+
-----
54+
55+
* [Creating an index](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_creating_an_index)
56+
* [Indexing a document](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_indexing_documents)
57+
* [Getting documents](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_getting_documents)
58+
* [Searching documents](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_searching_documents)
59+
* [Updating documents](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_updating_documents)
60+
* [Deleting documents](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_deleting_documents)
61+
* [Deleting an index](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/getting-started-python.html#_deleting_an_index)
62+
63+
64+
## Compatibility
65+
66+
Language clients are forward compatible; meaning that the clients support
67+
communicating with greater or equal minor versions of Elasticsearch without
68+
breaking. It does not mean that the clients automatically support new features
69+
of newer Elasticsearch versions; it is only possible after a release of a new
70+
client version. For example, a 8.12 client version won't automatically support
71+
the new features of the 8.13 version of Elasticsearch, the 8.13 client version
72+
is required for that. Elasticsearch language clients are only backwards
73+
compatible with default distributions and without guarantees made.
74+
75+
| Elasticsearch Version | Elasticsearch-Python Branch | Supported |
76+
| --------------------- | ------------------------ | --------- |
77+
| main | main | |
78+
| 8.x | 8.x | 8.x |
79+
| 7.x | 7.x | 7.17 |
80+
81+
82+
If you have a need to have multiple versions installed at the same time older
83+
versions are also released as ``elasticsearch7`` and ``elasticsearch8``.
84+
85+
86+
## Documentation
87+
88+
Documentation for the client is [available on elastic.co] and [Read the Docs].
89+
90+
[available on elastic.co]: https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/index.html
91+
[Read the Docs]: https://elasticsearch-py.readthedocs.io
92+
93+
94+
## Feedback 🗣️
95+
96+
The engineering team here at Elastic is looking for developers to participate in
97+
research and feedback sessions to learn more about how you use our Python client and
98+
what improvements we can make to their design and your workflow. If you're interested in
99+
sharing your insights into developer experience and language client design, please fill
100+
out this [short form]. Depending on the number of responses we get, we may either
101+
contact you for a 1:1 conversation or a focus group with other developers who use the
102+
same client. Thank you in advance - your feedback is crucial to improving the user
103+
experience for all Elasticsearch developers!
104+
105+
[short form]: https://forms.gle/bYZwDQXijfhfwshn9
106+
107+
## License
108+
109+
This software is licensed under the [Apache License 2.0](./LICENSE). See [NOTICE](./NOTICE).

README.rst

-124
This file was deleted.

docs/logo-elastic-glyph-color.svg

+16
Loading

setup.py

+4-16
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,8 @@
2929
r"__versionstr__\s+=\s+[\"\']([^\"\']+)[\"\']", f.read()
3030
).group(1)
3131

32-
with open(join(base_dir, "README.rst")) as f:
33-
# Remove reST raw directive from README as they're not allowed on PyPI
34-
# Those blocks start with a newline and continue until the next newline
35-
mode = None
36-
lines = []
37-
for line in f:
38-
if line.startswith(".. raw::"):
39-
mode = "ignore_nl"
40-
elif line == "\n":
41-
mode = "wait_nl" if mode == "ignore_nl" else None
42-
if mode is None:
43-
lines.append(line)
44-
45-
long_description = "".join(lines)
32+
with open(join(base_dir, "README.md")) as f:
33+
readme = f.read()
4634

4735

4836
packages = [
@@ -56,8 +44,8 @@
5644
description="Python client for Elasticsearch",
5745
license="Apache-2.0",
5846
url="https://github.com/elastic/elasticsearch-py",
59-
long_description=long_description,
60-
long_description_content_type="text/x-rst",
47+
long_description=readme,
48+
long_description_content_type="text/markdown",
6149
version=package_version,
6250
author="Elastic Client Library Maintainers",
6351
author_email="[email protected]",

0 commit comments

Comments
 (0)