Use wasmsockets package - #52
Conversation
04bd250 to
984758d
Compare
13b46c8 to
bb1b8ca
Compare
bb1b8ca to
ff63e2f
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Could you please updated the example number? I just merged my django example with 18, 19.
Also, please update README.
There was a problem hiding this comment.
I guess we didn't want to include uv.lock (and probably pylock.toml too), so that users can always pick up the latest package versions. Maybe we should include them to .gitignore.
| "name": "BLUESKY_FIREHOSE", | ||
| "class_name": "BlueskyFirehoseConsumer" | ||
| "class_name": "BlueskyFirehoseConsumer", | ||
| "script_name": "python-websocket-stream-consumer-313-old-date" |
There was a problem hiding this comment.
I guess the script_name is not needed?
| dependencies = [] | ||
| dependencies = [ | ||
| "webtypy>=0.1.7", | ||
| "wasmsockets @ git+https://github.com/dom96/wasmsockets.git@main", |
There was a problem hiding this comment.
Does this work at all? I am not sure if pywrangler currently support git urls.
There was a problem hiding this comment.
Ahh, remembering why I had to fork it. Meh. Maybe leaving existing websocket example that we have as-is is fine then. I prefer it over the wasmsockets usage.
| requires-python = ">=3.12" | ||
| dependencies = [] | ||
| dependencies = [ | ||
| "webtypy>=0.1.7", |
There was a problem hiding this comment.
| "webtypy>=0.1.7", |
|
|
||
| This example demonstrates a long-running Durable Object that connects to the Bluesky firehose (via Jetstream) and filters for post events, with rate limiting to print at most 1 per second. | ||
|
|
||
| This is the same as 14-websocket-stream-consumer, but it uses the wasmsockets package for WebSocket connections. |
There was a problem hiding this comment.
I wonder if we should update that example instead of adding a new one (the names are pretty similar as well).
|
On second thought, we probably don't want to use this package for our leading example here. So closing. |
Same as #51 but uses the wasmsockets package. I think showing both is useful (and this one found bugs so it's worth keeping).