All Projects → cthwaite → fastapi-websocket-broadcast

cthwaite / fastapi-websocket-broadcast

Licence: other
Websocket 'broadcast' demo using FastAPI/Starlette

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to fastapi-websocket-broadcast

arel
Lightweight browser hot reload for Python ASGI web apps
Stars: ✭ 69 (-34.91%)
Mutual labels:  starlette, fastapi
starlette-opentracing
Opentracing support for Starlette and FastApi
Stars: ✭ 62 (-41.51%)
Mutual labels:  starlette, fastapi
fastapi-zeit-now
A simple example of deploying FastAPI as a Zeit Serverless Function
Stars: ✭ 24 (-77.36%)
Mutual labels:  starlette, fastapi
fastapi-users
Ready-to-use and customizable users management for FastAPI
Stars: ✭ 1,920 (+1711.32%)
Mutual labels:  starlette, fastapi
starlette-graphene3
An ASGI app for using Graphene v3 with Starlette / FastAPI
Stars: ✭ 52 (-50.94%)
Mutual labels:  starlette, fastapi
inboard
🚢 Docker images and utilities to power your Python APIs and help you ship faster. With support for Uvicorn, Gunicorn, Starlette, and FastAPI.
Stars: ✭ 106 (+0%)
Mutual labels:  starlette, fastapi
serverless-mangum-examples
Example ASGI applications and Serverless Framework configurations using Mangum
Stars: ✭ 26 (-75.47%)
Mutual labels:  starlette, fastapi
morelia server
Server for MoreliaTalk network
Stars: ✭ 25 (-76.42%)
Mutual labels:  starlette, fastapi
starlette-discord
"Login with Discord" support for Starlette and FastAPI
Stars: ✭ 15 (-85.85%)
Mutual labels:  starlette, fastapi
fastapi-tdd-docker
Test-Driven Development with FastAPI and Docker
Stars: ✭ 89 (-16.04%)
Mutual labels:  starlette, fastapi
msgpack-asgi
Drop-in MessagePack support for ASGI applications and frameworks
Stars: ✭ 100 (-5.66%)
Mutual labels:  starlette, fastapi
Awesome Fastapi
A curated list of awesome things related to FastAPI
Stars: ✭ 3,033 (+2761.32%)
Mutual labels:  starlette, fastapi
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+37247.17%)
Mutual labels:  starlette, fastapi
starlette-context
Middleware for Starlette that allows you to store and access the context data of a request. Can be used with logging so logs automatically use request headers such as x-request-id or x-correlation-id.
Stars: ✭ 320 (+201.89%)
Mutual labels:  starlette, fastapi
Python-Studies
All studies about python
Stars: ✭ 56 (-47.17%)
Mutual labels:  fastapi
fastapi-mangum-example
Deploy FastAPI as Lambda using serverless and mangum
Stars: ✭ 21 (-80.19%)
Mutual labels:  fastapi
openapi-python-client
Generate modern Python clients from OpenAPI
Stars: ✭ 543 (+412.26%)
Mutual labels:  fastapi
Voice4Rural
A complete one stop solution for all the problems of Rural area people. 👩🏻‍🌾
Stars: ✭ 12 (-88.68%)
Mutual labels:  fastapi
compose
Easy and fast anonymous chat!
Stars: ✭ 34 (-67.92%)
Mutual labels:  fastapi
TikTokDownloader PyWebIO
🚀「Douyin_TikTok_Download_API」是一个开箱即用的高性能异步抖音|TikTok数据爬取工具,支持API调用,在线批量解析及下载。
Stars: ✭ 919 (+766.98%)
Mutual labels:  fastapi

fastapi-websocket-broadcast

An example of the familiar 'chat' websocket demo app, implemented in FastAPI / Starlette.

Run with

uvicorn app:app

And then point your browser to http://localhost:8000. REST API documentation is available under the /docs endpoint.

Websocket interface

Data from the server is JSON in the form

{
    "type": ...,
    "data": {
        ...
    }
}

Where type is one of:

  • ROOM_JOIN - sent to a user on successfully joining the chatroom
  • USER_JOIN - sent to all chatroom users when a new user joins the chatroom
  • USER_LEAVE - sent to all chatroom users when a user leaves the chatroom
  • ERROR - sent to one or more users in the event of a server error
  • MESSAGE - chat message from one user, broadcast to all chatroom users
  • WHISPER - private message from one user to another
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].