Skip to main content

Apify SDK for Python

Project description

Apify SDK for Python

The Apify SDK for Python is the official library to create Apify Actors in Python. It provides useful features like actor lifecycle management, local storage emulation, and actor event handling.

If you just need to access the Apify API from your Python applications, check out the Apify Client for Python instead.

Documentation

For usage instructions, check the documentation on Apify Docs.

Example

from apify import Actor
from bs4 import BeautifulSoup
import requests

async def main():
    async with Actor:
        response = requests.get('https://apify.com')
        soup = BeautifulSoup(response.content, 'html.parser')
        await Actor.push_data({ 'url': url, 'title': soup.title.string })

What are Actors?

Actors are serverless cloud programs that can do almost anything a human can do in a web browser. They can do anything from small tasks such as filling in forms or unsubscribing from online services, all the way up to scraping and processing vast numbers of web pages.

They can be run either locally, or on the Apify platform, where you can run them at scale, monitor them, schedule them, or publish and monetize them.

If you're new to Apify, learn what is Apify in the Apify platform documentation.

Creating Actors

To create and run Actors through Apify Console, see the Console documentation.

To create and run Python Actors locally, check the documentation for how to create and run Python Actors locally.

Guides

To see how you can use the Apify SDK with other popular libraries used for web scraping, check out our guides for using Requests and HTTPX, Beautiful Soup, Playwright, Selenium, or Scrapy.

Usage concepts

To learn more about the features of the Apify SDK and how to use them, check out the Usage Concepts section in the sidebar, particularly the guides for the Actor lifecycle, working with storages, handling Actor events or how to use proxies.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apify-1.1.0b5.tar.gz (64.9 kB view details)

Uploaded Source

Built Distribution

apify-1.1.0b5-py3-none-any.whl (80.2 kB view details)

Uploaded Python 3

File details

Details for the file apify-1.1.0b5.tar.gz.

File metadata

  • Download URL: apify-1.1.0b5.tar.gz
  • Upload date:
  • Size: 64.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for apify-1.1.0b5.tar.gz
Algorithm Hash digest
SHA256 211a5689104d6478e9a1b5aa1f2b711bb0b1c40f364db3a1a0995dfd1a65ed30
MD5 c9b03ef4cb40aa44419b9ae5a7c237db
BLAKE2b-256 9ca14304ed6a203cd75bca484aac056753c333fce59d10de280b4c6bfb4d00a4

See more details on using hashes here.

File details

Details for the file apify-1.1.0b5-py3-none-any.whl.

File metadata

  • Download URL: apify-1.1.0b5-py3-none-any.whl
  • Upload date:
  • Size: 80.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for apify-1.1.0b5-py3-none-any.whl
Algorithm Hash digest
SHA256 d5693cfcd5d48f73e44c28f11313e1a59ec6559ed7d051e5d2e909ac111f4e18
MD5 9e4112ac2e781996e9e06c3c78c75f32
BLAKE2b-256 a724211d589af90b54d60903b2c809456483a31fa570880430adec5ee9eff7b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page