High-level gRPC channel manager for the Nebius Python SDK.
| Class | |
A high-level gRPC channel manager used by the SDK. |
| Class | |
A small callable wrapper that binds RPC calls to a Channel-managed address channel. |
| Class | |
Marker type used to explicitly disable authorization. |
| Exception | |
Raised when an operation is attempted on a closed Channel. |
| Exception | |
Exception raised when a synchronous helper is used incorrectly with an asyncio event loop. |
| Function | set |
Set or override the grpc.primary_user_agent channel option. This helper appends the provided user-agent string to the options sequence, which is passed to gRPC when creating channels. If the grpc.primary_user_agent... |
| Type Variable | |
Undocumented |
| Type Variable | |
Undocumented |
| Type Variable | T |
Undocumented |
| Variable | |
Undocumented |
| Variable | logger |
Undocumented |
| Async Function | _run |
Run an awaitable with an optional wall-clock timeout. |
| Function | _wrap |
Ensure the provided awaitable is a coroutine object. |
str, options: ChannelArgumentType | None) -> ChannelArgumentType:
(source)
¶
Set or override the grpc.primary_user_agent channel option. This helper appends the provided user-agent string to the options sequence, which is passed to gRPC when creating channels. If the grpc.primary_user_agent option is already present in options, it will be replaced with the new value.
| Parameters | |
| user | The user-agent string to set. |
| options:optional list of (str, Any) tuples | Existing channel options, if any. |
| Returns | |
| list of (str, Any) tuples | The updated channel options including the user-agent. |
Awaitable[ T], timeout: float | None = None) -> T:
(source)
¶
Run an awaitable with an optional wall-clock timeout.
The function creates an asyncio.Task from the provided awaitable
and, if a timeout is supplied, a short timer task. It waits for the first
task to finish. If the timer completes first the awaited task is
cancelled and a TimeoutError is raised. Exceptions raised by the
awaited task are propagated.
| Parameters | |
f:Awaitable[ | The awaitable to run. |
timeout:float | None | Optional timeout in seconds. If None the awaitable is allowed to run indefinitely. |
| Returns | |
T | The awaited result. |
| Raises | |
TimeoutError | If the awaitable did not finish before the timeout. |
Ensure the provided awaitable is a coroutine object.
gRPC helper functions in this module accept both coroutine objects and
other awaitable types (for example asyncio.Future). This function
normalizes them into a coroutine so that they can be wrapped in an
asyncio.Task safely.
| Parameters | |
awaitable:Awaitable[ | Any awaitable or coroutine-like object. |
| Returns | |
Coroutine[ | A coroutine object ready to be scheduled. |
| Raises | |
TypeError | If the argument is not awaitable. |