Skip to main content

RPC for QuLab

Project description

Qulab_RPC

View build status Coverage Status Updates Python 3 PyPI version

RPC for Qulab

Installation

We encourage installing QuLab-RPC via the pip tool (a python package manager):

python -m pip install QuLab-RPC

To install from the latest source, you need to clone the GitHub repository on your machine.

git clone https://github.com/feihoo87/QuLab_RPC.git

Then dependencies and QuLab can be installed in this way:

cd QuLab_RPC
python -m pip install -r requirements.txt
python -m pip install -e .

Usage

Server

import asyncio
import math


def start(loop):
    module = math
    server = ZMQServer(port=8765, loop=loop)
    server.set_module(module)
    server.start()

if __name__ == "__main__":
    import asyncio

    loop = asyncio.get_event_loop()

    start(loop)

    try:
        loop.run_forever()
    finally:
        loop.close()

Client

client = ZMQClient(addr)

y = await client.sin(3.14)

Running Tests

To run tests:

python -m pytest

Reporting Issues

Please report all issues on github.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for QuLab-RPC, version 1.3.6
Filename, size File type Python version Upload date Hashes
Filename, size QuLab_RPC-1.3.6-py3-none-any.whl (9.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size QuLab_RPC-1.3.6.tar.gz (7.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page