Skip to content

Commit c3d57af

Browse files
docs: Restructure introduction section into a streamlined overview
Consolidate the introduction section by merging installation info into the overview page, removing the separate installation page, and flattening the sidebar navigation. Update slugs and redirect paths to use /overview. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c0cff92 commit c3d57af

File tree

6 files changed

+36
-90
lines changed

6 files changed

+36
-90
lines changed

docs/01_introduction/index.mdx

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
11
---
22
id: introduction
3-
title: Overview
3+
title: Apify SDK for Python
44
sidebar_label: Overview
5+
slug: /overview
56
description: 'The official library for creating Apify Actors in Python, providing tools for web scraping, automation, and data storage integration.'
67
---
78

8-
The Apify SDK for Python is the official library for creating [Apify Actors](https://docs.apify.com/platform/actors) in Python.
9+
The Apify SDK for Python is the official library for creating [Apify Actors](https://docs.apify.com/platform/actors) using Python. It provides useful features like Actor lifecycle management, local storage emulation, and Actor event handling.
910

10-
It provides tools and classes for web scraping and automation, allowing you to manage Actor lifecycles, handle data storage, work with proxies, and integrate with popular Python libraries.
11-
12-
## Example
13-
14-
Here's a simple example of an Actor that scrapes a web page and stores the result:
15-
16-
```py
11+
```python
1712
from apify import Actor
18-
from bs4 import BeautifulSoup
19-
import requests
2013

2114
async def main():
2215
async with Actor:
23-
input = await Actor.get_input()
24-
response = requests.get(input['url'])
25-
soup = BeautifulSoup(response.content, 'html.parser')
26-
await Actor.push_data({ 'url': input['url'], 'title': soup.title.string })
16+
actor_input = await Actor.get_input()
17+
print(actor_input)
2718
```
2819

29-
## Features
20+
## What are Actors
21+
22+
Actors are serverless cloud programs capable of performing tasks in a web browser, similar to what a human can do. These tasks can range from simple operations, such as filling out forms or unsubscribing from services, to complex jobs like scraping and processing large numbers of web pages.
23+
24+
Actors can be executed locally or on the [Apify platform](https://docs.apify.com/platform). The Apify platform lets you run Actors at scale and provides features for monitoring, scheduling, publishing, and monetizing them.
25+
26+
## Quick start
3027

31-
The Apify SDK for Python provides:
28+
To create and run Actors using Apify Console, check out [Apify Console documentation](https://docs.apify.com/platform/console). For creating and running Python Actors locally, refer to the [quick start guide](./quick-start).
29+
30+
Explore the Guides section in the sidebar to see more of the SDK in action and for a deeper understanding of the SDK's features and best practices.
31+
32+
## Installation
33+
34+
The Apify SDK for Python is typically installed when you create a new Actor project using the [Apify CLI](https://docs.apify.com/cli). To install it manually in an existing project, use:
35+
36+
```bash
37+
pip install apify
38+
```
3239

33-
- **Actor lifecycle management** - Handle initialization, teardown, and graceful shutdowns
34-
- **Storage management** - Work with Datasets, Key-Value Stores, and Request Queues
35-
- **Event handling** - Respond to Actor events like migration, abort, and system info
36-
- **Proxy management** - Rotate and manage proxies for web scraping
37-
- **Platform integration** - Interact with other Actors, webhooks, and the Apify API
38-
- **Framework compatibility** - Integrate with BeautifulSoup, Playwright, Selenium, Scrapy, and Crawlee
40+
:::note API client alternative
3941

40-
## Next steps
42+
If you need to interact with the Apify API programmatically without creating Actors, use the [Apify API client for Python](https://docs.apify.com/api/client/python) instead.
4143

42-
- **[Installation](./installation)** - Install the SDK and set up your development environment
43-
- **[Quick start](./quick-start)** - Create and run your first Actor
44-
- **[Concepts](../concepts/actor-lifecycle)** - Learn about core SDK concepts
45-
- **[Guides](../guides/beautiful-soup)** - See how to integrate with popular libraries
44+
:::

docs/01_introduction/installation.mdx

Lines changed: 0 additions & 51 deletions
This file was deleted.

docs/01_introduction/quick-start.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
id: quick-start
23
title: Quick start
34
sidebar_label: Quick start
45
description: 'Get started with the Apify SDK for Python by creating your first Actor and learning the basics.'

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ scrapy = ["scrapy>=2.11.0"]
5656
"Apify Homepage" = "https://apify.com"
5757
"Changelog" = "https://docs.apify.com/sdk/python/docs/changelog"
5858
"Discord" = "https://discord.com/invite/jyEM2PRvMU"
59-
"Documentation" = "https://docs.apify.com/sdk/python/docs/introduction"
59+
"Documentation" = "https://docs.apify.com/sdk/python/docs/overview"
6060
"Homepage" = "https://docs.apify.com/sdk/python/"
6161
"Issue Tracker" = "https://github.com/apify/apify-sdk-python/issues"
6262
"Release Notes" = "https://docs.apify.com/sdk/python/docs/upgrading/upgrading-to-v2"

website/sidebars.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
module.exports = {
22
sidebar: [
33
{
4-
type: 'category',
5-
label: 'Introduction',
6-
collapsed: false,
7-
items: [
8-
{
9-
type: 'autogenerated',
10-
dirName: '01_introduction',
11-
},
12-
],
4+
type: 'doc',
5+
id: 'introduction/introduction',
6+
},
7+
{
8+
type: 'doc',
9+
id: 'introduction/quick-start',
1310
},
1411
{
1512
type: 'category',

website/src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function Home() {
55
const history = useHistory();
66

77
useEffect(() => {
8-
history.replace('/sdk/python/docs/introduction');
8+
history.replace('/sdk/python/docs/overview');
99
}, [history]);
1010

1111
return null;

0 commit comments

Comments
 (0)