| id | asyncio-support |
|---|---|
| title | Asyncio support |
| description | Use the async client for non-blocking API calls with Python asyncio. |
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; import ApiLink from '@site/src/components/ApiLink';
import AsyncSupportExample from '!!raw-loader!./code/01_async_support.py';
The package provides an asynchronous version of the client, ApifyClientAsync, which allows you to interact with the Apify API using Python's standard async/await syntax. This enables you to perform non-blocking operations, see the Python asyncio documentation for more information.
The following example demonstrates how to run an Actor asynchronously and stream its logs while it is running:
{AsyncSupportExample}For the full async client API, see the ApifyClientAsync reference.