0.0.1 • Published 10 months ago

@asyncapi/template-python-websocket-client v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

Python WebSocket Client

You can test this template: 1. Clone the project and run npm install 2. Navigate to packages/templates/clients/python/websocket 3. Install with npm install and run test with npm run test 4. Go to test folder with cd test 5. Install dependencies of the generated client: pip install -r temp/snapshotTestResult/requirements.txt 6. Start example script that uses a client library generated by the test: python example.py

By default this is testing against Postman echo service. You can modify packages/templates/clients/python/websocket/example.py and change first line to from temp.snapshotTestResult.client_hoppscotch import HoppscotchEchoWebSocketClient and line 16 client = HoppscotchEchoWebSocketClient() and run python example.py again. You will see example still works but agains different API. This is possible as both AsyncAPI documents have the same name of operation for sending messages: sendEchoMessage so each client generated has the same API.