File tree 1 file changed +43
-5
lines changed
1 file changed +43
-5
lines changed Original file line number Diff line number Diff line change 1
1
*************
2
- message-db -py
2
+ Message-DB -py
3
3
*************
4
4
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.
6
7
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
8
9
:target: https://github.com/subhashb/message-db-py/actions
9
10
: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
11
12
: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)
You can’t perform that action at this time.
0 commit comments