Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
subhashb committed Apr 23, 2024
1 parent a6038b5 commit ef14b80
Showing 1 changed file with 43 additions and 5 deletions.
48 changes: 43 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,50 @@
*************
message-db-py
Message-DB-py
*************

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

.. image:: https://github.com/subhashb/message-db-py/actions/workflows/ci.yml/badge.svg?branch=master
.. image:: https://github.com/subhashb/message-db-py/actions/workflows/ci.yml/badge.svg?branch=main
:target: https://github.com/subhashb/message-db-py/actions
:alt: Build Status
.. image:: https://codecov.io/gh/subhashb/message-db-py/branch/master/graph/badge.svg
.. image:: https://codecov.io/gh/subhashb/message-db-py/graph/badge.svg?token=QMNUSLN2OM
:target: https://codecov.io/gh/subhashb/message-db-py
:alt: Coverage
:alt: Code Coverage
.. image:: https://img.shields.io/pypi/pyversions/message-db-py.svg
:target: https://pypi.org/project/message-db-py/
:alt: Python Version
.. image:: https://badge.fury.io/py/message-db-py.svg
:target: https://pypi.org/project/message-db-py/
:alt: PyPI version
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg
:target: https://opensource.org/licenses/MIT
:alt: License

Installation
============

Use pip to install:

.. code-block:: shell
pip install message-db-py
Usage
=====

Here's a quick example of how to publish and read messages using Message-DB-py:

.. code-block:: python
from message_db.client import MessageDB
# Initialize the database connection
mdb = MessageDB("your_connection_string")
# Write a message
mdb.write("your_stream_name", "your_message_type", {"data": "value"})
# Read a message
message = mdb.read_last_message("your_stream_name")
print(message)

0 comments on commit ef14b80

Please sign in to comment.