class Adam: work = HyperFi("CTO & Co-founder") oss = Sanic("Core Maintainer") home = Israel("Negev") async def run(self, *inputs: Pretzels | Coffee) -> None: while True: await self.work.do(inputs) await self.oss.do(inputs) def sleep(self): raise NotImplementedError
ahopkins - Overview
Pinned Loading
-
1
# Sanic Websockets Feeds v33
This is an example of how to build a _distributed_ websocket feed. It allows for horizontal scaling using Redis as a pubsub broker to broadcast messages between application instances.
5
This is the third version of websocket feeds. It is built with Sanic v21.9+ in mind. Older versions:
-
1
# Sanic as Svelte development server3
The purpose of this gist is to show how Sanic can be used as a development server for a frontend JS framework. In this example we are running a Svelte app with `rollup`, but the same idea could be applied to any other frameworks JS build tools.