Metadata-Version: 2.1
Name: PyRabbitmqRpc
Version: 1.2.1
Summary: This package mainly provides a solution for developers to implement RPC functionality using RabbitMQ.
Home-page: https://github.com/liu-xiaokai/PyRabbitmqRpc
Download-URL: https://github.com/liu-xiaokai/PyRabbitmqRpc/archive/refs/heads/main.zip
Author: NAIVEKAY
Author-email: genzhengmiaobuhong@163.com
License: MIT
Keywords: RPC,RABBITMQ,Python
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: pika

# PyRabbitmqRpc
 ##### This package mainly provides a solution for developers to implement RPC functionality using RabbitMQ.

demo https://github.com/liu-xiaokai/PyRabbitmqRpc/tree/main/demo


``this is a simple example
``

``client.py``
``````python
from PyRabbitmqRpc.client import RpcClient
import inspect
from demo.conf import Conf


class MyClient(RpcClient):

    def __init__(self, conf):
        RpcClient.__init__(self, conf)

    def get_sum(self, a=1, b=2, c=3):
        frame = inspect.currentframe()
        function_name = frame.f_code.co_name
        response = self.call(func_name=function_name, a=a, b=b, c=c)
        return response

if __name__ == '__main__':
    api_rpc = MyClient(Conf)
    print(api_rpc.get_sum())

``````
``manager.py``
``````python
from PyRabbitmqRpc.manager import ManagerServer
from demo.conf import Conf


class Manager(object):

    def get_sum(self, a=1, b=2, c=3):
        return a + b + c


manager_server = ManagerServer(manager=Manager, conf=Conf)

``````

