• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zappa / Zappa / 22667258745 / 3
75%
master: 75%

Build:
DEFAULT BRANCH: master
Ran 04 Mar 2026 11:35AM UTC
Files 13
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Mar 2026 11:24AM UTC coverage: 72.666% (-1.0%) from 73.647%
22667258745.3

push

github

web-flow
Add WebSocket API Gateway support (#1428)

* Add WebSocket API Gateway support via decorators, base class, and auto-provisioned infrastructure

Introduces zappa.websocket module with @on_connect, @on_disconnect, @on_message
decorators and ZappaWebSocketServer base class for handling WebSocket connections.
Auto-detects usage and provisions WebSocket API Gateway resources via CloudFormation.

Closes #1427

* Add WebSocket support section to README

Documents decorator and base class usage, send_message helper,
auto-detection behavior, and explicit websocket_enabled setting.

* Add validation for required WebSocket route handlers

Raises WebSocketConfigurationError on first WebSocket event if handlers
are registered but $connect or $default (message) routes are missing.
$disconnect remains optional.

* Fix README TOC format to match test expectations

Restore double blank line after doctoc header comment that the
test_readmetoc test requires.

* Add ManageConnections IAM permission and remove websocket_enabled setting

Auto-detection of zappa.websocket imports makes the explicit
websocket_enabled setting redundant — removed it from cli.py and README.

Added execute-api:ManageConnections to the Lambda execution role when
WebSocket is detected, fixing send_message() AccessDeniedException
found during E2E testing.

* Update README WebSocket examples with complete app.py samples

Both decorator and base class examples now show full, copy-paste-ready
app.py files with Flask app, logging, and realistic handler bodies.

* Address PR review: bytes payload, scoped IAM, skip venvs, docstring

- send_message() now always encodes Data to bytes (utf-8)
- ManageConnections IAM ARN scoped to region/account via STS
- _detect_websocket_usage() skips venv/env/.venv directories
- ZappaWebSocketServer docstring clarifies required overrides
- Tests updated to assert bytes payloads

* Shorten WebSocket API name suffix to -ws

API Gateway V2 names are limited to 128 characters... (continued)

3339 of 4595 relevant lines covered (72.67%)

0.73 hits per line

Source Files on job py3.9 - 22667258745.3
  • Tree
  • List 13
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22667258745
  • 8f338c92 on github
  • Prev Job for on master (#21124079114.3)
  • Next Job for on master (#22699260364.4)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc