{"id":13741134,"url":"https://github.com/grpc-requests/grpc_requests","last_synced_at":"2025-05-08T21:32:30.817Z","repository":{"id":65474476,"uuid":"564107288","full_name":"grpc-requests/grpc_requests","owner":"grpc-requests","description":"python grpc reflaction client","archived":false,"fork":true,"pushed_at":"2024-07-25T05:07:45.000Z","size":329,"stargazers_count":28,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-03T04:07:22.174Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"petercable/grpc_requests","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grpc-requests.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-11-10T02:10:31.000Z","updated_at":"2024-08-03T04:07:22.175Z","dependencies_parsed_at":"2023-02-14T04:31:34.854Z","dependency_job_id":null,"html_url":"https://github.com/grpc-requests/grpc_requests","commit_stats":{"total_commits":64,"total_committers":6,"mean_commits":"10.666666666666666","dds":0.6875,"last_synced_commit":"7e2354d9dcc49ee08e1b365c9743003c1a30281c"},"previous_names":["grpc-requests/grpc_requests","wesky93/grpc_requests"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpc-requests%2Fgrpc_requests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpc-requests%2Fgrpc_requests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpc-requests%2Fgrpc_requests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grpc-requests%2Fgrpc_requests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grpc-requests","download_url":"https://codeload.github.com/grpc-requests/grpc_requests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224774646,"owners_count":17367768,"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":[],"created_at":"2024-08-03T04:00:55.779Z","updated_at":"2025-05-08T21:32:30.782Z","avatar_url":"https://github.com/grpc-requests.png","language":"Python","funding_links":[],"categories":["Language-Specific","Python"],"sub_categories":["Python"],"readme":"# grpc_requests\n\n[![Nox](https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg)](https://github.com/wntrblm/nox)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)\n[![PyPI](https://img.shields.io/pypi/v/grpc-requests?style=flat-square)](https://pypi.org/project/grpc-requests)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/grpc-requests?style=flat-square)](https://pypi.org/project/grpc-requests)\n[![PyPI download month](https://img.shields.io/pypi/dm/grpc-requests?style=flat-square)](https://pypi.org/project/grpc-requests)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n![Views](https://views.whatilearened.today/views/github/wesky93/grpc_requests.svg)\n\n## GRPC for Humans\n\nLeverage [reflection](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md)\nto interact with GRPC in a familiar manner for users of the [requests](https://requests.readthedocs.io/en/latest/) library.\n\n```python\nfrom grpc_requests import Client\n\nclient = Client.get_by_endpoint(\"localhost:50051\")\nassert client.service_names == [\"helloworld.Greeter\"]\n\nrequest_data = {\"name\": \"sinsky\"}\nsay_hello_response = client.request(\"helloworld.Greeter\", \"SayHello\", request_data)\nassert say_hello_response ==  {\"message\":\"Hello sinsky!\"}\n```\n\n## Features\n\n- Create a client easily when connecting to servers implementing grpc reflection\n- Still support creating a client from stubs when reflection isn't available\n- All unary and stream methods supported\n- TLS and compression connections supported\n- AsyncIO API supported\n\n## Install\n\n```shell script\npip install grpc_requests\n```\n\n## Usage\n\nIn short:\n\nInstantiate a client using the URL of a GRPC server and any authentication\ncredentials you may need. If the server utilizes SSL (and it probably does)\nmake sure to toggle that flag.\n\n```python\nfrom grpc_requests import Client\n\nmetadata = [(\"authorization\", \"bearer my.cool.jwt\")]\nclient = Client.get_by_endpoint(\"cool.servers.arecool:443\", ssl=True, metadata=metadata)\n```\n\nThe [examples page](./src/examples/README.md) provides more thorough examples of\nusage scenarioes, and the [unit tests](./src/tests/) are also a useful reference point.\n\n## Contributing\n\nContributions from the community are welcomed and greatly appreciated.\n\nBefore opening a PR, running `python -m nox` can be used to ensure the contribution passes\nlinting and unit test checks for all supported versions of Python and protobuf.\nYou can also run [complexity.sh](./complexity.sh) to use\n[radon](https://pypi.org/project/radon/) to look at the cyclomatic complexity,\nmaintainability index, and Halstead effort and difficulty of files.\n\nPRs should be targeted to merge with the `develop` branch. When opening a PR,\nplease assign it to a maintainer for review. The maintainers will take it from\nthere.\n\n## Compatibility\n\n`grpc_requests` currently does its best to support versions of Python and\nprotobuf that are within their support lifetimes. You may find that other versions\nof dependencies work with the library, but this should be treated as a happy accident.\n\nFor Python, we target versions that are in the security and bugfix phases.\nFor protobuf, we target versions that in their public support phase.\n\n[Python's support matrix](https://devguide.python.org/versions/)\n[Protobuf's support matrix](https://protobuf.dev/support/version-support/#python)\n\n### Protobuf Compatibility\n\nThe maintainers of `grpc_requests` have found that protobuf `4.25.4` is not compatible\nwith verisons `\u003e=1.66.0` of both `grpcio` and `grpcio-reflection`. If your use case\nneeds `4.25.4` of protobuf, we recommend sticking to verison `1.65.x` of `grpcio` and\n`grpcio-reflection`.\n\nThe maintainers have also noted that under Python `3.13` `grpc_requests` will work\nonly with protobuf version `5.29.4` and above.\n\n\n## Questions, Comments, Issues?\n\nFor questions, please start a conversation on the [discussions page](https://github.com/wesky93/grpc_requests/discussions)!\n\nFor feature requests or bugs, please open an [issue](https://github.com/wesky93/grpc_requests/issues) and assign it the appropriate tag.\n\n## Maintainers\n\n- sinsky - [wesky93](https://github.com/wesky93)\n- Wayne Manselle - [ViridianForge](https://viridianforge.tech)\nr","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrpc-requests%2Fgrpc_requests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrpc-requests%2Fgrpc_requests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrpc-requests%2Fgrpc_requests/lists"}