{"id":14987802,"url":"https://github.com/apache/dubbo-python","last_synced_at":"2025-05-15T17:07:30.977Z","repository":{"id":30121371,"uuid":"33671298","full_name":"apache/dubbo-python","owner":"apache","description":"The python Implementation For Apache Dubbo.","archived":false,"fork":false,"pushed_at":"2025-04-08T10:31:17.000Z","size":428,"stargazers_count":281,"open_issues_count":17,"forks_count":96,"subscribers_count":78,"default_branch":"main","last_synced_at":"2025-05-10T17:16:25.745Z","etag":null,"topics":["dubbo","framework","grpc","h2","http2","python","rpc"],"latest_commit_sha":null,"homepage":"https://dubbo.apache.org/","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-04-09T13:45:23.000Z","updated_at":"2025-05-09T08:23:49.000Z","dependencies_parsed_at":"2024-08-07T10:14:50.568Z","dependency_job_id":"3ce89de5-cb64-4027-ab99-0522cd3caace","html_url":"https://github.com/apache/dubbo-python","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"e5e9f7bc2b97dee3c89172b4130d8f6b1a12e5c6"},"previous_names":["ofpay/dubbo-client-py"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fdubbo-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fdubbo-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fdubbo-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fdubbo-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/dubbo-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850326,"owners_count":21973661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dubbo","framework","grpc","h2","http2","python","rpc"],"created_at":"2024-09-24T14:15:28.596Z","updated_at":"2025-05-15T17:07:30.964Z","avatar_url":"https://github.com/apache.png","language":"Python","readme":"# Apache Dubbo for Python\n\n![License](https://img.shields.io/github/license/apache/dubbo-python?logo=apache\u0026logoColor=red\u0026label=LICENSE)\n![GitHub last commit](https://img.shields.io/github/last-commit/apache/dubbo-python)\n![GitHub branch check runs](https://img.shields.io/github/check-runs/apache/dubbo-python/main)\n![PyPI - Version](https://img.shields.io/pypi/v/apache-dubbo?logo=pypi\u0026logoColor=gold\u0026label=PyPI\u0026color=blue)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/apache-dubbo?logo=python\u0026logoColor=gold\u0026label=Python)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://cn.dubbo.apache.org/imgs/nav_logo2.png\" alt=\"Logo\" width=\"40%\" /\u003e\n\u003c/p\u003e\n\nApache Dubbo is an easy-to-use, high-performance WEB and RPC framework with builtin service discovery, traffic management, observability, security features, tools and best practices for building enterprise-level microservices.\n\nDubbo-python is a Python implementation of the [triple protocol](https://dubbo.apache.org/zh-cn/overview/reference/protocols/triple-spec/) (a protocol fully compatible with gRPC and friendly to HTTP) and various features designed by Dubbo for constructing microservice architectures.\n\nVisit [the official website](https://dubbo.apache.org/) for more information.\n\n### 🚧 Early-Stage Project 🚧\n\n\u003e **Disclaimer:** This project is in the early stages of development. Features are subject to change, and some components may not be fully stable. Contributions and feedback are welcome as the project evolves.\n\n\n## Architecture\n\u003cimg src=\"./docs/img/Architecture.svg\" alt=\"Architecture\" style=\"zoom:30%;\" /\u003e\n\n## Features\n\n- **Service Discovery**: Zookeeper\n- **Load Balance**: Random, CPU\n- **RPC Protocols**: Triple(gRPC compatible and HTTP-friendly)\n- **Transport**: asyncio(uvloop)\n- **Serialization**: Customizable(protobuf, json...)\n\n\n## Installation\n\nBefore you start, make sure you have **`python 3.9+`** installed.\n\n1. Install Directly\n\n   ```sh\n   pip install apache-dubbo\n   ```\n2. Install from source\n\n   ```sh\n   git clone https://github.com/apache/dubbo-python.git\n   cd dubbo-python \u0026\u0026 pip install .\n   ```\n\n## Getting started\n\nGet up and running with Dubbo-Python in just 5 minutes by following our [Quick Start Guide](https://github.com/apache/dubbo-python/tree/main/samples).\n\nIt's as simple as the code snippet below. With just a few lines of code, you can launch a fully functional point-to-point RPC service:\n\n1. Build and start the server\n\n   ```python\n   import dubbo\n   from dubbo.configs import ServiceConfig\n   from dubbo.proxy.handlers import RpcMethodHandler, RpcServiceHandler\n   \n   \n   class UnaryServiceServicer:\n       def say_hello(self, message: bytes) -\u003e bytes:\n           print(f\"Received message from client: {message}\")\n           return b\"Hello from server\"\n   \n   \n   def build_service_handler():\n       # build a method handler\n       method_handler = RpcMethodHandler.unary(\n           method=UnaryServiceServicer().say_hello, method_name=\"unary\"\n       )\n       # build a service handler\n       service_handler = RpcServiceHandler(\n           service_name=\"org.apache.dubbo.samples.HelloWorld\",\n           method_handlers=[method_handler],\n       )\n       return service_handler\n   \n   \n   if __name__ == \"__main__\":\n       # build service config\n       service_handler = build_service_handler()\n       service_config = ServiceConfig(\n           service_handler=service_handler, host=\"127.0.0.1\", port=50051\n       )\n       # start the server\n       server = dubbo.Server(service_config).start()\n   \n       input(\"Press Enter to stop the server...\\n\")\n   ```\n\n1. Build and start the Client\n\n   ```python\n   import dubbo\n   from dubbo.configs import ReferenceConfig\n   \n   \n   class UnaryServiceStub:\n       def __init__(self, client: dubbo.Client):\n           self.unary = client.unary(method_name=\"unary\")\n   \n       def say_hello(self, message: bytes) -\u003e bytes:\n           return self.unary(message)\n   \n   \n   if __name__ == \"__main__\":\n       # Create a client\n       reference_config = ReferenceConfig.from_url(\n           \"tri://127.0.0.1:50051/org.apache.dubbo.samples.HelloWorld\"\n       )\n       dubbo_client = dubbo.Client(reference_config)\n       unary_service_stub = UnaryServiceStub(dubbo_client)\n   \n       # Call the remote method\n       result = unary_service_stub.say_hello(b\"Hello from client\")\n       print(result)\n   \n   ```\n\n## Contributing\n\nWe are excited to welcome contributions to the Dubbo-Python project! Whether you are fixing bugs, adding new features, or improving documentation, your input is highly valued.\n\nTo ensure a smooth collaboration, please review our [Contributing Guide](./docs/CONTRIBUTING.md) for detailed instructions on how to get started, adhere to coding standards, and submit your contributions effectively.\n\n## License\n\nApache Dubbo-python software is licensed under the Apache License Version 2.0. See\nthe [LICENSE](https://github.com/apache/dubbo-python/blob/main/LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fdubbo-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fdubbo-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fdubbo-python/lists"}