swimos


Nameswimos JSON
Version 1.5.0a0 PyPI version JSON
download
home_pagehttps://github.com/swimos/swim-system-python
SummaryStandalone Python framework for building massively real-time streaming WARP clients.
upload_time2024-08-02 15:46:41
maintainerNone
docs_urlNone
authorDobromir Marinov
requires_pythonNone
licenseNone
keywords swim client
VCS
bugtrack_url
requirements websockets
Travis-CI No Travis.
coveralls test coverage
            # Swim System Python Implementation
[![PyPI version](https://badge.fury.io/py/swimos.svg)](https://badge.fury.io/py/swimos)
[![Build Status](https://dev.azure.com/swimai-build/swim-rust/_apis/build/status/swimos.swim-system-python?branchName=main)](https://dev.azure.com/swimai-build/swim-rust/_build/latest?definitionId=6&branchName=main)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![Code of Conduct](https://img.shields.io/badge/code-of%20conduct-green.svg)](CODE_OF_CONDUCT.md)
[![chat](https://img.shields.io/badge/chat-Gitter-green.svg)](https://gitter.im/swimos/community)
<a href="https://www.swimos.org"><img src="https://docs.swimos.org/readme/marlin-blue.svg" align="left"></a>

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.
<br>
## Installation
`pip install swimos`
## Usage
```python
# 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:
1) Install async test package: `pip install aiounittest`
2) Run tests: `python -m unittest`

##### With coverage:
1) Install async test package: `pip install aiounittest`
2) Install coverage package: `pip install coverage`
3) Generate report: `coverage run --source=swimos -m unittest`
4) View report: `coverage report -m`

### Run Lint
##### Manual
1) Install lint package: `pip install flake8`
2) Run checks: `flake8`
##### Automatic (before commit)
1) Install commit hook package: `pip install pre-commit`
2) Run hook installation: `pre-commit install`
### Build package
##### Building package distribution
1) Install build package: `pip install build`
2) Run: `python -m build`
##### Releasing a new version
1) Add version tag: `git tag VERSION (e.g. 0.1.0)`
2) Push to remote: `git push origin VERSION`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/swimos/swim-system-python",
    "name": "swimos",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "swim client",
    "author": "Dobromir Marinov",
    "author_email": "dobromir@swim.it",
    "download_url": "https://files.pythonhosted.org/packages/63/7b/d43cc6c204947b7db87c3868057a5bc9183ae2150866d508a9e9400ed0ba/swimos-1.5.0a0.tar.gz",
    "platform": null,
    "description": "# Swim System Python Implementation\n[![PyPI version](https://badge.fury.io/py/swimos.svg)](https://badge.fury.io/py/swimos)\n[![Build Status](https://dev.azure.com/swimai-build/swim-rust/_apis/build/status/swimos.swim-system-python?branchName=main)](https://dev.azure.com/swimai-build/swim-rust/_build/latest?definitionId=6&branchName=main)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Code of Conduct](https://img.shields.io/badge/code-of%20conduct-green.svg)](CODE_OF_CONDUCT.md)\n[![chat](https://img.shields.io/badge/chat-Gitter-green.svg)](https://gitter.im/swimos/community)\n<a href=\"https://www.swimos.org\"><img src=\"https://docs.swimos.org/readme/marlin-blue.svg\" align=\"left\"></a>\n\nThe **Swim System** Python implementation provides a standalone set of\nframeworks for building massively real-time streaming WARP clients.\n\nThe **Swim Python Client** is a streaming API client for linking to lanes \nof stateful Web Agents using the WARP protocol, enabling massively \nreal-time applications that continuously synchronize all shared states \nwith ping latency. WARP is like pub-sub without the broker, \nenabling every state of a Web API to be streamed, without \ninterference from billions of queues.\n<br>\n## Installation\n`pip install swimos`\n## Usage\n```python\n# Setting the value of a value lane on a remote agent.\nimport time\n\nfrom swimos import SwimClient\n\nwith SwimClient() as swim_client:\n    host_uri = 'ws://localhost:9001'\n    node_uri = '/unit/foo'\n    lane_uri = 'info'\n\n    value_downlink = swim_client.downlink_value()\n    value_downlink.set_host_uri('ws://localhost:9001')\n    value_downlink.set_node_uri('/unit/foo')\n    value_downlink.set_lane_uri('info')\n    value_downlink.open()\n\n    new_value = 'Hello from Python!'\n    value_downlink.set(new_value)\n\n    print('Stopping the client in 2 seconds')\n    time.sleep(2)\n```\n## Development\n\n### Dependencies\n##### Code dependencies\n`pip install -r requirements.txt`\n##### Development tools dependencies\n`pip install -r requirements-dev.txt`\n### Run unit tests\n##### Basic:\n1) Install async test package: `pip install aiounittest`\n2) Run tests: `python -m unittest`\n\n##### With coverage:\n1) Install async test package: `pip install aiounittest`\n2) Install coverage package: `pip install coverage`\n3) Generate report: `coverage run --source=swimos -m unittest`\n4) View report: `coverage report -m`\n\n### Run Lint\n##### Manual\n1) Install lint package: `pip install flake8`\n2) Run checks: `flake8`\n##### Automatic (before commit)\n1) Install commit hook package: `pip install pre-commit`\n2) Run hook installation: `pre-commit install`\n### Build package\n##### Building package distribution\n1) Install build package: `pip install build`\n2) Run: `python -m build`\n##### Releasing a new version\n1) Add version tag: `git tag VERSION (e.g. 0.1.0)`\n2) Push to remote: `git push origin VERSION`\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Standalone Python framework for building massively real-time streaming WARP clients.",
    "version": "1.5.0a0",
    "project_urls": {
        "Homepage": "https://github.com/swimos/swim-system-python"
    },
    "split_keywords": [
        "swim",
        "client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb2fab4dcd16fce3b206a4f91e3f6945b12c9951540f9fe4218b218279cae20a",
                "md5": "bbcfda05837af2b569fd35974e2d018d",
                "sha256": "32e29105483465dd8ad6e0d4205df06308dceea528edf098b34c816aaa9ce97b"
            },
            "downloads": -1,
            "filename": "swimos-1.5.0a0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bbcfda05837af2b569fd35974e2d018d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 86353,
            "upload_time": "2024-08-02T15:46:40",
            "upload_time_iso_8601": "2024-08-02T15:46:40.708435Z",
            "url": "https://files.pythonhosted.org/packages/bb/2f/ab4dcd16fce3b206a4f91e3f6945b12c9951540f9fe4218b218279cae20a/swimos-1.5.0a0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "637bd43cc6c204947b7db87c3868057a5bc9183ae2150866d508a9e9400ed0ba",
                "md5": "fd7501b6db6c7ad084005f5d9279c9e1",
                "sha256": "5f1b347bd821f084392d4f23cf453bd63db970b9b463fe938188a947abaa2a60"
            },
            "downloads": -1,
            "filename": "swimos-1.5.0a0.tar.gz",
            "has_sig": false,
            "md5_digest": "fd7501b6db6c7ad084005f5d9279c9e1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 76803,
            "upload_time": "2024-08-02T15:46:41",
            "upload_time_iso_8601": "2024-08-02T15:46:41.762521Z",
            "url": "https://files.pythonhosted.org/packages/63/7b/d43cc6c204947b7db87c3868057a5bc9183ae2150866d508a9e9400ed0ba/swimos-1.5.0a0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-02 15:46:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "swimos",
    "github_project": "swim-system-python",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "websockets",
            "specs": []
        }
    ],
    "lcname": "swimos"
}
        
Elapsed time: 0.33650s