Standalone Python framework for building massively real-time streaming WARP clients.
Project description
Swim System Python Implementation
The Swim System Python implementation provides a standalone set of frameworks for building massively real-time streaming WARP clients.
The Swim Python Client is a streaming API client for linking to lanes
of stateful Web Agents using the WARP protocol, enabling massively
real-time applications that continuously synchronize all shared states
with ping latency. WARP is like pub-sub without the broker,
enabling every state of a Web API to be streamed, without
interference from billions of queues.
Installation
pip install swimos
Usage
# Setting the value of a value lane on a remote agent.
import time
from swimos import SwimClient
with SwimClient() as swim_client:
host_uri = 'ws://localhost:9001'
node_uri = '/unit/foo'
lane_uri = 'info'
value_downlink = swim_client.downlink_value()
value_downlink.set_host_uri('ws://localhost:9001')
value_downlink.set_node_uri('/unit/foo')
value_downlink.set_lane_uri('info')
value_downlink.open()
new_value = 'Hello from Python!'
value_downlink.set(new_value)
print('Stopping the client in 2 seconds')
time.sleep(2)
Development
Dependencies
Code dependencies
pip install -r requirements.txt
Development tools dependencies
pip install -r requirements-dev.txt
Run unit tests
Basic:
- Install async test package:
pip install aiounittest
- Run tests:
python -m unittest
With coverage:
- Install async test package:
pip install aiounittest
- Install coverage package:
pip install coverage
- Generate report:
coverage run --source=swimos -m unittest
- View report:
coverage report -m
Run Lint
Manual
- Install lint package:
pip install flake8
- Run checks:
flake8
Automatic (before commit)
- Install commit hook package:
pip install pre-commit
- Run hook installation:
pre-commit install
Build package
Building source distribution
- Run:
python setup.py sdist
Building wheel
- Install wheel package:
pip install wheel
- Run:
python setup.py sdist
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file swimos-1.2.0a0.tar.gz
.
File metadata
- Download URL: swimos-1.2.0a0.tar.gz
- Upload date:
- Size: 66.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42b662f82ab8acca440378686b691db3cb3c413ae072e7190df5d463294a0e0f |
|
MD5 | c89cbf3978dee62f74e3c8c6deec13c6 |
|
BLAKE2b-256 | f5d0c20d57e2f3ee80c080f39ba1076dde6b509735dad05be7a836bbd0577094 |
Provenance
File details
Details for the file swimos-1.2.0a0-py3-none-any.whl
.
File metadata
- Download URL: swimos-1.2.0a0-py3-none-any.whl
- Upload date:
- Size: 84.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb8f7592d570a5095bc6871f0fc8c6e6e923aedf2fe572fa7039c2fb5ff73db |
|
MD5 | dde3df0ec2a398c78dd08d1d44101ac0 |
|
BLAKE2b-256 | 6bb7a1d4f2459e69864624354e1d0ad5cd119a45dc967b9645697b7bffc1a387 |