On this page
  1. typing.Awaitable
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

typing.Awaitable

Prev: typing.AsyncIterator | Up: typing | Next: typing.BinaryIO
Rel: typing.AbstractSet, typing.Annotated, typing.Any, typing.assert_never
Ref: docs.python.org — typing.Awaitable
Tags: #public #python3 #stdlib #typing


Import

import typing
from typing import Awaitable

Signature & Overview

typing.Awaitable(*args, **kwargs)

Deprecated alias to collections.abc.Awaitable.

Usage

from typing import Awaitable

async def run_it(job: Awaitable[int]) -> int:
    return await job

assert callable(run_it)

Gotchas

REPL Inspect

from typing import Awaitable
help(Awaitable)

Linked from

Related notes