Skip to content

Commit

Permalink
prepare 1.0.3 with examples in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad88me committed Mar 15, 2022
1 parent 837914e commit 9e7a275
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@


# stiqueue
Stands for stick queue which is a simple messaging queue
Stands for stick queue which is a simple messaging queue. It is developed with simplicity and flexibility in mind.


## Usage

Expand All @@ -16,6 +17,38 @@ The followings are a set of methods supported by stiqueue
* **deq**: to get a value from the queue (dequeue).
* **cnt**: number of items in the queue.

### Examples

#### Client example

```
from stiqueue.sqclient import SQClient
c = SQClient()
c.enq(b"This is message one")
c.enq(b"This is message two")
c.enq(b"This is message three")
msg = c.deq()
print("msg1: ")
print(msg)
msg = c.deq()
print("msg2: ")
print(msg)
msg = c.deq()
print("msg3: ")
print(msg)
```

#### Server example
```
from stiqueue.sqserver import SQServer
server = SQServer()
server.listen()
```

### Extend
We provide two samples extending stiqueue with more functionality. [examples](https://github.com/ahmad88me/stiqueue/tree/main/example)

### Server
You can run the server `sqserver.py` as is.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name="stiqueue",
version="1.0.2",
version="1.0.3",
description="Simple Messaging queue that is easily extendable",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 9e7a275

Please sign in to comment.