{"id":17150393,"url":"https://github.com/dlech/debian-python-aiogrpc","last_synced_at":"2025-03-24T12:18:38.938Z","repository":{"id":142620555,"uuid":"486388720","full_name":"dlech/debian-python-aiogrpc","owner":"dlech","description":"Debian packaging for https://github.com/hubo1016/aiogrpc","archived":false,"fork":false,"pushed_at":"2022-04-28T00:08:09.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T17:22:57.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"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/dlech.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-28T00:06:41.000Z","updated_at":"2022-04-28T00:07:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ca2f0c2-128f-4292-85aa-3273e6a676bb","html_url":"https://github.com/dlech/debian-python-aiogrpc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlech%2Fdebian-python-aiogrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlech%2Fdebian-python-aiogrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlech%2Fdebian-python-aiogrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlech%2Fdebian-python-aiogrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlech","download_url":"https://codeload.github.com/dlech/debian-python-aiogrpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245267566,"owners_count":20587459,"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-10-14T21:35:32.594Z","updated_at":"2025-03-24T12:18:38.919Z","avatar_url":"https://github.com/dlech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aiogrpc\n\n[![Build Status](https://travis-ci.org/hubo1016/aiogrpc.svg?branch=master)](https://travis-ci.org/hubo1016/aiogrpc)\n[![PyPI](https://img.shields.io/pypi/v/aiogrpc.svg)](https://pypi.python.org/pypi/aiogrpc)\n\nasyncio wrapper for grpc.io. Currently, only client-side interfaces are supported.\n\n# Interfaces\naiogrpc has exactly the same interface as grpc.io (https://grpc.io/grpc/python/grpc.html#module-grpc), except:\n\n- All callbacks are called with `call_soon_threadsafe()` to run in the same thread with the event loop\n- All futures are asyncio futures (i.e. awaitable)\n- All blocking interfaces (`__call__` for unary methods, `code()`, `details()`, ...) become coroutines\n- Stream input/output are async iterators\n- `close()` method returns a asyncio future (use `await channel.close()`) (*since v1.4*)\n\n# Usage\n\n1. Compile your proto file with protoc to generate stub files\n\n2. Use the stub files with aiogrpc.Channel, instead of grpc.Channel:\n    ```python\n    from aiogrpc import insecure_channel\n    import asyncio\n    from mystub import MyStub\n    \n    channel = insecure_channel('ipv4:///127.0.0.1:8080')\n    mystub = MyStub(channel)\n    \n    async def test_call():\n        return await mystub.mymethod(...)\n    \n    async def test_call_stream():\n        async for v in mystub.my_stream_method(...):\n            ...\n    ```\n\n# Balancing\n\nSame as the original grpc.io, balancing (fail over) between multiple servers are supported:\n\n1. Use multiple IPv4 or IPv6 addresses for balancing - use target like: `\"ipv4:///1.2.3.4:9999,1.2.3.5:9999,1.2.3.6:9999\"`\n   or `\"ipv6:///[1::2]:9999,[1::3]:9999,[1::4]:9999\"`\n\n2. Specify **ONE** DNS name which resolves to multiple addresses. GRPC will balance between the resolved addresses, and try\n   to update the resolving result in interval. Example: `\"dns:///myserver:9999\"`\n   \nNotice that you cannot mix up IPv4, IPv6 and DNS addresses; only addresses with the same type\ncan be balanced. Also, when using DNS target, only one DNS name can be specified.\n\nThe default load balancing strategy is `\"pick_first\"` (fail-over). Set `\"grpc.lb_policy_name\"` option to `\"round_robin\"` for\nround-robin load balancing: `channel = insecure_channel('ipv4:///1.2.3.4:9999,1.2.3.5:9999,1.2.3.6:9999', [('grpc.lb_policy_name', 'round_robin')])`\n\n# Copyright Notice\nAll code are published under Apache 2.0 License\n\nSome code and docstrings are modified from grpc.io (https://grpc.io/grpc/python/grpc.html#module-grpc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlech%2Fdebian-python-aiogrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlech%2Fdebian-python-aiogrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlech%2Fdebian-python-aiogrpc/lists"}