Registry / http-networking / aiogrpc

aiogrpc

JSON →
library1.8pypypi✓ verified 84d ago

aiogrpc provides an asyncio wrapper for gRPC (grpcio), enabling asynchronous gRPC client and server calls on Python >=3.6. The latest version is 1.8. The project appears to be in maintenance mode with no recent releases since 2020.

pip install aiogrpc
INSTALL
IMPORT
SIG · AIOGRPC
A
aiogrpc
http-networkingpythonv1.8
Install
2.6s avg
Import
262ms
Disk
35MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.278s · 38.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.6s · import 0.246s · 36MB
35MB installed
● package 35MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

insecure_channel
from aiogrpc import insecure_channel
from grpc import insecure_channel
grpc.insecure_channel returns a sync channel, not async
channel_ready_future
from aiogrpc import channel_ready_future

Basic usage: create an insecure async channel and close it.

import asyncio from aiogrpc import insecure_channel async def main(): channel = insecure_channel('localhost:50051') # Use channel with generated stubs, e.g., stub = GreeterStub(channel) await channel.close() asyncio.run(main())
Debug
Known issues
breakingaiogrpc requires an event loop set before importing. Importing aiogrpc without a running loop raises RuntimeError.
fix
Always import aiogrpc inside an async function or after asyncio.run() is called, or set a loop with asyncio.set_event_loop().
affects: all
gotchaThe library wraps grpc.aio only partially; streaming calls may behave differently. For example, async generators are not fully supported; use the library's own async iterators.
fix
Prefer using grpc.aio (official async support in grpcio >= 1.32) unless you specifically need the older aiogrpc wrapper.
affects: all
deprecatedThe library has not been updated since 2020 and conflicts with newer grpcio versions (1.40+).
fix
Migrate to grpc.aio (official async gRPC). See https://grpc.io/docs/languages/python/quickstart/
affects: >=1.8
Errors
Common errors & fixes
RuntimeError: There is no current event loop in thread 'MainThread'.
Importing aiogrpc before an event loop is set (e.g., at module level).
fix
Import aiogrpc inside an async function or after calling asyncio.set_event_loop(asyncio.new_event_loop()).
AttributeError: module 'grpc' has no attribute 'alpha'
Confusion between aiogrpc and grpc.alpha (deprecated) or trying to use grpc.insecure_channel as async.
fix
Use from aiogrpc import insecure_channel.
Upgrade
Version history
1.8latest on PyPI · released Aug 24, 2020
Audit
Dependencies
grpciorequiredCore gRPC library that aiogrpc wraps
Agent activity
42 hits · last 30 days
node
36
OpenAI (training)
1
Resources
aiogrpc — pip install aiogrpc · libregistry