Define Entry Point in pyproject.toml #1598
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for this amazing package!
I find my self using the interactive client tool often, which is a great way to quickly test out my websocket server.
Currently I would need to have activated an environment with websockets installed to be able to run the interactive client.
I would love the ability to run the client as a global tool, and think this workflow is now more mainstream with tools like uv and pipx.
Defining an entry point in pyproject.toml will enable use of the interactive client with both uv tool/uvx and pipx.
One issue though:
I tested it out locally and it works with uv. However it does not handle keyboard interrupts properly and does not close the connection gracefully. I can't seem to figure out where the issue is, since there is an exception handler for keyboard interrupts. Would love any input on what is wrong.
This is not specific to the way the interactive client is run (happens with both uvx and python -m), but specific to my local version of websockets.