Skip to content

Instantly share code, notes, and snippets.

@lbatteau
Created January 18, 2021 20:27
Show Gist options
  • Save lbatteau/67c489ff1a249c7ba25b60bf0cf1e881 to your computer and use it in GitHub Desktop.
Save lbatteau/67c489ff1a249c7ba25b60bf0cf1e881 to your computer and use it in GitHub Desktop.
@app.get("/sse/publish")
async def get(channel: str = "default", redis: Redis = Depends(depends_redis)):
await redis.publish(channel=channel, message="Hello world!")
return ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment