Skip to content

Commit

Permalink
Added "Contributing / Building From Source"
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Sep 13, 2024
1 parent 15db04b commit c6aea0c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
50 changes: 47 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ Use pip to install it::

$ pip install picows


Documentation
=============

https://picows.readthedocs.io/en/stable/

Rationale
=========
Popular WebSocket libraries attempt to provide high-level interfaces. They take care of timeouts, flow control, optional compression/decompression, assembling WebSocket messages from frames, as well as implementing async iteration interfaces.
Expand Down Expand Up @@ -131,7 +137,45 @@ Features
* Ability to check if a frame is the last one in the receiving buffer
* Support both secure and unsecure protocols (ws and wss schemes)

Documentation
=============
Contributing / Building From Source
===================================
1. Fork and clone the repository::

$ git clone git@github.com:tarasko/picows.git
$ cd picows

2. Create a virtual environment and activate it::

$ python3 -m venv picows-dev
$ source picows-dev/bin/activate


3. Install development dependencies::

# To run tests
$ pip install -r requirements-test.txt

# To run benchmark
$ pip install -r requirements-benchmark.txt

# To build docs
$ pip install -r docs/requirements.txt

4. Build inplace and run tests::

$ export PICOWS_BUILD_EXAMPLES=1
$ python setup.py build_ext --inplace
$ pytest -s -v

# Run specific test
$ pytest -s -v -k test_client_handshake_timeout[uvloop-plain]

5. Run benchmark::

$ python -m examples.echo_server
$ python -m examples.echo_client

6. Build docs::

$ make -C docs clean html

https://picows.readthedocs.io/en/stable/
2 changes: 2 additions & 0 deletions requirements-benchmark.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
websockets
aiohttp
numpy
matplotlib
uvloop; sys_platform != 'win32'

0 comments on commit c6aea0c

Please sign in to comment.