Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

A bit more higher level of asyncio websocket server

Project Description
======
WsAppy
======

A bit more higher level of asyncio websocket server

Overview
========

**wsappy** provides base classes for creating websocket API server using request handlers and client routes.

Usage example
=============

.. literalinclude:: ../examples/simple/server.py
:caption: Server
:language: python

.. literalinclude:: ../examples/simple/client.py
:caption: Client
:language: python

.. code-block:: bash

python3 server.py

.. code-block:: bash

python3 client.py

...on client will result in:

.. code-block:: bash

--> {"method": "get", "module": "entity", "data": {"item_id": 42}, "request_id": 1}
<-- {"request_id": 1, "event": "result", "module": "entity", "data": {"items": [{"id": 42, "name": "a"}]}}
--> {"method": "get", "module": "entity", "data": {"item_id": 15}, "request_id": 1}
<-- {"request_id": 1, "event": "result", "module": "entity", "data": {"items": [{"id": 15, "name": "b"}]}}
--> {"method": "get", "module": "entity", "data": {"item_id": 30}, "request_id": 1}
<-- {"request_id": 1, "event": "result", "module": "entity", "data": {"items": [{"id": 30, "name": "c"}]}}
items {42: {'name': 'a', 'id': 42}, 30: {'name': 'c', 'id': 30}, 15: {'name': 'b', 'id': 15}}

See :ref:`examples-simple` example for details

Features
========

* **Clients** - creating custom clients for URL routing
* **Handlers** - creating custom handlers for handling separate modules/methods

Run tests
=========

.. code-block:: bash

python3 -m unittest discover tests

TODO
====

* More complex URL routing
Release History

Release History

This version
History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
wsappy-0.1.1.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source Feb 3, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting