types-channels
Typing stubs for channels
Decision gist · record as of 2026-08-14
Yes, if you use Django Channels and run a static type checker. This is a low-friction stub package with no security issues, permissive licensing, and active maintenance. Install it whenever you have channels in your project and want type checking to work correctly—it's a straightforward dependency with no runtime overhead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Type checking requires mypy 2.1.0, pyright 1.1.409, or compatible type checker installed separately.
- Low friction installation as a pure-Python stub package.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most projects, commercial or open-source, with minimal restrictions.
last release 2026-05-18 (88 days) · last repo commit 2026-08-14 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 268,636 downloads/mo, #8,271 on PyPI
Alternatives
Verify before relying
pip install types-channels
# In your code, import channels normally; type checkers will use the stubs
import channels
from channels.generic.websocket import AsyncWebsocketConsumer- Whether stubs cover all public channels APIs or only a subset of the 4.3.* release series.
- Compatibility with type checkers other than mypy 2.1.0 and pyright 1.1.409.
What it is and what it does
types-channels is a type stub package that bridges the gap between the Django Channels library and static type checkers. It provides type annotations for channels so that tools like mypy and pyright can understand and validate code that uses Channels' WebSocket consumers, async utilities, and ASGI integration. The stubs are maintained as part of the typeshed project and are generated from typeshed's authoritative stub definitions.
You install this package alongside channels itself, and your type checker automatically uses the stubs to catch type errors in code that imports from channels. It depends on django-stubs and asgiref, matching the type annotation needs of those underlying libraries. The package targets channels 4.3.* specifically, so version alignment matters.
Use it for
- Enable mypy or pyright to type-check Django Channels consumer code and catch type errors before runtime.
- Provide IDE autocomplete and inline type hints for channels APIs in editors that support type stubs.
- Validate async WebSocket handler signatures and message passing in a channels-based real-time application.
- Ensure type safety when integrating channels with django-stubs in a fully type-annotated Django project.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use Django Channels and run a static type checker.
This is a low-friction stub package with no security issues, permissive licensing, and active maintenance. Install it whenever you have channels in your project and want type checking to work correctly—it's a straightforward dependency with no runtime overhead.
Install
types-channels on PyPI
Before you install
Low friction installation as a pure-Python stub package. Actively maintained within the typeshed project with recent releases; last commit 2026-08-14.
Requires Python 3.10 or later. Type checking requires mypy 2.1.0, pyright 1.1.409, or compatible type checker installed separately.
License in practice
Apache-2.0 permissive license allows use in most projects, commercial or open-source, with minimal restrictions.
Quickstart
pip install types-channels
# In your code, import channels normally; type checkers will use the stubs
import channels
from channels.generic.websocket import AsyncWebsocketConsumer
Verify before relying
- Whether stubs cover all public channels APIs or only a subset of the 4.3.* release series.
- Compatibility with type checkers other than mypy 2.1.0 and pyright 1.1.409.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesdjango-stubsasgiref |
| Maintenance | Actively maintained 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 268,636 / month, #8,271 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Typing :: Stubs Only |
Evidence: types_channels-4.3.0.20260518-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “type stubs for channels”
- types-channelsProvides type stubs for the channels package, enabling static type…
- aiochannelProvides asyncio-compatible channels (closable queues) inspired by…
- types-assertpyProvides type stubs enabling static type checkers like mypy and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also types-mock · types-Markdown · types-html5lib · channels · types-pexpect · types-qrcode · types-protobuf · types-cffi · types-PySocks · types-polib