Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 1.05 KB

File metadata and controls

21 lines (15 loc) · 1.05 KB
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. This is useful for applications that need to perform multiple API operations concurrently or integrate with other async frameworks.

The following example shows how to run an Actor asynchronously and stream its logs while it is running:

{AsyncSupportExample}