taoufik07 / nejma Goto Github PK
View Code? Open in Web Editor NEWManage and send messages to groups of channels
License: BSD 3-Clause "New" or "Revised" License
Manage and send messages to groups of channels
License: BSD 3-Clause "New" or "Revised" License
Thanks for the package, It will be great to see Redis as a backing store
Attached some useful links
encode/starlette#133
https://github.com/bergran/websockets_starlette_example
Hey,
Channels allows code decoupling by dispatching messages to handlers chat.join
triggers chat_join
.
I've made something similar while playing with asyncio and decided to try to implement it in nejma
(checkout this branch).
Usage (a gist with the whole app)
@app.websocket_route("/ws")
class Chat(WebSocketEndpoint):
encoding = "json"
async def on_receive(self, websocket, data):
...
group = f"group_{room_id}"
self.channel_layer.add(group, self.channel)
await self.channel_layer.group_send(group, {
"type": "hello.world",
"message": "Hello world !",
})
async def hello_world(self, payload):
await self.send(payload)
I wanna know what you guys and if it should be in master ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.