Skip to content

Commit ef14b80

Browse files
committed
Update README
1 parent a6038b5 commit ef14b80

File tree

1 file changed

+43
-5
lines changed

1 file changed

+43
-5
lines changed

README.rst

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,50 @@
11
*************
2-
message-db-py
2+
Message-DB-py
33
*************
44

5-
The Python interface to the MessageDB Event Store and Message Store.
5+
Message-DB-py is a Python interface to the MessageDB event store and message store, designed for easy integration into
6+
Python applications.
67

7-
.. image:: https://github.com/subhashb/message-db-py/actions/workflows/ci.yml/badge.svg?branch=master
8+
.. image:: https://github.com/subhashb/message-db-py/actions/workflows/ci.yml/badge.svg?branch=main
89
:target: https://github.com/subhashb/message-db-py/actions
910
:alt: Build Status
10-
.. image:: https://codecov.io/gh/subhashb/message-db-py/branch/master/graph/badge.svg
11+
.. image:: https://codecov.io/gh/subhashb/message-db-py/graph/badge.svg?token=QMNUSLN2OM
1112
:target: https://codecov.io/gh/subhashb/message-db-py
12-
:alt: Coverage
13+
:alt: Code Coverage
14+
.. image:: https://img.shields.io/pypi/pyversions/message-db-py.svg
15+
:target: https://pypi.org/project/message-db-py/
16+
:alt: Python Version
17+
.. image:: https://badge.fury.io/py/message-db-py.svg
18+
:target: https://pypi.org/project/message-db-py/
19+
:alt: PyPI version
20+
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg
21+
:target: https://opensource.org/licenses/MIT
22+
:alt: License
23+
24+
Installation
25+
============
26+
27+
Use pip to install:
28+
29+
.. code-block:: shell
30+
31+
pip install message-db-py
32+
33+
Usage
34+
=====
35+
36+
Here's a quick example of how to publish and read messages using Message-DB-py:
37+
38+
.. code-block:: python
39+
40+
from message_db.client import MessageDB
41+
42+
# Initialize the database connection
43+
mdb = MessageDB("your_connection_string")
44+
45+
# Write a message
46+
mdb.write("your_stream_name", "your_message_type", {"data": "value"})
47+
48+
# Read a message
49+
message = mdb.read_last_message("your_stream_name")
50+
print(message)

0 commit comments

Comments
 (0)