Skip to content

Instantly share code, notes, and snippets.

View Wh1t3Fox's full-sized avatar
⌨️
hackity hack hack

Craig West Wh1t3Fox

⌨️
hackity hack hack
View GitHub Profile
# consumer.py
# https://yeti.co/blog/establishing-a-websocket-pubsub-server-with-redis-and-asyncio-for-the-light-sensor/
import asyncio
from aioredis import create_connection, Channel
import websockets
async def publish_to_redis(msg, path):
# Connect to Redis
conn = await create_connection(('localhost', 6379))
# producer.py
# https://yeti.co/blog/establishing-a-websocket-pubsub-server-with-redis-and-asyncio-for-the-light-sensor/
import asyncio
from aioredis import create_connection, Channel
import websockets
async def subscribe_to_redis(path):
conn = await create_connection(('localhost', 6379))

Keybase proof

I hereby claim:

  • I am Wh1t3Fox on github.
  • I am wh1t3f0x (https://keybase.io/wh1t3f0x) on keybase.
  • I have a public key whose fingerprint is 5913 57D9 ECAB C38A 9CEC F07B CDC6 7126 7A8C E755

To claim this, I am signing this object: