Skip to main content

PyPI version codecov

Django SocketIO (django-sio)

Socket.IO for Django, powered by Channels and compatible with the official Socket.IO clients.

📖 Documentation: django-sio.readthedocs.io 🐍 PyPI: pypi.org/project/django-sio/ 🚀 Demo project: django-sio-chat-demo


Code Coverage

Repository graph

Development Setup

Clone the repository and install dependencies using uv:

# Install dependencies
uv sync

# Editable install
uv pip install -e .

Building Documentation

This project uses sphinx.

uv run make html

See documentation in build/ directory.

Running Tests

Execute the test suite with:

uv run pytest -sq
uv run pytest -sq --durations=10  # To get 10 slowest tests
uv run pytest --cov=. --cov-report=html  # To generate code coverage report

# To run js_client tests make sure you do `npm install` before
uv run pytest -vv -s tests/js_client/test_js_client_integration.py --run-js
# To run js_client tests till first failure
JS_BAIL=1 \
  uv run pytest -vv -s tests/js_client/test_js_client_integration.py --run-js
# To run specific js_client tests. Alternatively use it.only() or to skip it.skip().
SIO_TRANSPORT=default JS_GREP="should forcefully close the session" \
  uv run pytest -vv -s tests/js_client/test_js_client_integration.py --run-js

Running Linters and Formatters

uv run ruff format --check
uv run ruff format
uv run docformatter . --check
uv run docformatter --in-place .
uv run ruff check
npx eslint tests/js_client
npx eslint tests/js_client --fix

Running with tox

Run the full tox matrix:

uv run tox

List the tox matrix:

$ uv run tox -l
... # past support
py39-dj42
py310-dj42
py311-dj42
py312-dj42
py310-dj51
py311-dj51
py312-dj51
py313-dj51
py310-dj52
py311-dj52
py312-dj52
py313-dj52
py314-dj52
py312-dj60
py313-dj60
py314-dj60
py312-djmain
py313-djmain
py314-djmain
... # future support
qa
qa-js

# run the tests with python 3.14, on Django 5.2 and main branch with linting or code quality assurance.
$ uv run tox -e py314-dj52,py314-djmain,qa

Note that tox can also forward arguments to pytest. For example, forward the -sq or --run-js flag to pytest as such:

uv run tox -e py314-djmain -- -sq --run-js

Contributing

Contributions are welcome! Please open issues or pull requests to help improve the package.

Release

To create a release:

git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0

Release files for django-sio 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-sio 0.2.0
File Size Uploaded
django_sio-0.2.0.tar.gz 54.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-sio 0.2.0
File Interpreter ABI Platform
django_sio-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 87.1 kB

Release files / django_sio-0.2.0.tar.gz

Download URL django_sio-0.2.0.tar.gz
Size 54.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5a5b0c5677524fdf8723b8f253df1a930a80305ef08a692748634848e5e1fa25
BLAKE2b-256 checksum
How to use checksums
37d82729e6b0b47be4e4ec9e5cc58c65c8e7016dc4ae189f86be00004f3999f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / django_sio-0.2.0-py3-none-any.whl

Download URL django_sio-0.2.0-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0bab7d28e252417a8743cdf027b1ccd785e740393a0bd61ef85b8a2754b817f
BLAKE2b-256 checksum
How to use checksums
a9e7cb6f83ae859124d57fe5082c9b78654dad43ac5041e318f7753196148d28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page