Skip to content

Commit 0ca0dbd

Browse files
docs: Version docs for v3.3.2 [skip ci]
1 parent 0d26276 commit 0ca0dbd

33 files changed

+27512
-27127
lines changed

website/versioned_docs/version-3.3/01_introduction/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
id: introduction
33
title: Overview
4-
sidebar_label: Overview
54
slug: /overview
6-
description: 'The official library for creating Apify Actors in Python, providing tools for web scraping, automation, and data storage integration.'
5+
description: The official library for creating Apify Actors in Python, providing tools for web scraping, automation, and data storage integration.
76
---
87

98
import CodeBlock from '@theme/CodeBlock';

website/versioned_docs/version-3.3/01_introduction/quick-start.mdx

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

87
Learn how to create and run Actors using the Apify SDK for Python.

website/versioned_docs/version-3.3/02_concepts/01_actor_lifecycle.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
id: actor-lifecycle
33
title: Actor lifecycle
4+
description: How an Apify Actor starts, runs, and shuts down, including context manager and manual control patterns.
45
---
56

67
import RunnableCodeBlock from '@site/src/components/RunnableCodeBlock';
@@ -42,7 +43,15 @@ When the Actor exits, either normally or due to an exception, the SDK performs a
4243
</TabItem>
4344
</Tabs>
4445

45-
You can also create an [`Actor`](https://docs.apify.com/sdk/python/reference/class/Actor) instance directly. This does not change its capabilities but allows you to specify optional parameters during initialization, such as disabling automatic `sys.exit()` calls or customizing timeouts. The choice between using a context manager or manual initialization depends on how much control you require over the Actor's startup and shutdown sequence.
46+
You can also create an [`Actor`](https://docs.apify.com/sdk/python/reference/class/Actor) instance directly. This does not change its capabilities but allows you to specify optional parameters during initialization. The key parameters are:
47+
48+
- `configuration` — a custom [`Configuration`](https://docs.apify.com/sdk/python/reference/class/Configuration) instance to control storage paths, API URLs, and other settings.
49+
- `configure_logging` — whether to set up default logging configuration (default `True`). Set to `False` if you configure logging yourself.
50+
- `exit_process` — whether the Actor calls `sys.exit()` when the context manager exits. Defaults to `True`, except in IPython, Pytest, and Scrapy environments.
51+
- `event_listeners_timeout` — maximum time to wait for Actor event listeners to complete before exiting.
52+
- `cleanup_timeout` — maximum time to wait for cleanup tasks to finish (default 30 seconds).
53+
54+
The choice between using a context manager or manual initialization depends on how much control you require over the Actor's startup and shutdown sequence.
4655

4756
<Tabs groupId="request_queue">
4857
<TabItem value="actor_instance_with_context_manager" label="Actor instance with context manager" default>
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
11
---
22
id: actor-input
33
title: Actor input
4+
description: Read and validate input data passed to your Actor at runtime.
45
---
56

67
import RunnableCodeBlock from '@site/src/components/RunnableCodeBlock';
78

89
import InputExample from '!!raw-loader!roa-loader!./code/02_input.py';
10+
import RequestListExample from '!!raw-loader!roa-loader!./code/02_request_list.py';
11+
import ApiLink from '@site/src/components/ApiLink';
912

1013
The Actor gets its [input](https://docs.apify.com/platform/actors/running/input) from the input record in its default [key-value store](https://docs.apify.com/platform/storage/key-value-store).
1114

12-
To access it, instead of reading the record manually, you can use the [`Actor.get_input`](../../reference/class/Actor#get_input) convenience method. It will get the input record key from the Actor configuration, read the record from the default key-value store,and decrypt any [secret input fields](https://docs.apify.com/platform/actors/development/secret-input).
15+
To access it, instead of reading the record manually, you can use the <ApiLink to="class/Actor#get_input">`Actor.get_input`</ApiLink> convenience method. It will get the input record key from the Actor configuration, read the record from the default key-value store,and decrypt any [secret input fields](https://docs.apify.com/platform/actors/development/secret-input).
1316

1417
For example, if an Actor received a JSON input with two fields, `{ "firstNumber": 1, "secondNumber": 2 }`, this is how you might process it:
1518

1619
<RunnableCodeBlock className="language-python" language="python">
1720
{InputExample}
1821
</RunnableCodeBlock>
22+
23+
## Loading URLs from Actor input
24+
25+
Actors commonly receive a list of URLs to process via their input. The <ApiLink to="class/ApifyRequestList">`ApifyRequestList`</ApiLink> class (from `apify.request_loaders`) can parse the standard Apify input format for URL sources. It supports both direct URL objects (`{"url": "https://example.com"}`) and remote URL lists (`{"requestsFromUrl": "https://example.com/urls.txt"}`), where the remote file contains one URL per line.
26+
27+
<RunnableCodeBlock className="language-python" language="python">
28+
{RequestListExample}
29+
</RunnableCodeBlock>
30+
31+
## Secret input fields
32+
33+
The Apify platform supports [secret input fields](https://docs.apify.com/platform/actors/development/secret-input) that are encrypted before being stored. When you mark an input field as `"isSecret": true` in your Actor's [input schema](https://docs.apify.com/platform/actors/development/input-schema), the platform encrypts the value with the Actor's public key.
34+
35+
No special handling is needed in your code — when you call <ApiLink to="class/Actor#get_input">`Actor.get_input`</ApiLink>, encrypted fields are automatically decrypted using the Actor's private key, which is provided by the platform via environment variables. You receive the plaintext values directly.
36+
37+
For more details on Actor input and how to define input schemas, see the [Actor input](https://docs.apify.com/platform/actors/running/input) and [input schema](https://docs.apify.com/platform/actors/development/input-schema) documentation on the Apify platform.

0 commit comments

Comments
 (0)