Provides a class mimicking a python dictionary that sends and recieves updates to its connected clients.
Project description
worker-object-server
Package consumption
pip install -i https://test.pypi.org/simple/ worker-object-server
Package distribution
python3 -m pip install --upgrade build
python3 -m build
python3 -m pip install --upgrade twine
python3 -m twine upload --repository testpypi dist/*
Example usage
from worker_object_server.object_server import ObjectServer
import asyncio
async def main():
obj = ObjectServer()
await obj.start()
# ws://localhost:8765 open to connections
obj["key"] = "value"
assert obj["key"] == "value"
await asyncio.sleep(1000) # await connections
await obj.stop()
asyncio.run(main())
Development
pyenv local 3.8.20
python3 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
Tests:
pytest tests/standalone.py
Manual testing:
$ python -m asyncio
...
>>> from tests.interactive import obj, end
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file worker_object_server-0.1.0.tar.gz.
File metadata
- Download URL: worker_object_server-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f447ad005b4a25bf6365a66149bd71879dbe974a3ab366bbd4c23bbd294970c4
|
|
| MD5 |
0967542a9375288de224bffec947cf86
|
|
| BLAKE2b-256 |
37fd7ca680e0a1be63b054825213508be617aa7da4c135b5ce6becf087e1b0b2
|
File details
Details for the file worker_object_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: worker_object_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d4e2b23f64516e93792cf31b8a806ab545c4e8b0dbe1bb70376705d6bbad21a
|
|
| MD5 |
4e176c7926349733a8a5285ecc9cb1c8
|
|
| BLAKE2b-256 |
8f23c57c8972f412858bb10ac2d3405c68970b0ba7eeaacc674d03e63fba2a28
|