{"id":20401002,"url":"https://github.com/rightlag/pygrpc","last_synced_at":"2025-09-07T14:35:31.239Z","repository":{"id":84983645,"uuid":"51543946","full_name":"rightlag/pygrpc","owner":"rightlag","description":"High level abstraction for generated protobuf modules","archived":false,"fork":false,"pushed_at":"2016-02-21T17:29:17.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T17:06:23.923Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rightlag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-11T20:16:56.000Z","updated_at":"2018-01-09T02:00:56.000Z","dependencies_parsed_at":"2023-03-07T03:45:18.523Z","dependency_job_id":null,"html_url":"https://github.com/rightlag/pygrpc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rightlag/pygrpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rightlag%2Fpygrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rightlag%2Fpygrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rightlag%2Fpygrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rightlag%2Fpygrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rightlag","download_url":"https://codeload.github.com/rightlag/pygrpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rightlag%2Fpygrpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274048764,"owners_count":25213517,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-15T04:47:29.149Z","updated_at":"2025-09-07T14:35:31.187Z","avatar_url":"https://github.com/rightlag.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pygrpc\n\npygrpc 0.2.0\n\nReleased: Feb-10-2015\n\n# Overview\n\n`pygrpc` is a Python module that provides a high-level client connection object to instantiate [Google Remote Procedure Calls](http://www.grpc.io/) (gRPCs).\n\n# Examples\n\nBy default, the [Google Protocol Buffer compiler](http://www.grpc.io/docs/tutorials/basic/python.html#generating-client-and-server-code) generates client and server code.\n\nThe following example is a code snippet provided by Google that creates a `helloworld.Greeter` stub object and invokes the `SayHello` method. The `SayHello` method takes a serializer class as its first argument (`helloworld_pb2.HelloRequest`):\n\n```python\n\"\"\"The Python implementation of the GRPC helloworld.Greeter client.\"\"\"\n\nfrom grpc.beta import implementations\n\nimport helloworld_pb2\n\n_TIMEOUT_SECONDS = 10\n\nchannel = implementations.insecure_channel('localhost', 50051)\nstub = helloworld_pb2.beta_create_Greeter_stub(channel)\nresponse = stub.SayHello(helloworld_pb2.HelloRequest(name='you'), _TIMEOUT_SECONDS)\nprint \"Greeter client received: \" + response.message\n```\n\nThe following example demonstrates the same request using `pygrpc`:\n\n```python\nfrom pygrpc import Client\n\nclient = Client('localhost', 50051)\n# This loads the generated Google Protocol Buffer module.\nclient.load('helloworld_pb2')\nresponse = client.request('SayHello', name='you')\nprint \"Greeter client received: \" + response.message\n```\n\nBoth examples would output: `Greeter client received: Hello, you!`.\n\n# Differences\n\nThe `pygrpc` client only requires the `request` method to be called for issuing gRPC requests.\n\n### pygrpc.Client\n\n`client.request(request, *args, **kwargs)`\n\nReturn a simple RPC response or a streaming RPC response. This is known as the [cardinality](https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/framework/common/cardinality.py) of the gRPC request/response.\n\n**Type:** `str`\n\n**Parameters:** **request** - the name of the RPC request defined in the `.proto` file.\n\n**Return type:** Reply object defined in the `.proto` file.\n\n**Returns:** Either a simple RPC response or a streaming RPC response.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightlag%2Fpygrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frightlag%2Fpygrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightlag%2Fpygrpc/lists"}