GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fastapi-with-python-socketio-example/README.md at main · BimaAdi/fastapi-with-python-socketio-example

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
26 lines (22 loc) · 1.07 KB
/

README.md

Copy path

File metadata and controls

26 lines (22 loc) · 1.07 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Connect fastapi with python-socketio example

Example how to connect fastapi with python-socketio

Requirements

  • Python 3.11 (tested in python 3.11)
  • pip or poetry
  • Message queue (redis. kafka, rabbitmq) (not required but recommended for production)

Instalation using pip

  1. Create virtual env python -m venv env and activate it source env/bin/activate
  2. install depedency pip install -r requirements.txt
  3. Edit core/socket_io.py based on message_queue configuration (if you don't want use any message queue just comment line 5)
  4. run the server uvicorn main:app
  5. on browser open http://localhost:8000/static/index.html

Instalation using poetry

  1. install depedency poetry install
  2. Edit core/socket_io.py based on message_queue configuration (if you don't want use any message queue just comment line 5)
  3. run the server poetry run uvicorn main:app
  4. on browser open http://localhost:8000/static/index.html

References

  1. https://www.reddit.com/r/FastAPI/comments/neds9c/integrate_socketio_with_fastapi/
  2. fastapi/fastapi#129
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.