Skip to content
المشاريع

leonh/redis-streams-fastapi-chat

عرض على GitHub

حول

A simple Redis Streams backed Chat app using Websockets, Asyncio and FastAPI/Starlette.

تطوير الويب والتطبيقات

كيف تُقاس هذه الأرقام

353 نجمة39 التفرعات +1 خلال 24 ساعة

النمو المقاس للنجوم

خلال 24 ساعة
+١
خلال 7 أيام
+١
خلال 15 يومًا
+١
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

redis-streams-fastapi-chat

A simple demo of Redis Streams backed Chat app using Websockets, Python Asyncio and FastAPI/Starlette.

Requires Python version >= 3.11 and Redis 7+

Overview

This project has been created to help understand some related concepts. Python standard library asyncio, websockets (which are often cited as a classic use case for async python code), also Redis Streams. It is very much inteded to be an intentionally simple starting point rather than a usable product as is.

Installation

Local Development

$ pip install -r requirements.txt

Make sure you have Redis running locally:

$ redis-server

Usage

Local Development

$ python chat.py

Then open http://localhost:9080 in your browser.

Docker Compose

The easiest way to run the application with all dependencies:

$ docker-compose up

This will start both the chat application and Redis in containers. The app will be available at http://localhost:9080

Environment Variables

The following environment variables can be configured:

  • REDIS_HOST - Redis server hostname (default: localhost, set to redis in Docker)
  • REDIS_PORT - Redis server port (default: 6379)

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…