Skip to content

Instantly share code, notes, and snippets.

View goabonga's full-sized avatar

Chris goabonga

View GitHub Profile
@goabonga
goabonga / main.py
Created January 24, 2024 17:05
Asynchronous Redis Pub/Sub Demonstration
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This script demonstrates the use of the aredis library for asynchronous Redis operations in Python.
It includes functions for subscribing to and publishing messages on a Redis channel.
The script performs the following actions:
- Subscribes to a Redis channel named 'foo'.
- Publishes two messages to the 'foo' channel.
- Waits for and prints any messages received on the 'foo' channel.
### Keybase proof
I hereby claim:
* I am goabonga on github.
* I am goabonga (https://keybase.io/goabonga) on keybase.
* I have a public key ASCz2VQobogWTzVvNAe5NCQWdzmtAIagWt925K5utuvLyQo
To claim this, I am signing this object: