--- id: types-channels version: "4.3.0.20260518" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-channels — Typing stubs for channels License: permissive · Maintenance: active · Downloads: 268.6K/mo ## 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 above — verify before relying. Provides type stubs for the channels package, enabling static type checkers like mypy and pyright to validate code that uses Django Channels for WebSocket and async communication. 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 pip install types-channels uv add types-channels poetry add types-channels ## Installing types-channels 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. 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 Requires Python 3.10 or later. Type checking requires mypy 2.1.0, pyright 1.1.409, or compatible type checker installed separately. 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_current - Install friction: low - Maintenance: active - Downloads: 268.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs for channels, django channels typing, channels mypy support, websocket type checking, asgi type annotations, type-stubs, django-ecosystem [View on SkillFed](https://skillfed.io/packages/types-channels) · [View on PyPI](https://pypi.org/project/types-channels/)