Skip to content

oliverdantzer/worker-object-server

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages