Mause RPC
A dumb as hell rpc implementation built on rabbitmq
Need to write a server?
from mause_rpc.server import Server
rpc_queue = "rpc.queue"
server = Server(rpc_queue, "rabbitmq://...")
@server.register
def hello(name: str) -> str:
return "hello " + name
@server.register("divide")
def div(a: int, b: int) -> float:
if b == 0:
raise ZeroDivisionError()
return a / b
if __name__ == "__main__":
server.serve()
Need a client?
from mause_rpc.client import get_client
rpc_queue = "rpc.queue"
client = get_client(rpc_queue, "rabbitmq://...")
def test_basic_functionality():
assert client.hello("mark") == "hello mark"
assert client.divide(5, 2) == 2.5
with pytest.raises(ZeroDivisionError):
client.divide(5, 0)
Metadata
Release files for mause_rpc 0.0.21
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 |
|---|---|---|---|---|
| mause_rpc-0.0.21.tar.gz | 4.2 kB | Without provenance | Details for mause_rpc-0.0.21.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mause_rpc-0.0.21-py3-none-any.whl | Python 3 | none | any | Details for mause_rpc-0.0.21-py3-none-any.whl |
Total release size: 9.5 kB
Release files / mause_rpc-0.0.21.tar.gz
| Download URL | mause_rpc-0.0.21.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f99f8843614267326233e1416b39b9d4d0c6c91f0f63114c955471375820a088
|
|
BLAKE2b-256 checksum How to use checksums |
71c389f4e008edf4dd535c519729fb56fd17021f7211863b259e6ca0f17a60ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.6 Linux/5.15.0-97-generic
|
Release files / mause_rpc-0.0.21-py3-none-any.whl
| Download URL | mause_rpc-0.0.21-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9de7073ed16553a06ed72ccc0b92db884548e9b0c8b2b577e70d032966bebb5
|
|
BLAKE2b-256 checksum How to use checksums |
77384592bc863a36255a23abe808c088bb2fb7b56564b3a6d1329bca9d5907b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.6 Linux/5.15.0-97-generic
|
Security for mause_rpc 0.0.21
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.