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 package distribution
- Install build package:
pip install build
- Run:
python -m build
Releasing a new version
- Add version tag:
git tag VERSION (e.g. 0.1.0)
- Push to remote:
git push origin VERSION
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.6.0a0.tar.gz
.
File metadata
- Download URL: swimos-1.6.0a0.tar.gz
- Upload date:
- Size: 78.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 681f537aa0173a47f0e93a70c340740e0b019c83ab483241685a5fb46a0d63a8 |
|
MD5 | d5cd4f54ee2913925e34cb871b6bd2f8 |
|
BLAKE2b-256 | a88c66439b2fe23a607e37c01a4e391f98385868d3e0a52e89d36b265469bcaa |
Provenance
The following attestation bundles were made for swimos-1.6.0a0.tar.gz
:
Publisher:
python_publish.yml
on swimos/swim-system-python
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
swimos-1.6.0a0.tar.gz
- Subject digest:
681f537aa0173a47f0e93a70c340740e0b019c83ab483241685a5fb46a0d63a8
- Sigstore transparency entry: 150546367
- Sigstore integration time:
- Predicate type:
File details
Details for the file swimos-1.6.0a0-py3-none-any.whl
.
File metadata
- Download URL: swimos-1.6.0a0-py3-none-any.whl
- Upload date:
- Size: 87.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4faa30f79cd7a8767d10192557af351d4069383ed1e593a7d5a6bbe917971d77 |
|
MD5 | 7ea8d8bd6c6a67e3eda57016525159c6 |
|
BLAKE2b-256 | 14c0480ad63ff510bf3a6ae94bb3cc0cf381d050fa59737d4264fa51c5730e96 |
Provenance
The following attestation bundles were made for swimos-1.6.0a0-py3-none-any.whl
:
Publisher:
python_publish.yml
on swimos/swim-system-python
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
swimos-1.6.0a0-py3-none-any.whl
- Subject digest:
4faa30f79cd7a8767d10192557af351d4069383ed1e593a7d5a6bbe917971d77
- Sigstore transparency entry: 150546369
- Sigstore integration time:
- Predicate type: