Skip to content

Commit 5191b94

Browse files
committed
Clean up documentation
1 parent 83f0824 commit 5191b94

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ $ pip install message-db-py
2626
Clone the Message DB repository to set up the database:
2727

2828
```shell
29-
git clone [email protected]:message-db/message-db.git
29+
$ git clone [email protected]:message-db/message-db.git
3030
```
3131

32-
More detailed instructions are in the [Installation]
33-
(https://github.com/message-db/message-db?tab=readme-ov-file#installation)
32+
More detailed instructions are in the [Installation](https://github.com/message-db/message-db?tab=readme-ov-file#installation)
3433
section of Message DB repo.
3534

3635
Running the database installation script creates the database, schema, table,
@@ -42,7 +41,7 @@ repo. Change directory to the message-db directory where you cloned the repo,
4241
and run the script:
4342

4443
```shell
45-
database/install.sh
44+
$ database/install.sh
4645
```
4746

4847
Make sure that your default Postgres user has administrative privileges.
@@ -56,21 +55,21 @@ If you prefer either a different database name, you can override the name
5655
using the `DATABASE_NAME` environment variable.
5756

5857
```shell
59-
DATABASE_NAME=some_other_database database/install.sh
58+
$ DATABASE_NAME=some_other_database database/install.sh
6059
```
6160

6261
### Uninstalling the Database
6362

6463
If you need to drop the database (for example, on a local dev machine):
6564

6665
``` bash
67-
database/uninstall.sh
66+
$ database/uninstall.sh
6867
```
6968

7069
If you're upgrading a previous version of the database:
7170

7271
``` bash
73-
database/update.sh
72+
$ database/update.sh
7473
```
7574

7675
## Docker Image
@@ -97,7 +96,7 @@ Here's a quick example of how to publish and read messages using Message-DB-py:
9796
from message_db import MessageDB
9897

9998
# Initialize the database connection
100-
store = MessageDB(CONN_URL)
99+
store = MessageDB(CONNECTION_URL)
101100

102101
# Write a message
103102
store.write("user_stream", "register", {"name": "John Doe"})
@@ -109,6 +108,10 @@ print(message)
109108

110109
## Primary APIs
111110

111+
- [Write Messages](#write)
112+
- [Read Messages](#read-messages-from-a-stream-or-category)
113+
- [Read Last Message from stream](#read-last-message-from-stream)
114+
112115
### Write messages
113116

114117
The `write` method is used to append a new message to a specified stream within
@@ -231,6 +234,10 @@ else:
231234

232235
## Utility APIs
233236

237+
- [Read Stream](#read-stream)
238+
- [Read Category](#read-category)
239+
- [Write Batch](#write-batch)
240+
234241
### Read Stream
235242

236243
The `read_stream` method retrieves a sequence of messages from a specified stream

0 commit comments

Comments
 (0)