A simple library for creating message queue based on Redis and its channels
Project description
REMEQ
It is a simple library for creating a message queue based on Redis and its channels
How can I use it?
First of all import MessageQueue object into your code.
from remeq import MessageQueue
and create a new queue
redis_message_queue = MessageQueue(
queue_name='YOUR_CHANNEL_NAME',
queue_method='FIFO',
host='REDIS_HOST',
port=6379,
decode_responses=True
)
where
- queue_name - is the name of your channel where you want to store messages
- queue_method - is how the message will be added to the channel and how its message will be taken from the channel, FIFO or LIFO
- host, port, decode_response - are standard settings of Redis object
So, to send a message into the channel use send_massage method
redis_message_queue.send_message("YOUR_MESSAGE_TEXT")
And if you want to get the message from the channel, use get_message method
redis_message_queue.get_message()
That's all. Good luck :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
remeq-1.0.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
remeq-1.0.0-py3-none-any.whl
(3.2 kB
view hashes)