Skip to main content

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)

Download files

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

Source Distribution

mause_rpc-0.0.21.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mause_rpc-0.0.21-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file mause_rpc-0.0.21.tar.gz.

File metadata

  • Download URL: mause_rpc-0.0.21.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.6 Linux/5.15.0-97-generic

File hashes

Hashes for mause_rpc-0.0.21.tar.gz
Algorithm Hash digest
SHA256 f99f8843614267326233e1416b39b9d4d0c6c91f0f63114c955471375820a088
MD5 1c84fb51e39e10151d3822a60f353124
BLAKE2b-256 71c389f4e008edf4dd535c519729fb56fd17021f7211863b259e6ca0f17a60ab

See more details on using hashes here.

File details

Details for the file mause_rpc-0.0.21-py3-none-any.whl.

File metadata

  • Download URL: mause_rpc-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.6 Linux/5.15.0-97-generic

File hashes

Hashes for mause_rpc-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 e9de7073ed16553a06ed72ccc0b92db884548e9b0c8b2b577e70d032966bebb5
MD5 f142d3c5390f5ab4ce96e5f2a8b4aa28
BLAKE2b-256 77384592bc863a36255a23abe808c088bb2fb7b56564b3a6d1329bca9d5907b2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.21 This release

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page