Skip to content

Commit a0ba141

Browse files
authored
Create README.md (#32)
* Create README.md * Update setup.py * Delete README.rst
1 parent cf8b288 commit a0ba141

File tree

2 files changed

+33
-60
lines changed

2 files changed

+33
-60
lines changed

README.rst renamed to README.md

Lines changed: 32 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,31 @@
1-
RedisJSON Python Client
2-
====================
1+
[![license](https://img.shields.io/github/license/RedisJSON/RedisJSON-py.svg)](https://github.com/RedisJSON/redisjson-py/blob/master/LICENSE)
2+
[![CircleCI](https://circleci.com/gh/RedisJSON/redisjson-py/tree/master.svg?style=svg)](https://circleci.com/gh/RedisJSON/redisjson-py/tree/master)
3+
[![pypi](https://badge.fury.io/py/rejson.svg)](https://badge.fury.io/py/rejson)
4+
[![PyVersions](https://img.shields.io/pypi/pyversions/rejson.svg)](https://github.com/RedisJSON/redisjson-py)
5+
[![GitHub issues](https://img.shields.io/github/release/RedisJSON/redisjson-py.svg)](https://github.com/RedisJSON/redisjson-py/releases/latest)
6+
[![Codecov](https://coveralls.io/repos/github/RedisLabs/rejson-py/badge.svg?branch=master)](https://coveralls.io/github/RedisLabs/rejson-py?branch=master)
37

4-
.. image:: https://img.shields.io/github/license/RedisJSON/RedisJSON-py.svg
5-
:target: https://github.com/RedisJSON/redisjson-py/blob/master/LICENSE
6-
7-
.. image:: https://circleci.com/gh/RedisJSON/redisjson-py/tree/master.svg?style=svg
8-
:target: https://circleci.com/gh/RedisJSON/redisjson-py/tree/master
9-
10-
.. image:: https://badge.fury.io/py/rejson.svg
11-
:target: https://badge.fury.io/py/rejson
12-
13-
.. image:: https://img.shields.io/pypi/pyversions/rejson.svg
14-
:target: https://github.com/RedisJSON/redisjson-py
15-
16-
.. image:: https://img.shields.io/github/release/RedisJSON/redisjson-py.svg
17-
:target: https://github.com/RedisJSON/redisjson-py/releases/latest
8+
# RedisJSON Python Client
189

19-
.. image:: https://coveralls.io/repos/github/RedisLabs/rejson-py/badge.svg?branch=master
20-
:target: https://coveralls.io/github/RedisLabs/rejson-py?branch=master
10+
[![Mailing List](https://img.shields.io/badge/Mailing%20List-RedisJSON-blue)](https://groups.google.com/forum/#!forum/redisjson)
11+
[![Gitter](https://badges.gitter.im/RedisLabs/RedisJSON.svg)](https://gitter.im/RedisLabs/RedisJSON?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
2112

2213
rejson-py is a package that allows storing, updating and querying objects as
23-
JSON documents in a `Redis`_ database that is extended with the
24-
`ReJSON module`_. The package extends
25-
`redis-py`_'s interface with ReJSON's
14+
JSON documents in a [Redis](https://redis.io) database that is extended with the
15+
[ReJSON module](https://github.com/redislabsmodules/rejson). The package extends
16+
[redis-py](https://github.com/andymccurdy/redis-py)'s interface with ReJSON's
2617
API, and performs on-the-fly serialization/deserialization of objects to/from
2718
JSON.
2819

29-
.. _`Redis`: https://redis.io
30-
.. _`ReJSON module`: https://github.com/redislabsmodules/rejson
31-
.. _`redis-py`: https://github.com/andymccurdy/redis-py
32-
33-
Installation
34-
------------
35-
36-
.. code-block:: bash
37-
38-
$ pip install rejson
20+
## Installation
3921

40-
Usage example
41-
-------------
22+
```bash
23+
$ pip install rejson
24+
```
4225

43-
.. code-block:: python
26+
## Usage example
4427

28+
```python
4529
from rejson import Client, Path
4630

4731
rj = Client(host='localhost', port=6379, decode_responses=True)
@@ -81,23 +65,19 @@ Usage example
8165
}
8266
rj.jsonset('non-ascii', Path.rootPath(), obj_non_ascii)
8367
print '{} is a non-ascii string'.format(rj.jsonget('non-ascii', Path('.non_ascii_string'), no_escape=True))
68+
```
8469

85-
Encoding/Decoding
86-
-----------------
70+
## Encoding/Decoding
8771

88-
rejson-py uses Python's json_.
72+
rejson-py uses Python's (json)[https://docs.python.org/2/library/json.html].
8973
The client can be set to use custom encoders/decoders at creation, or by calling
90-
explicitly the setEncoder_ () and
91-
setDecoder_ () methods, respectively.
92-
93-
.. _json: https://docs.python.org/2/library/json.html
94-
.. _setDecoder: ./API.md#setdecoder
95-
.. _setEncoder: ./API.md#setencoder
74+
explicitly the [setEncoder()](./API.md#setencoder) and
75+
[setDecoder()](./API.md#setencoder) methods, respectively.
9676

9777
The following shows how to use this for a custom class that's stored as
9878
a JSON string for example:
9979

100-
.. code-block:: python
80+
```python
10181

10282
from json import JSONEncoder, JSONDecoder
10383
from rejson import Client
@@ -149,28 +129,21 @@ a JSON string for example:
149129

150130
# Retrieve it
151131
obj = rj.jsonget('custom', Path.rootPath())
132+
```
152133

153-
154-
API
155-
---
134+
## API
156135

157136
As rejson-py exposes the same methods as redis-py, it can be used as a drop-in
158137
replacement. On top of Redis' core commands, the client also adds ReJSON's
159138
vocabulary and a couple of helper methods. These are documented in the
160139
[API.md](API.md) file, which can be generated by running:
161140

162-
.. code-block:: bash
163-
164-
$ python gendoc rejson > API.md
165-
166-
167-
For complete documentation about ReJSON's commands, refer to `ReJSON's website`_.
168-
169-
.. _`ReJSON's website`: http://rejson.io
141+
```bash
142+
$ python gendoc rejson > API.md
143+
```
170144

171-
License
172-
-------
145+
For complete documentation about ReJSON's commands, refer to [ReJSON's website](http://rejson.io).
173146

174-
`BSD 2-Clause`_
147+
## License
175148

176-
.. _`BSD 2-Clause`: https://github.com/RedisLabs/rejson-py/blob/master/LICENSE
149+
[BSD 2-Clause](https://github.com/RedisLabs/rejson-py/blob/master/LICENSE)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def read_all(f):
3434
setup(name='rejson',
3535
version=version,
3636
description='ReJSON Python Client',
37-
long_description=read_all("README.rst"),
37+
long_description=read_all("README.md"),
3838
long_description_content_type='text/markdown',
3939
classifiers=[
4040
'Programming Language :: Python',

0 commit comments

Comments
 (0)