QuickRPC for Python: Small, interoperable, automagic RPC library.
QuickRPC is a library that is designed for quick and painless setup of communication channels and Remote-call protocols.
Python 3 only
A remote interface is defined like so:
from quickrpc import RemoteAPI, incoming, outgoing
class EchoAPI(RemoteAPI):
'''Demo of how to use RemoteAPI.
EchoAPI answers incoming `say` calls with an `echo` call.
'''
@incoming
def say(self, sender="", text=""): pass
@outgoing
def echo(self, receivers=None, text=""): pass
The interface is used over a Transport, which might e.g. be a TCP connection or Stdio:
api = EchoAPI(codec='jsonrpc', transport='tcpserv::8888')
# on incoming "say", call "echo"
api.say.connect(lambda sender="", text="": api.echo(text=text))
# transport starts in a new thread.
api.transport.start()
input('Serving on :8888 - press ENTER to stop')
api.transport.stop()
That’s it! You could now connect to the server e.g. via telnet:
$ telnet localhost 8888 say text:"hello"
(Exit via Ctrl+5 -> “quit”)
INSTALLATION
Requirements: Basically none, except for Python >= 3. For the QtTransports, PyQt4 is required.
Then:
pip install https://github.com/loehnertj/quickrpc/archive/master.zip
Or, download / clone and use python setup.py install.
LICENSE
MIT License: https://github.com/loehnertj/quickrpc/blob/master/LICENSE
DOCUMENTATION
Please proceed to http://quickrpc.readthedocs.io/en/latest/index.html
TODO
This is a hobby project. If you need something quick, contact me or better, send a pull request. :-)
Things I might add in the future: In-process “loopback” transport; Serial interface transport; msgpack Codec.
SSH support would be really cool but don’t hold your breath for that.
Metadata
Release files for quickrpc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quickrpc-0.1.0.tar.gz | 29.7 kB | Without provenance | Details for quickrpc-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quickrpc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for quickrpc-0.1.0-py3-none-any.whl |
Total release size: 65.7 kB
Release files / quickrpc-0.1.0.tar.gz
| Download URL | quickrpc-0.1.0.tar.gz |
|---|---|
| Size | 29.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15432a9c3344a7ba6f3d0b2bbed8b6798098cc3b6050584e6885b38808d0a1b5
|
|
BLAKE2b-256 checksum How to use checksums |
d62c4a0a2e24e6fc3837f0fb8070a8e0594f485d99c24796ff03e420b6437e5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|
Release files / quickrpc-0.1.0-py3-none-any.whl
| Download URL | quickrpc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab83160864c8944e127fcd0ef037d4e8ea20aec227ff10fea5328ab380ed4b1f
|
|
BLAKE2b-256 checksum How to use checksums |
34452a7064b9fb9ab415432c960343c906097180122fe131c47dfba5478d80eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|
Security for quickrpc 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.