Skip to main content

play websocket

https://img.shields.io/pypi/v/play_websocket.svg https://travis-ci.org/davidemoro/play_websocket.svg?branch=develop Documentation Status https://codecov.io/gh/davidemoro/play_websocket/branch/develop/graph/badge.svg

pytest-play support for websockets

More info and examples on:

Features

This project defines new pytest-play commands.

Connect

- type: connect
  provider: play_websocket
  options:
    url: wss://echo.websocket.org/
    timeout: 2

Send

- type: send
  provider: play_websocket
  url: wss://echo.websocket.org/
  payload: Hello!

Receive

- type: recv
  provider: play_websocket
  url: wss://echo.websocket.org/
  variable: data
  variable_expression: response.upper()
  assertion: data == 'HELLO!'
  timeout: 10

Receive until

If you want to filter the data returned by the websocked until you get what you expect:

- provider: python
  type: wait_until
  expression: variables['data'] == 'HELLO!'
  timeout: 60
  poll: 0
  sub_commands:
  - type: recv
    provider: play_websocket
    url: wss://echo.websocket.org/
    variable: data
    variable_expression: response.upper()
    timeout: 60

Twitter

pytest-play tweets happens here:

Credits

This package was created with Cookiecutter and the cookiecutter-play-plugin (based on audreyr/cookiecutter-pypackage project template).

CHANGES

0.0.2 (2019-01-25)

  • Supports new pytest-play >= 2.0 YAML based syntax (json no more supported)

0.0.1 (2018-01-25)

  • First release.

Metadata

Release files for play-websocket 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for play-websocket 0.0.2
File Size Uploaded Provenance
play_websocket-0.0.2.tar.gz 17.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for play-websocket 0.0.2
File Interpreter ABI Platform
play_websocket-0.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 25.1 kB

Release files / play_websocket-0.0.2.tar.gz

Download URL play_websocket-0.0.2.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d8da003a115b28949def6aba7e4dae76be36bd6e29ae029fc3c15edcc48b9d5a
BLAKE2b-256 checksum
How to use checksums
ea90cd8fd331261b8f299285e3dda06ade6d78adcd6dee3df6d1111681ae68f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.7

Release files / play_websocket-0.0.2-py2.py3-none-any.whl

Download URL play_websocket-0.0.2-py2.py3-none-any.whl
Size 7.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
662e426cb116ab3a7190330465253dedb75b67c401e8f60b1642e0730dc96e69
BLAKE2b-256 checksum
How to use checksums
f333fdf64ec4a856fa856f14b643fa1167fe13f166d6d5f85c5ce0e7b984e72f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.7

Security for play-websocket 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page