From 41cff04c199c63cf738cd247ab09f4cfd28b9c44 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Fri, 27 Mar 2026 14:13:38 +0100 Subject: [PATCH 1/5] docs: add v0.2 --- .../version-0.2/01-introduction/index.mdx | 67 + .../01-introduction/quick-start.mdx | 87 + .../02-concepts/01-actor-lifecycle.mdx | 81 + .../version-0.2/02-concepts/02-storages.mdx | 40 + .../02-concepts/03-proxy-management.mdx | 45 + .../02-concepts/04-actor-events.mdx | 52 + .../02-concepts/05-access-apify-api.mdx | 21 + .../version-0.2/api-packages.json | 1 + .../version-0.2/api-typedoc.json | 6356 +++++++++++++++++ .../versioned_docs/version-0.2/changelog.md | 512 ++ .../version-0.2-sidebars.json | 27 + website/versions.json | 3 +- 12 files changed, 7291 insertions(+), 1 deletion(-) create mode 100644 website/versioned_docs/version-0.2/01-introduction/index.mdx create mode 100644 website/versioned_docs/version-0.2/01-introduction/quick-start.mdx create mode 100644 website/versioned_docs/version-0.2/02-concepts/01-actor-lifecycle.mdx create mode 100644 website/versioned_docs/version-0.2/02-concepts/02-storages.mdx create mode 100644 website/versioned_docs/version-0.2/02-concepts/03-proxy-management.mdx create mode 100644 website/versioned_docs/version-0.2/02-concepts/04-actor-events.mdx create mode 100644 website/versioned_docs/version-0.2/02-concepts/05-access-apify-api.mdx create mode 100644 website/versioned_docs/version-0.2/api-packages.json create mode 100644 website/versioned_docs/version-0.2/api-typedoc.json create mode 100644 website/versioned_docs/version-0.2/changelog.md create mode 100644 website/versioned_sidebars/version-0.2-sidebars.json diff --git a/website/versioned_docs/version-0.2/01-introduction/index.mdx b/website/versioned_docs/version-0.2/01-introduction/index.mdx new file mode 100644 index 000000000..11b15b71b --- /dev/null +++ b/website/versioned_docs/version-0.2/01-introduction/index.mdx @@ -0,0 +1,67 @@ +--- +id: introduction +title: Overview +sidebar_label: Overview +slug: /overview +description: 'The official library for creating Apify Actors in Python, providing tools for web scraping, automation, and data storage integration.' +--- + +The Apify SDK for Python is the official library for creating [Apify Actors](https://docs.apify.com/platform/actors) in Python. +It provides useful features like automatic retries and convenience functions that improve the experience of using the Apify API. + +```python +import asyncio +from apify import Actor + +async def main(): + async with Actor: + actor_input = await Actor.get_input() + print('Actor input:', actor_input) + await Actor.push_data([{'result': 'Hello, world!'}]) + await Actor.set_value('OUTPUT', 'Done!') + +asyncio.run(main()) +``` + +## 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. + +Actors can be run either locally, or on the [Apify platform](https://docs.apify.com/platform/), where you can run them at scale, monitor them, schedule them, and even publish and monetize them. + +If you're new to Apify, learn [what is Apify](https://docs.apify.com/platform/about) in the Apify platform documentation. + +## Quick start + +To create and run Actors through Apify Console, see the [Console documentation](https://docs.apify.com/academy/getting-started/creating-actors#choose-your-template). For creating and running Python Actors locally, refer to the [quick start guide](./quick-start). + +## Installation + +The Apify SDK for Python requires Python 3.8 or above. You can install it from [PyPI](https://pypi.org/project/apify/): + +```bash +pip install apify +``` + +## Features + +### Local storage emulation + +When running Actors locally, the Apify SDK performs storage operations like `Actor.push_data()` or `Actor.set_value()` on the local filesystem, in the `storage` folder in the Actor project directory. + +### Automatic configuration + +When running Actors on the Apify platform, the SDK automatically configures the Actor using the environment variables the platform provides to the Actor's container. This means you don't have to specify your Apify API token, your Apify Proxy password, or the default storage IDs manually. + +### Interacting with other Actors + +You can interact with other Actors with useful API wrappers: +- `Actor.start(other_actor_id, run_input=...)` starts a run of another Actor. +- `Actor.call(other_actor_id, run_input=...)` starts a run and waits for it to finish. +- `Actor.call_task(actor_task_id)` starts an Actor task run and waits for it to finish. + +:::note API client alternative + +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. + +::: diff --git a/website/versioned_docs/version-0.2/01-introduction/quick-start.mdx b/website/versioned_docs/version-0.2/01-introduction/quick-start.mdx new file mode 100644 index 000000000..67882bbe0 --- /dev/null +++ b/website/versioned_docs/version-0.2/01-introduction/quick-start.mdx @@ -0,0 +1,87 @@ +--- +id: quick-start +title: Quick start +sidebar_label: Quick start +description: 'Get started with the Apify SDK for Python by creating your first Actor and learning the basics.' +--- + +Learn how to create and run Actors using the Apify SDK for Python. + +--- + +## Step 1: Create Actors + +To create a new Apify Actor on your computer, you can use the [Apify CLI](https://docs.apify.com/cli) and select one of the Python Actor templates. + +```bash +apify create my-python-actor --template python-sdk +cd my-python-actor +``` + +This will create a new folder called `my-python-actor`, download and extract the Python SDK Actor template there, create a virtual environment in `my-python-actor/.venv`, and install the Actor dependencies in it. + +## Step 2: Run Actors + +To run the Actor, you can use the [`apify run` command](https://docs.apify.com/cli/docs/reference#apify-run): + +```bash +apify run +``` + +This command: + +- Activates the virtual environment in `.venv` (if no other virtual environment is activated yet) +- Starts the Actor with the appropriate environment variables for local running +- Configures it to use local storages from the `storage` folder + +The Actor input, for example, will be in `storage/key_value_stores/default/INPUT.json`. + +## Step 3: Understand Actor structure + +The `.actor` directory contains the [Actor configuration](https://docs.apify.com/platform/actors/development/actor-config), such as the Actor's definition and input schema, and the Dockerfile necessary to run the Actor on the Apify platform. + +The Actor's runtime dependencies are specified in the `requirements.txt` file, which follows the [standard requirements file format](https://pip.pypa.io/en/stable/reference/requirements-file-format/). + +The Actor's source code is in the `src` folder with two important files: + +- `main.py` - which contains the main function of the Actor +- `__main__.py` - which is the entrypoint of the Actor package, setting up the Actor logger and executing the Actor's main function via [`asyncio.run()`](https://docs.python.org/3/library/asyncio-runner.html#asyncio.run). + +```python title="src/main.py" +from apify import Actor + +async def main(): + async with Actor: + print('Actor input:', await Actor.get_input()) + await Actor.set_value('OUTPUT', 'Hello, world!') +``` + +```python title="src/__main__.py" +import asyncio +import logging + +from apify.log import ActorLogFormatter + +from .main import main + +handler = logging.StreamHandler() +handler.setFormatter(ActorLogFormatter()) + +apify_logger = logging.getLogger('apify') +apify_logger.setLevel(logging.DEBUG) +apify_logger.addHandler(handler) + +asyncio.run(main()) +``` + +If you want to modify the Actor structure, you need to make sure that your Actor is executable as a module, via `python -m src`, as that is the command started by `apify run` in the Apify CLI. + +## Next steps + +To learn more about the features of the Apify SDK and how to use them, check out the Concepts section, especially: + +- [Actor lifecycle](../concepts/actor-lifecycle) +- [Working with storages](../concepts/storages) +- [Working with proxies](../concepts/proxy-management) +- [Managing Actor events](../concepts/actor-events) +- [Direct access to the Apify API](../concepts/access-apify-api) diff --git a/website/versioned_docs/version-0.2/02-concepts/01-actor-lifecycle.mdx b/website/versioned_docs/version-0.2/02-concepts/01-actor-lifecycle.mdx new file mode 100644 index 000000000..c8853eae9 --- /dev/null +++ b/website/versioned_docs/version-0.2/02-concepts/01-actor-lifecycle.mdx @@ -0,0 +1,81 @@ +--- +title: Actor lifecycle +sidebar_label: Actor lifecycle +--- + +## Lifecycle methods + +### Initialization and cleanup + +At the start of its runtime, the Actor needs to initialize itself, its event manager and its storages, +and at the end of the runtime it needs to close these cleanly. +The Apify SDK provides several options on how to manage this. + +#### `Actor.init()` and `Actor.exit()` + +The `Actor.init()` method initializes the Actor, +the event manager which processes the Actor events from the platform event websocket, +and the storage client used in the execution environment. +It should be called before performing any other Actor operations. + +The `Actor.exit()` method then exits the Actor cleanly, +tearing down the event manager and the storage client. +There is also the `Actor.fail()` method, which exits the Actor while marking it as failed. + +```python title="src/main.py" +import asyncio +from apify import Actor +from apify.consts import ActorExitCodes + +async def main(): + await Actor.init() + try: + print('Actor input:', await Actor.get_input()) + await Actor.set_value('OUTPUT', 'Hello, world!') + await Actor.exit() + except Exception as e: + print('Error while running Actor', e) + await Actor.fail(exit_code=ActorExitCodes.ERROR_USER_FUNCTION_THREW, exception=e) + +asyncio.run(main()) +``` + +#### Context manager + +So that you don't have to call the lifecycle methods manually, the `Actor` class provides a context manager, +which calls the `Actor.init()` method on enter, +the `Actor.exit()` method on a clean exit, +and the `Actor.fail()` method when there is an exception during the run of the Actor. + +This is the recommended way to work with the `Actor` class. + +```python title="src/main.py" +import asyncio +from apify import Actor + +async def main(): + async with Actor: + print('Actor input:', await Actor.get_input()) + await Actor.set_value('OUTPUT', 'Hello, world!') + +asyncio.run(main()) +``` + +#### Main function + +Another option is to pass a function to the Actor via the `Actor.main(main_func)` method, +which causes the Actor to initialize, run the main function, and exit, catching any runtime errors in the passed function. + +```python title="src/main.py" +import asyncio +from apify import Actor + +async def actor_main_func(): + print('Actor input:', await Actor.get_input()) + await Actor.set_value('OUTPUT', 'Hello, world!') + +async def main(): + await Actor.main(actor_main_func) + +asyncio.run(main()) +``` diff --git a/website/versioned_docs/version-0.2/02-concepts/02-storages.mdx b/website/versioned_docs/version-0.2/02-concepts/02-storages.mdx new file mode 100644 index 000000000..de77cde12 --- /dev/null +++ b/website/versioned_docs/version-0.2/02-concepts/02-storages.mdx @@ -0,0 +1,40 @@ +--- +title: Working with storages +sidebar_label: Storages +--- + +The `Actor` class provides methods to work either with the default storages of the Actor, or with any other storage, named or unnamed. + +## Convenience methods for default storages + +There are several methods for directly working with the default key-value store or default dataset of the Actor. + +- `Actor.get_value('my-record')` reads a record from the default key-value store of the Actor. +- `Actor.set_value('my-record', 'my-value')` saves a new value to the record in the default key-value store. +- `Actor.get_input()` reads the Actor input from the default key-value store of the Actor. +- `Actor.push_data([{'result': 'Hello, world!'}, ...])` saves results to the default dataset of the Actor. + +## Opening other storages + +The `Actor.open_dataset()`, `Actor.open_key_value_store()` and `Actor.open_request_queue()` methods can be used to open any storage for reading and writing. You can either use them without arguments to open the default storages, or you can pass a storage ID or name to open another storage. + +```python +import asyncio +from apify import Actor + +async def main(): + async with Actor: + # Work with the default dataset of the Actor + dataset = await Actor.open_dataset() + await dataset.push_data({'result': 'Hello, world!'}) + + # Work with the key-value store with ID 'mIJVZsRQrDQf4rUAf' + key_value_store = await Actor.open_key_value_store(id='mIJVZsRQrDQf4rUAf') + await key_value_store.set_value('record', 'Hello, world!') + + # Work with the request queue with name 'my-queue' + request_queue = await Actor.open_request_queue(name='my-queue') + await request_queue.add_request({'uniqueKey': 'v0Ngr', 'url': 'https://example.com'}) + +asyncio.run(main()) +``` diff --git a/website/versioned_docs/version-0.2/02-concepts/03-proxy-management.mdx b/website/versioned_docs/version-0.2/02-concepts/03-proxy-management.mdx new file mode 100644 index 000000000..e91ceee8e --- /dev/null +++ b/website/versioned_docs/version-0.2/02-concepts/03-proxy-management.mdx @@ -0,0 +1,45 @@ +--- +title: Proxy management +sidebar_label: Proxy management +--- + +To work with proxies in your Actor, you can use the `Actor.create_proxy_configuration()` method, which allows you to generate proxy URLs either for the Apify Proxy, or even for your own proxies, with automatic proxy rotation and support for sessions. + +```python +import asyncio +import httpx +from apify import Actor + +async def main(): + async with Actor: + # You can either set the proxy config manually + proxy_configuration = await Actor.create_proxy_configuration( + groups=['RESIDENTIAL'], + country_code='US', + ) + + # --- OR --- + # You can get the proxy config from the Actor input + actor_input = await Actor.get_input() + selected_proxy_config = actor_input['proxyConfiguration'] + proxy_configuration = await Actor.create_proxy_configuration( + actor_proxy_input=selected_proxy_config, + ) + + # --- OR --- + # You can use your own proxy servers + proxy_configuration = await Actor.create_proxy_configuration( + proxy_urls=[ + 'http://my-proxy.com:8000', + 'http://my-other-proxy.com:8000', + ], + ) + + proxy_url = await proxy_configuration.new_url(session_id='my_session') + + async with httpx.AsyncClient(proxies=proxy_url) as client: + response = await client.get('http://example.com') + await Actor.set_value('OUTPUT', response.text) + +asyncio.run(main()) +``` diff --git a/website/versioned_docs/version-0.2/02-concepts/04-actor-events.mdx b/website/versioned_docs/version-0.2/02-concepts/04-actor-events.mdx new file mode 100644 index 000000000..4c933961a --- /dev/null +++ b/website/versioned_docs/version-0.2/02-concepts/04-actor-events.mdx @@ -0,0 +1,52 @@ +--- +title: Actor events +sidebar_label: Actor events +--- + +The Apify platform sends several events to the Actor. If you want to work with them, you can use the `Actor.on()` and `Actor.off()` methods. + +## Available events + +- **`ActorEventTypes.SYSTEM_INFO`** — Emitted every minute, the event data contains info about the resource usage of the Actor. +- **`ActorEventTypes.MIGRATING`** — Emitted when the Actor running on the Apify platform is going to be migrated to another worker server soon. You can use it to persist the state of the Actor and abort the run, to speed up the migration. +- **`ActorEventTypes.PERSIST_STATE`** — Emitted in regular intervals (by default 60 seconds) to notify the Actor that it should persist its state, in order to avoid repeating all work when the Actor restarts. +- **`ActorEventTypes.ABORTING`** — When a user aborts an Actor run on the Apify platform, they can choose to abort gracefully to allow the Actor some time before getting terminated. + +## Example + +```python +import asyncio +from pprint import pprint +from apify import Actor +from apify.consts import ActorEventTypes + +async def print_system_info(event_data): + print('Actor system info from platform:') + pprint(event_data) + +async def react_to_abort(event_data): + print('The Actor is aborting!') + pprint(event_data) + +async def persist_state(event_data): + print('The Actor should persist its state!') + pprint(event_data) + # Add your state persisting logic here + +async def main(): + async with Actor: + Actor.on(ActorEventTypes.SYSTEM_INFO, print_system_info) + Actor.on(ActorEventTypes.ABORTING, react_to_abort) + Actor.on(ActorEventTypes.PERSIST_STATE, persist_state) + + # Do some work here + ... + + # Remove the event handler when no longer needed + Actor.off(ActorEventTypes.SYSTEM_INFO, print_system_info) + + # Do some more work here + ... + +asyncio.run(main()) +``` diff --git a/website/versioned_docs/version-0.2/02-concepts/05-access-apify-api.mdx b/website/versioned_docs/version-0.2/02-concepts/05-access-apify-api.mdx new file mode 100644 index 000000000..fb1aa616a --- /dev/null +++ b/website/versioned_docs/version-0.2/02-concepts/05-access-apify-api.mdx @@ -0,0 +1,21 @@ +--- +title: Direct access to the Apify API +sidebar_label: Apify API access +--- + +If you need to access the Apify API directly, you can use the pre-configured Apify API client, available in the `Actor.apify_client` property, without having to set the API token manually. + +```python +import asyncio +from apify import Actor + +async def main(): + async with Actor: + client = Actor.apify_client + me = await client.user('me').get() + print(me) + +asyncio.run(main()) +``` + +The Apify API client is an instance of the [`ApifyClientAsync`](https://docs.apify.com/api/client/python) class from the `apify-client` package. See its documentation for more information on how to use it. diff --git a/website/versioned_docs/version-0.2/api-packages.json b/website/versioned_docs/version-0.2/api-packages.json new file mode 100644 index 000000000..e2e41f0d3 --- /dev/null +++ b/website/versioned_docs/version-0.2/api-packages.json @@ -0,0 +1 @@ +[{"entryPoints":{"index":{"label":"Index","path":"src/index.ts"}},"packageRoot":".","packagePath":".","packageSlug":".","packageName":"apify-sdk-python"}] diff --git a/website/versioned_docs/version-0.2/api-typedoc.json b/website/versioned_docs/version-0.2/api-typedoc.json new file mode 100644 index 000000000..8a7c8fa5b --- /dev/null +++ b/website/versioned_docs/version-0.2/api-typedoc.json @@ -0,0 +1,6356 @@ +{ + "id": 0, + "name": "apify", + "kind": 1, + "kindString": "Project", + "flags": {}, + "originalName": "", + "children": [ + { + "id": 1, + "name": "Actor", + "module": "actor", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The main class of the SDK, through which all the actor operations should be done.\"]}" + } + ] + }, + "children": [ + { + "id": 2, + "name": "__init__", + "module": "actor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create an Actor instance.\\n\\nNote that you don't have to do this, all the methods on this class function as classmethods too,\\nand that is their preferred usage.\\n\\nArgs:\\n config (Configuration, optional): The actor configuration to be used. If not passed, a new Configuration instance will be created.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 76, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L76" + } + ], + "signatures": [ + { + "id": 4, + "name": "__init__", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create an Actor instance.\\n\\nNote that you don't have to do this, all the methods on this class function as classmethods too,\\nand that is their preferred usage.\\n\\nArgs:\\n config (Configuration, optional): The actor configuration to be used. If not passed, a new Configuration instance will be created.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 3, + "name": "config", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[Configuration]" + }, + "defaultValue": "None" + } + ] + } + ] + }, + { + "id": 5, + "name": "apify_client", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The ApifyClientAsync instance the Actor instance uses.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 169, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L169" + } + ], + "signatures": [ + { + "id": 7, + "name": "apify_client", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The ApifyClientAsync instance the Actor instance uses.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "ApifyClientAsync" + }, + "parameters": [ + { + "id": 6, + "name": "self_or_cls", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Any" + } + } + ] + } + ] + }, + { + "id": 8, + "name": "config", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The Configuration instance the Actor instance uses.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 177, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L177" + } + ], + "signatures": [ + { + "id": 10, + "name": "config", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The Configuration instance the Actor instance uses.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Configuration" + }, + "parameters": [ + { + "id": 9, + "name": "self_or_cls", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Any" + } + } + ] + } + ] + }, + { + "id": 11, + "name": "event_manager", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The EventManager instance the Actor instance uses.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 185, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L185" + } + ], + "signatures": [ + { + "id": 13, + "name": "event_manager", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The EventManager instance the Actor instance uses.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "EventManager" + }, + "parameters": [ + { + "id": 12, + "name": "self_or_cls", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Any" + } + } + ] + } + ] + }, + { + "id": 14, + "name": "log", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The logging.Logger instance the Actor uses.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 193, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L193" + } + ], + "signatures": [ + { + "id": 16, + "name": "log", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The logging.Logger instance the Actor uses.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "logging.Logger" + }, + "parameters": [ + { + "id": 15, + "name": "_self_or_cls", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Any" + } + } + ] + } + ] + }, + { + "id": 17, + "name": "init", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Initialize the actor instance.\\n\\nThis initializes the Actor instance.\\nIt configures the right storage client based on whether the actor is running locally or on the Apify platform,\\nit initializes the event manager for processing actor events,\\nand starts an interval for regularly sending `PERSIST_STATE` events,\\nso that the actor can regularly persist its state in response to these events.\\n\\nThis method should be called immediately before performing any additional actor actions,\\nand it should be called only once.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 202, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L202" + } + ], + "signatures": [ + { + "id": 18, + "name": "init", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Initialize the actor instance.\\n\\nThis initializes the Actor instance.\\nIt configures the right storage client based on whether the actor is running locally or on the Apify platform,\\nit initializes the event manager for processing actor events,\\nand starts an interval for regularly sending `PERSIST_STATE` events,\\nso that the actor can regularly persist its state in response to these events.\\n\\nThis method should be called immediately before performing any additional actor actions,\\nand it should be called only once.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 19, + "name": "exit", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Exit the actor instance.\\n\\nThis stops the Actor instance.\\nIt cancels all the intervals for regularly sending `PERSIST_STATE` events,\\nsends a final `PERSIST_STATE` event,\\nwaits for all the event listeners to finish,\\nand stops the event manager.\\n\\nArgs:\\n exit_code (int, optional): The exit code with which the actor should fail (defaults to `0`).\\n event_listeners_timeout_secs (float, optional): How long should the actor wait for actor event listeners to finish before exiting\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 299, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L299" + } + ], + "signatures": [ + { + "id": 22, + "name": "exit", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Exit the actor instance.\\n\\nThis stops the Actor instance.\\nIt cancels all the intervals for regularly sending `PERSIST_STATE` events,\\nsends a final `PERSIST_STATE` event,\\nwaits for all the event listeners to finish,\\nand stops the event manager.\\n\\nArgs:\\n exit_code (int, optional): The exit code with which the actor should fail (defaults to `0`).\\n event_listeners_timeout_secs (float, optional): How long should the actor wait for actor event listeners to finish before exiting\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 20, + "name": "exit_code", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "int" + }, + "defaultValue": "0" + }, + { + "id": 21, + "name": "event_listeners_timeout_secs", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[float]" + }, + "defaultValue": "EVENT_LISTENERS_TIMEOUT_SECS" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 23, + "name": "fail", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Fail the actor instance.\\n\\nThis performs all the same steps as Actor.exit(),\\nbut it additionally sets the exit code to `1` (by default).\\n\\nArgs:\\n exit_code (int, optional): The exit code with which the actor should fail (defaults to `1`).\\n exception (BaseException, optional): The exception with which the actor failed.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 360, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L360" + } + ], + "signatures": [ + { + "id": 26, + "name": "fail", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Fail the actor instance.\\n\\nThis performs all the same steps as Actor.exit(),\\nbut it additionally sets the exit code to `1` (by default).\\n\\nArgs:\\n exit_code (int, optional): The exit code with which the actor should fail (defaults to `1`).\\n exception (BaseException, optional): The exception with which the actor failed.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 24, + "name": "exit_code", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "int" + }, + "defaultValue": "1" + }, + { + "id": 25, + "name": "exception", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[BaseException]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 27, + "name": "main", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Initialize the actor, run the passed function and finish the actor cleanly.\\n\\n**The `Actor.main()` function is optional** and is provided merely for your convenience.\\nIt is mainly useful when you're running your code as an actor on the [Apify platform](https://apify.com/actors).\\n\\nThe `Actor.main()` function performs the following actions:\\n\\n- When running on the Apify platform (i.e. `APIFY_IS_AT_HOME` environment variable is set),\\n it sets up a connection to listen for platform events.\\n For example, to get a notification about an imminent migration to another server.\\n- It invokes the user function passed as the `main_actor_function` parameter.\\n- If the user function was an async function, it awaits it.\\n- If the user function throws an exception or some other error is encountered,\\n it prints error details to console so that they are stored to the log,\\n and finishes the actor cleanly.\\n- Finally, it exits the Python process, with zero exit code on success and non-zero on errors.\\n\\nArgs:\\n main_actor_function (Callable): The user function which should be run in the actor\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 396, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L396" + } + ], + "signatures": [ + { + "id": 29, + "name": "main", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Initialize the actor, run the passed function and finish the actor cleanly.\\n\\n**The `Actor.main()` function is optional** and is provided merely for your convenience.\\nIt is mainly useful when you're running your code as an actor on the [Apify platform](https://apify.com/actors).\\n\\nThe `Actor.main()` function performs the following actions:\\n\\n- When running on the Apify platform (i.e. `APIFY_IS_AT_HOME` environment variable is set),\\n it sets up a connection to listen for platform events.\\n For example, to get a notification about an imminent migration to another server.\\n- It invokes the user function passed as the `main_actor_function` parameter.\\n- If the user function was an async function, it awaits it.\\n- If the user function throws an exception or some other error is encountered,\\n it prints error details to console so that they are stored to the log,\\n and finishes the actor cleanly.\\n- Finally, it exits the Python process, with zero exit code on success and non-zero on errors.\\n\\nArgs:\\n main_actor_function (Callable): The user function which should be run in the actor\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[MainReturnType]" + }, + "parameters": [ + { + "id": 28, + "name": "main_actor_function", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Callable[[], MainReturnType]" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 30, + "name": "new_client", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return a new instance of the Apify API client.\\n\\nThe `ApifyClientAsync` class is provided by the [apify-client](https://github.com/apify/apify-client-python) package,\\nand it is automatically configured using the `APIFY_API_BASE_URL` and `APIFY_TOKEN` environment variables.\\n\\nYou can override the token via the available options.\\nThat's useful if you want to use the client as a different Apify user than the SDK internals are using.\\n\\nArgs:\\n token (str, optional): The Apify API token\\n api_url (str, optional): The URL of the Apify API server to which to connect to. Defaults to https://api.apify.com\\n max_retries (int, optional): How many times to retry a failed request at most\\n min_delay_between_retries_millis (int, optional): How long will the client wait between retrying requests\\n (increases exponentially from this value)\\n timeout_secs (int, optional): The socket timeout of the HTTP requests sent to the Apify API\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 441, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L441" + } + ], + "signatures": [ + { + "id": 36, + "name": "new_client", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return a new instance of the Apify API client.\\n\\nThe `ApifyClientAsync` class is provided by the [apify-client](https://github.com/apify/apify-client-python) package,\\nand it is automatically configured using the `APIFY_API_BASE_URL` and `APIFY_TOKEN` environment variables.\\n\\nYou can override the token via the available options.\\nThat's useful if you want to use the client as a different Apify user than the SDK internals are using.\\n\\nArgs:\\n token (str, optional): The Apify API token\\n api_url (str, optional): The URL of the Apify API server to which to connect to. Defaults to https://api.apify.com\\n max_retries (int, optional): How many times to retry a failed request at most\\n min_delay_between_retries_millis (int, optional): How long will the client wait between retrying requests\\n (increases exponentially from this value)\\n timeout_secs (int, optional): The socket timeout of the HTTP requests sent to the Apify API\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "ApifyClientAsync" + }, + "parameters": [ + { + "id": 31, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 32, + "name": "api_url", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 33, + "name": "max_retries", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 34, + "name": "min_delay_between_retries_millis", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 35, + "name": "timeout_secs", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + } + ] + } + ] + }, + { + "id": 37, + "name": "open_dataset", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a dataset.\\n\\nDatasets are used to store structured data where each object stored has the same attributes,\\nsuch as online store products or real estate offers.\\nThe actual data is stored either on the local filesystem or in the Apify cloud.\\n\\nArgs:\\n id (str, optional): ID of the dataset to be opened.\\n If neither `id` nor `name` are provided, the method returns the default dataset associated with the actor run.\\n name (str, optional): Name of the dataset to be opened.\\n If neither `id` nor `name` are provided, the method returns the default dataset associated with the actor run.\\n force_cloud (bool, optional): If set to `True` then the Apify cloud storage is always used.\\n This way it is possible to combine local and cloud storage.\\n\\nReturns:\\n Dataset: An instance of the `Dataset` class for the given ID or name.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 497, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L497" + } + ], + "signatures": [ + { + "id": 41, + "name": "open_dataset", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a dataset.\\n\\nDatasets are used to store structured data where each object stored has the same attributes,\\nsuch as online store products or real estate offers.\\nThe actual data is stored either on the local filesystem or in the Apify cloud.\\n\\nArgs:\\n id (str, optional): ID of the dataset to be opened.\\n If neither `id` nor `name` are provided, the method returns the default dataset associated with the actor run.\\n name (str, optional): Name of the dataset to be opened.\\n If neither `id` nor `name` are provided, the method returns the default dataset associated with the actor run.\\n force_cloud (bool, optional): If set to `True` then the Apify cloud storage is always used.\\n This way it is possible to combine local and cloud storage.\\n\\nReturns:\\n Dataset: An instance of the `Dataset` class for the given ID or name.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Dataset" + }, + "parameters": [ + { + "id": 38, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 39, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 40, + "name": "force_cloud", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "bool" + }, + "defaultValue": "False" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 42, + "name": "open_key_value_store", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a key-value store.\\n\\nKey-value stores are used to store records or files, along with their MIME content type.\\nThe records are stored and retrieved using a unique key.\\nThe actual data is stored either on a local filesystem or in the Apify cloud.\\n\\nArgs:\\n id (str, optional): ID of the key-value store to be opened.\\n If neither `id` nor `name` are provided, the method returns the default key-value store associated with the actor run.\\n name (str, optional): Name of the key-value store to be opened.\\n If neither `id` nor `name` are provided, the method returns the default key-value store associated with the actor run.\\n force_cloud (bool, optional): If set to `True` then the Apify cloud storage is always used.\\n This way it is possible to combine local and cloud storage.\\n\\nReturns:\\n KeyValueStore: An instance of the `KeyValueStore` class for the given ID or name.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 524, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L524" + } + ], + "signatures": [ + { + "id": 46, + "name": "open_key_value_store", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a key-value store.\\n\\nKey-value stores are used to store records or files, along with their MIME content type.\\nThe records are stored and retrieved using a unique key.\\nThe actual data is stored either on a local filesystem or in the Apify cloud.\\n\\nArgs:\\n id (str, optional): ID of the key-value store to be opened.\\n If neither `id` nor `name` are provided, the method returns the default key-value store associated with the actor run.\\n name (str, optional): Name of the key-value store to be opened.\\n If neither `id` nor `name` are provided, the method returns the default key-value store associated with the actor run.\\n force_cloud (bool, optional): If set to `True` then the Apify cloud storage is always used.\\n This way it is possible to combine local and cloud storage.\\n\\nReturns:\\n KeyValueStore: An instance of the `KeyValueStore` class for the given ID or name.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "KeyValueStore" + }, + "parameters": [ + { + "id": 43, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 44, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 45, + "name": "force_cloud", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "bool" + }, + "defaultValue": "False" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 47, + "name": "open_request_queue", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a request queue.\\n\\nRequest queue represents a queue of URLs to crawl, which is stored either on local filesystem or in the Apify cloud.\\nThe queue is used for deep crawling of websites, where you start with several URLs and then\\nrecursively follow links to other pages. The data structure supports both breadth-first\\nand depth-first crawling orders.\\n\\nArgs:\\n id (str, optional): ID of the request queue to be opened.\\n If neither `id` nor `name` are provided, the method returns the default request queue associated with the actor run.\\n name (str, optional): Name of the request queue to be opened.\\n If neither `id` nor `name` are provided, the method returns the default request queue associated with the actor run.\\n force_cloud (bool, optional): If set to `True` then the Apify cloud storage is always used.\\n This way it is possible to combine local and cloud storage.\\n\\nReturns:\\n RequestQueue: An instance of the `RequestQueue` class for the given ID or name.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 556, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L556" + } + ], + "signatures": [ + { + "id": 51, + "name": "open_request_queue", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a request queue.\\n\\nRequest queue represents a queue of URLs to crawl, which is stored either on local filesystem or in the Apify cloud.\\nThe queue is used for deep crawling of websites, where you start with several URLs and then\\nrecursively follow links to other pages. The data structure supports both breadth-first\\nand depth-first crawling orders.\\n\\nArgs:\\n id (str, optional): ID of the request queue to be opened.\\n If neither `id` nor `name` are provided, the method returns the default request queue associated with the actor run.\\n name (str, optional): Name of the request queue to be opened.\\n If neither `id` nor `name` are provided, the method returns the default request queue associated with the actor run.\\n force_cloud (bool, optional): If set to `True` then the Apify cloud storage is always used.\\n This way it is possible to combine local and cloud storage.\\n\\nReturns:\\n RequestQueue: An instance of the `RequestQueue` class for the given ID or name.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "RequestQueue" + }, + "parameters": [ + { + "id": 48, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 49, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 50, + "name": "force_cloud", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "bool" + }, + "defaultValue": "False" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 52, + "name": "push_data", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Store an object or a list of objects to the default dataset of the current actor run.\\n\\nArgs:\\n data (object or list of objects, optional): The data to push to the default dataset.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 589, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L589" + } + ], + "signatures": [ + { + "id": 54, + "name": "push_data", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Store an object or a list of objects to the default dataset of the current actor run.\\n\\nArgs:\\n data (object or list of objects, optional): The data to push to the default dataset.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 53, + "name": "data", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Any" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 55, + "name": "get_input", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get the actor input value from the default key-value store associated with the current actor run.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 607, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L607" + } + ], + "signatures": [ + { + "id": 56, + "name": "get_input", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get the actor input value from the default key-value store associated with the current actor run.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Any" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 57, + "name": "get_value", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get a value from the default key-value store associated with the current actor run.\\n\\nArgs:\\n key (str): The key of the record which to retrieve.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 627, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L627" + } + ], + "signatures": [ + { + "id": 59, + "name": "get_value", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get a value from the default key-value store associated with the current actor run.\\n\\nArgs:\\n key (str): The key of the record which to retrieve.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Any" + }, + "parameters": [ + { + "id": 58, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 60, + "name": "set_value", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Set or delete a value in the default key-value store associated with the current actor run.\\n\\nArgs:\\n key (str): The key of the record which to set.\\n value (any): The value of the record which to set, or None, if the record should be deleted.\\n content_type (str, optional): The content type which should be set to the value.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 643, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L643" + } + ], + "signatures": [ + { + "id": 64, + "name": "set_value", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Set or delete a value in the default key-value store associated with the current actor run.\\n\\nArgs:\\n key (str): The key of the record which to set.\\n value (any): The value of the record which to set, or None, if the record should be deleted.\\n content_type (str, optional): The content type which should be set to the value.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 61, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 62, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Any" + } + }, + { + "id": 63, + "name": "content_type", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 65, + "name": "on", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Add an event listener to the actor's event manager.\\n\\nThe following events can be emitted:\\n - `ActorEventTypes.SYSTEM_INFO`:\\n Emitted every minute, the event data contains info about the resource usage of the actor.\\n - `ActorEventTypes.MIGRATING`:\\n Emitted when the actor running on the Apify platform is going to be migrated to another worker server soon.\\n You can use it to persist the state of the actor and abort the run, to speed up the migration.\\n - `ActorEventTypes.PERSIST_STATE`:\\n Emitted in regular intervals (by default 60 seconds) to notify the actor that it should persist its state,\\n in order to avoid repeating all work when the actor restarts.\\n This event is automatically emitted together with the migrating event,\\n in which case the `isMigrating` flag in the event data is set to True, otherwise the flag is False.\\n Note that this event is provided merely for your convenience,\\n you can achieve the same effect using an interval and listening for the migrating event.\\n - `ActorEventTypes.ABORTING`:\\n When a user aborts an actor run on the Apify platform,\\n they can choose to abort it gracefully, to allow the actor some time before getting terminated.\\n This graceful abort emits the aborting event, which you can use to clean up the actor state.\\n\\nArgs:\\n event_name (ActorEventTypes): The actor event for which to listen to.\\n listener (Callable): The function which is to be called when the event is emitted (can be async).\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 676, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L676" + } + ], + "signatures": [ + { + "id": 68, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Add an event listener to the actor's event manager.\\n\\nThe following events can be emitted:\\n - `ActorEventTypes.SYSTEM_INFO`:\\n Emitted every minute, the event data contains info about the resource usage of the actor.\\n - `ActorEventTypes.MIGRATING`:\\n Emitted when the actor running on the Apify platform is going to be migrated to another worker server soon.\\n You can use it to persist the state of the actor and abort the run, to speed up the migration.\\n - `ActorEventTypes.PERSIST_STATE`:\\n Emitted in regular intervals (by default 60 seconds) to notify the actor that it should persist its state,\\n in order to avoid repeating all work when the actor restarts.\\n This event is automatically emitted together with the migrating event,\\n in which case the `isMigrating` flag in the event data is set to True, otherwise the flag is False.\\n Note that this event is provided merely for your convenience,\\n you can achieve the same effect using an interval and listening for the migrating event.\\n - `ActorEventTypes.ABORTING`:\\n When a user aborts an actor run on the Apify platform,\\n they can choose to abort it gracefully, to allow the actor some time before getting terminated.\\n This graceful abort emits the aborting event, which you can use to clean up the actor state.\\n\\nArgs:\\n event_name (ActorEventTypes): The actor event for which to listen to.\\n listener (Callable): The function which is to be called when the event is emitted (can be async).\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Callable" + }, + "parameters": [ + { + "id": 66, + "name": "event_name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "ActorEventTypes" + } + }, + { + "id": 67, + "name": "listener", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Callable" + } + } + ] + } + ] + }, + { + "id": 69, + "name": "off", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Remove a listener, or all listeners, from an actor event.\\n\\nArgs:\\n event_name (ActorEventTypes): The actor event for which to remove listeners.\\n listener (Callable, optional): The listener which is supposed to be removed. If not passed, all listeners of this event are removed.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 709, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L709" + } + ], + "signatures": [ + { + "id": 72, + "name": "off", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Remove a listener, or all listeners, from an actor event.\\n\\nArgs:\\n event_name (ActorEventTypes): The actor event for which to remove listeners.\\n listener (Callable, optional): The listener which is supposed to be removed. If not passed, all listeners of this event are removed.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 70, + "name": "event_name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "ActorEventTypes" + } + }, + { + "id": 71, + "name": "listener", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[Callable]" + }, + "defaultValue": "None" + } + ] + } + ] + }, + { + "id": 73, + "name": "is_at_home", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return `True` when the actor is running on the Apify platform, and `False` otherwise (for example when running locally).\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 724, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L724" + } + ], + "signatures": [ + { + "id": 74, + "name": "is_at_home", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return `True` when the actor is running on the Apify platform, and `False` otherwise (for example when running locally).\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "bool" + }, + "parameters": [] + } + ] + }, + { + "id": 75, + "name": "get_env", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return a dictionary with information parsed from all the `APIFY_XXX` environment variables.\\n\\nFor a list of all the environment variables,\\nsee the [Actor documentation](https://docs.apify.com/actors/development/environment-variables).\\nIf some variables are not defined or are invalid, the corresponding value in the resulting dictionary will be None.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 732, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L732" + } + ], + "signatures": [ + { + "id": 76, + "name": "get_env", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return a dictionary with information parsed from all the `APIFY_XXX` environment variables.\\n\\nFor a list of all the environment variables,\\nsee the [Actor documentation](https://docs.apify.com/actors/development/environment-variables).\\nIf some variables are not defined or are invalid, the corresponding value in the resulting dictionary will be None.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Dict" + }, + "parameters": [] + } + ] + }, + { + "id": 77, + "name": "start", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Run an actor on the Apify platform.\\n\\nUnlike `Actor.call`, this method just starts the run without waiting for finish.\\n\\nArgs:\\n actor_id (str): The ID of the actor to be run.\\n run_input (Any, optional): The input to pass to the actor run.\\n token (str, optional): The Apify API token to use for this request (defaults to the `APIFY_TOKEN` environment variable).\\n content_type (str, optional): The content type of the input.\\n build (str, optional): Specifies the actor build to run. It can be either a build tag or build number.\\n By default, the run uses the build specified in the default run configuration for the actor (typically latest).\\n memory_mbytes (int, optional): Memory limit for the run, in megabytes.\\n By default, the run uses a memory limit specified in the default run configuration for the actor.\\n timeout_secs (int, optional): Optional timeout for the run, in seconds.\\n By default, the run uses timeout specified in the default run configuration for the actor.\\n wait_for_finish (int, optional): The maximum number of seconds the server waits for the run to finish.\\n By default, it is 0, the maximum value is 300.\\n webhooks (list of dict, optional): Optional ad-hoc webhooks (https://docs.apify.com/webhooks/ad-hoc-webhooks)\\n associated with the actor run which can be used to receive a notification,\\n e.g. when the actor finished or failed.\\n If you already have a webhook set up for the actor or task, you do not have to add it again here.\\n Each webhook is represented by a dictionary containing these items:\\n * ``event_types``: list of ``WebhookEventType`` values which trigger the webhook\\n * ``request_url``: URL to which to send the webhook HTTP request\\n * ``payload_template`` (optional): Optional template for the request payload\\n\\nReturns:\\n dict: Info about the started actor run\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 749, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L749" + } + ], + "signatures": [ + { + "id": 87, + "name": "start", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Run an actor on the Apify platform.\\n\\nUnlike `Actor.call`, this method just starts the run without waiting for finish.\\n\\nArgs:\\n actor_id (str): The ID of the actor to be run.\\n run_input (Any, optional): The input to pass to the actor run.\\n token (str, optional): The Apify API token to use for this request (defaults to the `APIFY_TOKEN` environment variable).\\n content_type (str, optional): The content type of the input.\\n build (str, optional): Specifies the actor build to run. It can be either a build tag or build number.\\n By default, the run uses the build specified in the default run configuration for the actor (typically latest).\\n memory_mbytes (int, optional): Memory limit for the run, in megabytes.\\n By default, the run uses a memory limit specified in the default run configuration for the actor.\\n timeout_secs (int, optional): Optional timeout for the run, in seconds.\\n By default, the run uses timeout specified in the default run configuration for the actor.\\n wait_for_finish (int, optional): The maximum number of seconds the server waits for the run to finish.\\n By default, it is 0, the maximum value is 300.\\n webhooks (list of dict, optional): Optional ad-hoc webhooks (https://docs.apify.com/webhooks/ad-hoc-webhooks)\\n associated with the actor run which can be used to receive a notification,\\n e.g. when the actor finished or failed.\\n If you already have a webhook set up for the actor or task, you do not have to add it again here.\\n Each webhook is represented by a dictionary containing these items:\\n * ``event_types``: list of ``WebhookEventType`` values which trigger the webhook\\n * ``request_url``: URL to which to send the webhook HTTP request\\n * ``payload_template`` (optional): Optional template for the request payload\\n\\nReturns:\\n dict: Info about the started actor run\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Dict" + }, + "parameters": [ + { + "id": 78, + "name": "actor_id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 79, + "name": "run_input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[Any]" + }, + "defaultValue": "None" + }, + { + "id": 80, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 81, + "name": "content_type", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 82, + "name": "build", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 83, + "name": "memory_mbytes", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 84, + "name": "timeout_secs", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 85, + "name": "wait_for_finish", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 86, + "name": "webhooks", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[Dict]]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 88, + "name": "abort", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Abort given actor run on the Apify platform using the current user account (determined by the `APIFY_TOKEN` environment variable).\\n\\nArgs:\\n run_id (str): The ID of the actor run to be aborted.\\n token (str, optional): The Apify API token to use for this request (defaults to the `APIFY_TOKEN` environment variable).\\n gracefully (bool, optional): If True, the actor run will abort gracefully.\\n It will send ``aborting`` and ``persistStates`` events into the run and force-stop the run after 30 seconds.\\n It is helpful in cases where you plan to resurrect the run later.\\n\\nReturns:\\n dict: Info about the aborted actor run\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 834, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L834" + } + ], + "signatures": [ + { + "id": 92, + "name": "abort", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Abort given actor run on the Apify platform using the current user account (determined by the `APIFY_TOKEN` environment variable).\\n\\nArgs:\\n run_id (str): The ID of the actor run to be aborted.\\n token (str, optional): The Apify API token to use for this request (defaults to the `APIFY_TOKEN` environment variable).\\n gracefully (bool, optional): If True, the actor run will abort gracefully.\\n It will send ``aborting`` and ``persistStates`` events into the run and force-stop the run after 30 seconds.\\n It is helpful in cases where you plan to resurrect the run later.\\n\\nReturns:\\n dict: Info about the aborted actor run\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Dict" + }, + "parameters": [ + { + "id": 89, + "name": "run_id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 90, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 91, + "name": "gracefully", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 93, + "name": "call", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Start an actor on the Apify Platform and wait for it to finish before returning.\\n\\nIt waits indefinitely, unless the wait_secs argument is provided.\\n\\nArgs:\\n actor_id (str): The ID of the actor to be run.\\n run_input (Any, optional): The input to pass to the actor run.\\n token (str, optional): The Apify API token to use for this request (defaults to the `APIFY_TOKEN` environment variable).\\n content_type (str, optional): The content type of the input.\\n build (str, optional): Specifies the actor build to run. It can be either a build tag or build number.\\n By default, the run uses the build specified in the default run configuration for the actor (typically latest).\\n memory_mbytes (int, optional): Memory limit for the run, in megabytes.\\n By default, the run uses a memory limit specified in the default run configuration for the actor.\\n timeout_secs (int, optional): Optional timeout for the run, in seconds.\\n By default, the run uses timeout specified in the default run configuration for the actor.\\n webhooks (list, optional): Optional webhooks (https://docs.apify.com/webhooks) associated with the actor run,\\n which can be used to receive a notification, e.g. when the actor finished or failed.\\n If you already have a webhook set up for the actor, you do not have to add it again here.\\n wait_secs (int, optional): The maximum number of seconds the server waits for the run to finish. If not provided, waits indefinitely.\\n\\nReturns:\\n dict: Info about the started actor run\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 880, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L880" + } + ], + "signatures": [ + { + "id": 103, + "name": "call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Start an actor on the Apify Platform and wait for it to finish before returning.\\n\\nIt waits indefinitely, unless the wait_secs argument is provided.\\n\\nArgs:\\n actor_id (str): The ID of the actor to be run.\\n run_input (Any, optional): The input to pass to the actor run.\\n token (str, optional): The Apify API token to use for this request (defaults to the `APIFY_TOKEN` environment variable).\\n content_type (str, optional): The content type of the input.\\n build (str, optional): Specifies the actor build to run. It can be either a build tag or build number.\\n By default, the run uses the build specified in the default run configuration for the actor (typically latest).\\n memory_mbytes (int, optional): Memory limit for the run, in megabytes.\\n By default, the run uses a memory limit specified in the default run configuration for the actor.\\n timeout_secs (int, optional): Optional timeout for the run, in seconds.\\n By default, the run uses timeout specified in the default run configuration for the actor.\\n webhooks (list, optional): Optional webhooks (https://docs.apify.com/webhooks) associated with the actor run,\\n which can be used to receive a notification, e.g. when the actor finished or failed.\\n If you already have a webhook set up for the actor, you do not have to add it again here.\\n wait_secs (int, optional): The maximum number of seconds the server waits for the run to finish. If not provided, waits indefinitely.\\n\\nReturns:\\n dict: Info about the started actor run\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [ + { + "id": 94, + "name": "actor_id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 95, + "name": "run_input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[Any]" + }, + "defaultValue": "None" + }, + { + "id": 96, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 97, + "name": "content_type", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 98, + "name": "build", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 99, + "name": "memory_mbytes", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 100, + "name": "timeout_secs", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 101, + "name": "webhooks", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[Dict]]" + }, + "defaultValue": "None" + }, + { + "id": 102, + "name": "wait_secs", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 104, + "name": "call_task", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Start an actor task on the Apify Platform and wait for it to finish before returning.\\n\\nIt waits indefinitely, unless the wait_secs argument is provided.\\n\\nNote that an actor task is a saved input configuration and options for an actor.\\nIf you want to run an actor directly rather than an actor task, please use the `Actor.call`\\n\\nArgs:\\n task_id (str): The ID of the actor to be run.\\n task_input (Any, optional): Overrides the input to pass to the actor run.\\n token (str, optional): The Apify API token to use for this request (defaults to the `APIFY_TOKEN` environment variable).\\n content_type (str, optional): The content type of the input.\\n build (str, optional): Specifies the actor build to run. It can be either a build tag or build number.\\n By default, the run uses the build specified in the default run configuration for the actor (typically latest).\\n memory_mbytes (int, optional): Memory limit for the run, in megabytes.\\n By default, the run uses a memory limit specified in the default run configuration for the actor.\\n timeout_secs (int, optional): Optional timeout for the run, in seconds.\\n By default, the run uses timeout specified in the default run configuration for the actor.\\n webhooks (list, optional): Optional webhooks (https://docs.apify.com/webhooks) associated with the actor run,\\n which can be used to receive a notification, e.g. when the actor finished or failed.\\n If you already have a webhook set up for the actor, you do not have to add it again here.\\n wait_secs (int, optional): The maximum number of seconds the server waits for the run to finish. If not provided, waits indefinitely.\\n\\nReturns:\\n dict: Info about the started actor run\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 959, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L959" + } + ], + "signatures": [ + { + "id": 113, + "name": "call_task", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Start an actor task on the Apify Platform and wait for it to finish before returning.\\n\\nIt waits indefinitely, unless the wait_secs argument is provided.\\n\\nNote that an actor task is a saved input configuration and options for an actor.\\nIf you want to run an actor directly rather than an actor task, please use the `Actor.call`\\n\\nArgs:\\n task_id (str): The ID of the actor to be run.\\n task_input (Any, optional): Overrides the input to pass to the actor run.\\n token (str, optional): The Apify API token to use for this request (defaults to the `APIFY_TOKEN` environment variable).\\n content_type (str, optional): The content type of the input.\\n build (str, optional): Specifies the actor build to run. It can be either a build tag or build number.\\n By default, the run uses the build specified in the default run configuration for the actor (typically latest).\\n memory_mbytes (int, optional): Memory limit for the run, in megabytes.\\n By default, the run uses a memory limit specified in the default run configuration for the actor.\\n timeout_secs (int, optional): Optional timeout for the run, in seconds.\\n By default, the run uses timeout specified in the default run configuration for the actor.\\n webhooks (list, optional): Optional webhooks (https://docs.apify.com/webhooks) associated with the actor run,\\n which can be used to receive a notification, e.g. when the actor finished or failed.\\n If you already have a webhook set up for the actor, you do not have to add it again here.\\n wait_secs (int, optional): The maximum number of seconds the server waits for the run to finish. If not provided, waits indefinitely.\\n\\nReturns:\\n dict: Info about the started actor run\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [ + { + "id": 105, + "name": "task_id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 106, + "name": "task_input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[Dict[str, Any]]" + }, + "defaultValue": "None" + }, + { + "id": 107, + "name": "build", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 108, + "name": "memory_mbytes", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 109, + "name": "timeout_secs", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 110, + "name": "webhooks", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[Dict]]" + }, + "defaultValue": "None" + }, + { + "id": 111, + "name": "wait_secs", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 112, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 114, + "name": "metamorph", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Transform this actor run to an actor run of a different actor.\\n\\nThe platform stops the current actor container and starts a new container with the new actor instead.\\nAll the default storages are preserved,\\nand the new input is stored under the `INPUT-METAMORPH-1` key in the same default key-value store.\\n\\nArgs:\\n target_actor_id (str): ID of the target actor that the run should be transformed into\\n run_input (Any, optional): The input to pass to the new run.\\n target_actor_build (str, optional): The build of the target actor. It can be either a build tag or build number.\\n By default, the run uses the build specified in the default run configuration for the target actor (typically the latest build).\\n content_type (str, optional): The content type of the input.\\n custom_after_sleep_millis (int, optional): How long to sleep for after the metamorph, to wait for the container to be stopped.\\n\\nReturns:\\n dict: The actor run data.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 1037, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L1037" + } + ], + "signatures": [ + { + "id": 120, + "name": "metamorph", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Transform this actor run to an actor run of a different actor.\\n\\nThe platform stops the current actor container and starts a new container with the new actor instead.\\nAll the default storages are preserved,\\nand the new input is stored under the `INPUT-METAMORPH-1` key in the same default key-value store.\\n\\nArgs:\\n target_actor_id (str): ID of the target actor that the run should be transformed into\\n run_input (Any, optional): The input to pass to the new run.\\n target_actor_build (str, optional): The build of the target actor. It can be either a build tag or build number.\\n By default, the run uses the build specified in the default run configuration for the target actor (typically the latest build).\\n content_type (str, optional): The content type of the input.\\n custom_after_sleep_millis (int, optional): How long to sleep for after the metamorph, to wait for the container to be stopped.\\n\\nReturns:\\n dict: The actor run data.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 115, + "name": "target_actor_id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 116, + "name": "run_input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[Any]" + }, + "defaultValue": "None" + }, + { + "id": 117, + "name": "target_actor_build", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 118, + "name": "content_type", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 119, + "name": "custom_after_sleep_millis", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 121, + "name": "reboot", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Internally reboot this actor.\\n\\nThe system stops the current container and starts a new one, with the same run ID and default storages.\\n\\nArgs:\\n event_listeners_timeout_secs (int, optional): How long should the actor wait for actor event listeners to finish before exiting\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 1103, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L1103" + } + ], + "signatures": [ + { + "id": 123, + "name": "reboot", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Internally reboot this actor.\\n\\nThe system stops the current container and starts a new one, with the same run ID and default storages.\\n\\nArgs:\\n event_listeners_timeout_secs (int, optional): How long should the actor wait for actor event listeners to finish before exiting\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 122, + "name": "event_listeners_timeout_secs", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "EVENT_LISTENERS_TIMEOUT_SECS" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 124, + "name": "add_webhook", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create an ad-hoc webhook for the current actor run.\\n\\nThis webhook lets you receive a notification when the actor run finished or failed.\\n\\nNote that webhooks are only supported for actors running on the Apify platform.\\nWhen running the actor locally, the function will print a warning and have no effect.\\n\\nFor more information about Apify actor webhooks, please see the [documentation](https://docs.apify.com/webhooks).\\n\\nArgs:\\n event_types (list of WebhookEventType): List of event types that should trigger the webhook. At least one is required.\\n request_url (str): URL that will be invoked once the webhook is triggered.\\n payload_template (str, optional): Specification of the payload that will be sent to request_url\\n ignore_ssl_errors (bool, optional): Whether the webhook should ignore SSL errors returned by request_url\\n do_not_retry (bool, optional): Whether the webhook should retry sending the payload to request_url upon\\n failure.\\n idempotency_key (str, optional): A unique identifier of a webhook. You can use it to ensure that you won't\\n create the same webhook multiple times.\\n\\nReturns:\\n dict: The created webhook\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 1141, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L1141" + } + ], + "signatures": [ + { + "id": 131, + "name": "add_webhook", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create an ad-hoc webhook for the current actor run.\\n\\nThis webhook lets you receive a notification when the actor run finished or failed.\\n\\nNote that webhooks are only supported for actors running on the Apify platform.\\nWhen running the actor locally, the function will print a warning and have no effect.\\n\\nFor more information about Apify actor webhooks, please see the [documentation](https://docs.apify.com/webhooks).\\n\\nArgs:\\n event_types (list of WebhookEventType): List of event types that should trigger the webhook. At least one is required.\\n request_url (str): URL that will be invoked once the webhook is triggered.\\n payload_template (str, optional): Specification of the payload that will be sent to request_url\\n ignore_ssl_errors (bool, optional): Whether the webhook should ignore SSL errors returned by request_url\\n do_not_retry (bool, optional): Whether the webhook should retry sending the payload to request_url upon\\n failure.\\n idempotency_key (str, optional): A unique identifier of a webhook. You can use it to ensure that you won't\\n create the same webhook multiple times.\\n\\nReturns:\\n dict: The created webhook\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Dict" + }, + "parameters": [ + { + "id": 125, + "name": "event_types", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "List[WebhookEventType]" + } + }, + { + "id": 126, + "name": "request_url", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 127, + "name": "payload_template", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 128, + "name": "ignore_ssl_errors", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 129, + "name": "do_not_retry", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 130, + "name": "idempotency_key", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 132, + "name": "set_status_message", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Set the status message for the current actor run.\\n\\nArgs:\\n status_message (str): The status message to set to the run.\\n\\nReturns:\\n dict: The updated actor run object\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 1212, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L1212" + } + ], + "signatures": [ + { + "id": 134, + "name": "set_status_message", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Set the status message for the current actor run.\\n\\nArgs:\\n status_message (str): The status message to set to the run.\\n\\nReturns:\\n dict: The updated actor run object\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [ + { + "id": 133, + "name": "status_message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 135, + "name": "create_proxy_configuration", + "module": "actor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a ProxyConfiguration object with the passed proxy configuration.\\n\\nConfigures connection to a proxy server with the provided options.\\nProxy servers are used to prevent target websites from blocking your crawlers based on IP address rate limits or blacklists.\\n\\nFor more details and code examples, see the `ProxyConfiguration` class.\\n\\nArgs:\\n password (str, optional): Password for the Apify Proxy. If not provided, will use os.environ['APIFY_PROXY_PASSWORD'], if available.\\n groups (list of str, optional): Proxy groups which the Apify Proxy should use, if provided.\\n country_code (str, optional): Country which the Apify Proxy should use, if provided.\\n proxy_urls (list of str, optional): Custom proxy server URLs which should be rotated through.\\n new_url_function (Callable, optional): Function which returns a custom proxy URL to be used.\\n actor_proxy_input (dict, optional): Proxy configuration field from the actor input, if actor has such input field.\\n\\nReturns:\\n ProxyConfiguration, optional: ProxyConfiguration object with the passed configuration,\\n or None, if no proxy should be used based on the configuration.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 1236, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L1236" + } + ], + "signatures": [ + { + "id": 142, + "name": "create_proxy_configuration", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a ProxyConfiguration object with the passed proxy configuration.\\n\\nConfigures connection to a proxy server with the provided options.\\nProxy servers are used to prevent target websites from blocking your crawlers based on IP address rate limits or blacklists.\\n\\nFor more details and code examples, see the `ProxyConfiguration` class.\\n\\nArgs:\\n password (str, optional): Password for the Apify Proxy. If not provided, will use os.environ['APIFY_PROXY_PASSWORD'], if available.\\n groups (list of str, optional): Proxy groups which the Apify Proxy should use, if provided.\\n country_code (str, optional): Country which the Apify Proxy should use, if provided.\\n proxy_urls (list of str, optional): Custom proxy server URLs which should be rotated through.\\n new_url_function (Callable, optional): Function which returns a custom proxy URL to be used.\\n actor_proxy_input (dict, optional): Proxy configuration field from the actor input, if actor has such input field.\\n\\nReturns:\\n ProxyConfiguration, optional: ProxyConfiguration object with the passed configuration,\\n or None, if no proxy should be used based on the configuration.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[ProxyConfiguration]" + }, + "parameters": [ + { + "id": 136, + "name": "password", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 137, + "name": "groups", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 138, + "name": "country_code", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 139, + "name": "proxy_urls", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 140, + "name": "new_url_function", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[Union[Callable[[Optional[str]], str], Callable[[Optional[str]], Awaitable[str]]]]" + }, + "defaultValue": "None" + }, + { + "id": 141, + "name": "actor_proxy_input", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 2 + ] + }, + { + "title": "Methods", + "children": [ + 5, + 8, + 11, + 14, + 17, + 19, + 23, + 27, + 30, + 37, + 42, + 47, + 52, + 55, + 57, + 60, + 65, + 69, + 73, + 75, + 77, + 88, + 93, + 104, + 114, + 121, + 124, + 132, + 135 + ] + } + ], + "sources": [ + { + "filename": "src/apify/actor.py", + "line": 63, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/actor.py#L63" + } + ] + }, + { + "id": 143, + "name": "Configuration", + "module": "config", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"A class for specifying the configuration of an actor.\\n\\nCan be used either globally via `Configuration.get_global_configuration()`,\\nor it can be specific to each `Actor` instance on the `actor.config` property.\"]}" + } + ] + }, + "children": [ + { + "id": 144, + "name": "__init__", + "module": "config", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a `Configuration` instance.\\n\\nAll the parameters are loaded by default from environment variables when running on the Apify platform.\\nYou can override them here in the Configuration constructor, which might be useful for local testing of your actors.\\n\\nArgs:\\n api_base_url (str, optional): The URL of the Apify API.\\n This is the URL actually used for connecting to the API, so it can contain an IP address when running in a container on the platform.\\n api_public_base_url (str, optional): The public URL of the Apify API.\\n This will always contain the public URL of the API, even when running in a container on the platform.\\n Useful for generating shareable URLs to key-value store records or datasets.\\n container_port (int, optional): The port on which the container can listen for HTTP requests.\\n container_url (str, optional): The URL on which the container can listen for HTTP requests.\\n default_dataset_id (str, optional): The ID of the default dataset for the actor.\\n default_key_value_store_id (str, optional): The ID of the default key-value store for the actor.\\n default_request_queue_id (str, optional): The ID of the default request queue for the actor.\\n input_key (str, optional): The key of the input record in the actor's default key-value store\\n max_used_cpu_ratio (float, optional): The CPU usage above which the SYSTEM_INFO event will report the CPU is overloaded.\\n metamorph_after_sleep_millis (int, optional): How long should the actor sleep after calling metamorph.\\n persist_state_interval_millis (int, optional): How often should the actor emit the PERSIST_STATE event.\\n persist_storage (bool, optional): Whether the actor should persist its used storages to the filesystem when running locally.\\n proxy_hostname (str, optional): The hostname of Apify Proxy.\\n proxy_password (str, optional): The password for Apify Proxy.\\n proxy_port (str, optional): The port of Apify Proxy.\\n proxy_status_url (str, optional): The URL on which the Apify Proxy status page is available.\\n purge_on_start (str, optional): Whether the actor should purge its default storages on startup, when running locally.\\n token (str, optional): The API token for the Apify API this actor should use.\\n system_info_interval_millis (str, optional): How often should the actor emit the SYSTEM_INFO event when running locally.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/config.py", + "line": 16, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/config.py#L16" + } + ], + "signatures": [ + { + "id": 164, + "name": "__init__", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a `Configuration` instance.\\n\\nAll the parameters are loaded by default from environment variables when running on the Apify platform.\\nYou can override them here in the Configuration constructor, which might be useful for local testing of your actors.\\n\\nArgs:\\n api_base_url (str, optional): The URL of the Apify API.\\n This is the URL actually used for connecting to the API, so it can contain an IP address when running in a container on the platform.\\n api_public_base_url (str, optional): The public URL of the Apify API.\\n This will always contain the public URL of the API, even when running in a container on the platform.\\n Useful for generating shareable URLs to key-value store records or datasets.\\n container_port (int, optional): The port on which the container can listen for HTTP requests.\\n container_url (str, optional): The URL on which the container can listen for HTTP requests.\\n default_dataset_id (str, optional): The ID of the default dataset for the actor.\\n default_key_value_store_id (str, optional): The ID of the default key-value store for the actor.\\n default_request_queue_id (str, optional): The ID of the default request queue for the actor.\\n input_key (str, optional): The key of the input record in the actor's default key-value store\\n max_used_cpu_ratio (float, optional): The CPU usage above which the SYSTEM_INFO event will report the CPU is overloaded.\\n metamorph_after_sleep_millis (int, optional): How long should the actor sleep after calling metamorph.\\n persist_state_interval_millis (int, optional): How often should the actor emit the PERSIST_STATE event.\\n persist_storage (bool, optional): Whether the actor should persist its used storages to the filesystem when running locally.\\n proxy_hostname (str, optional): The hostname of Apify Proxy.\\n proxy_password (str, optional): The password for Apify Proxy.\\n proxy_port (str, optional): The port of Apify Proxy.\\n proxy_status_url (str, optional): The URL on which the Apify Proxy status page is available.\\n purge_on_start (str, optional): Whether the actor should purge its default storages on startup, when running locally.\\n token (str, optional): The API token for the Apify API this actor should use.\\n system_info_interval_millis (str, optional): How often should the actor emit the SYSTEM_INFO event when running locally.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 145, + "name": "api_base_url", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 146, + "name": "api_public_base_url", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 147, + "name": "container_port", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 148, + "name": "container_url", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 149, + "name": "default_dataset_id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 150, + "name": "default_key_value_store_id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 151, + "name": "default_request_queue_id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 152, + "name": "input_key", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 153, + "name": "max_used_cpu_ratio", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[float]" + }, + "defaultValue": "None" + }, + { + "id": 154, + "name": "metamorph_after_sleep_millis", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 155, + "name": "persist_state_interval_millis", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 156, + "name": "persist_storage", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 157, + "name": "proxy_hostname", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 158, + "name": "proxy_password", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 159, + "name": "proxy_port", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 160, + "name": "proxy_status_url", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 161, + "name": "purge_on_start", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 162, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 163, + "name": "system_info_interval_millis", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + } + ] + } + ] + }, + { + "id": 165, + "name": "get_global_configuration", + "module": "config", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Retrive the global configuration.\\n\\nThe global configuration applies when you call actor methods via their static versions, e.g. `Actor.init()`.\\nAlso accessible via `Actor.config`.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/config.py", + "line": 117, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/config.py#L117" + } + ], + "signatures": [ + { + "id": 166, + "name": "get_global_configuration", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Retrive the global configuration.\\n\\nThe global configuration applies when you call actor methods via their static versions, e.g. `Actor.init()`.\\nAlso accessible via `Actor.config`.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "'Configuration'" + }, + "parameters": [] + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 144 + ] + }, + { + "title": "Methods", + "children": [ + 165 + ] + } + ], + "sources": [ + { + "filename": "src/apify/config.py", + "line": 7, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/config.py#L7" + } + ] + }, + { + "id": 167, + "name": "ProxyInfo", + "module": "proxy_configuration", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Provides information about a proxy connection that is used for requests.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/proxy_configuration.py", + "line": 61, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/proxy_configuration.py#L61" + } + ] + }, + { + "id": 168, + "name": "ProxyConfiguration", + "module": "proxy_configuration", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Configures a connection to a proxy server with the provided options.\\n\\nProxy servers are used to prevent target websites from blocking your crawlers based on IP address rate limits or blacklists.\\nThe default servers used by this class are managed by [Apify Proxy](https://docs.apify.com/proxy).\\nTo be able to use Apify Proxy, you need an Apify account and access to the selected proxies. If you provide no configuration option,\\nthe proxies will be managed automatically using a smart algorithm.\\n\\nIf you want to use your own proxies, use the `proxy_urls` or `new_url_function` constructor options.\\nYour list of proxy URLs will be rotated by the configuration, if this option is provided.\"]}" + } + ] + }, + "children": [ + { + "id": 169, + "name": "__init__", + "module": "proxy_configuration", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a ProxyConfiguration instance. It is highly recommended to use `Actor.create_proxy_configuration()` instead of this.\\n\\nArgs:\\n password (str, optional): Password for the Apify Proxy. If not provided, will use os.environ['APIFY_PROXY_PASSWORD'], if available.\\n groups (list of str, optional): Proxy groups which the Apify Proxy should use, if provided.\\n country_code (str, optional): Country which the Apify Proxy should use, if provided.\\n proxy_urls (list of str, optional): Custom proxy server URLs which should be rotated through.\\n new_url_function (Callable, optional): Function which returns a custom proxy URL to be used.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/proxy_configuration.py", + "line": 127, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/proxy_configuration.py#L127" + } + ], + "signatures": [ + { + "id": 177, + "name": "__init__", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a ProxyConfiguration instance. It is highly recommended to use `Actor.create_proxy_configuration()` instead of this.\\n\\nArgs:\\n password (str, optional): Password for the Apify Proxy. If not provided, will use os.environ['APIFY_PROXY_PASSWORD'], if available.\\n groups (list of str, optional): Proxy groups which the Apify Proxy should use, if provided.\\n country_code (str, optional): Country which the Apify Proxy should use, if provided.\\n proxy_urls (list of str, optional): Custom proxy server URLs which should be rotated through.\\n new_url_function (Callable, optional): Function which returns a custom proxy URL to be used.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 170, + "name": "password", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 171, + "name": "groups", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 172, + "name": "country_code", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 173, + "name": "proxy_urls", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 174, + "name": "new_url_function", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[Union[Callable[[Optional[str]], str], Callable[[Optional[str]], Awaitable[str]]]]" + }, + "defaultValue": "None" + }, + { + "id": 175, + "name": "_actor_config", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[Configuration]" + }, + "defaultValue": "None" + }, + { + "id": 176, + "name": "_apify_client", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[ApifyClientAsync]" + }, + "defaultValue": "None" + } + ] + } + ] + }, + { + "id": 178, + "name": "initialize", + "module": "proxy_configuration", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Load the Apify Proxy password if the API token is provided and check access to Apify Proxy and provided proxy groups.\\n\\nOnly called if Apify Proxy configuration is used.\\nAlso checks if country has access to Apify Proxy groups if the country code is provided.\\n\\nYou should use the Actor.create_proxy_configuration function\\nto create a pre-initialized `ProxyConfiguration` instance instead of calling this manually.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/proxy_configuration.py", + "line": 187, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/proxy_configuration.py#L187" + } + ], + "signatures": [ + { + "id": 179, + "name": "initialize", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Load the Apify Proxy password if the API token is provided and check access to Apify Proxy and provided proxy groups.\\n\\nOnly called if Apify Proxy configuration is used.\\nAlso checks if country has access to Apify Proxy groups if the country code is provided.\\n\\nYou should use the Actor.create_proxy_configuration function\\nto create a pre-initialized `ProxyConfiguration` instance instead of calling this manually.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 180, + "name": "new_url", + "module": "proxy_configuration", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return a new proxy URL based on provided configuration options and the `sessionId` parameter.\\n\\nArgs:\\n session_id (int or str, optional): Represents the identifier of a proxy session (https://docs.apify.com/proxy#sessions).\\n All the HTTP requests going through the proxy with the same session identifier\\n will use the same target proxy server (i.e. the same IP address).\\n The identifier must not be longer than 50 characters and include only the following: `0-9`, `a-z`, `A-Z`, `\\\".\\\"`, `\\\"_\\\"` and `\\\"~\\\"`.\\n\\nReturns:\\n str: A string with a proxy URL, including authentication credentials and port number.\\n For example, `http://bob:password123@proxy.example.com:8000`\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/proxy_configuration.py", + "line": 200, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/proxy_configuration.py#L200" + } + ], + "signatures": [ + { + "id": 182, + "name": "new_url", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return a new proxy URL based on provided configuration options and the `sessionId` parameter.\\n\\nArgs:\\n session_id (int or str, optional): Represents the identifier of a proxy session (https://docs.apify.com/proxy#sessions).\\n All the HTTP requests going through the proxy with the same session identifier\\n will use the same target proxy server (i.e. the same IP address).\\n The identifier must not be longer than 50 characters and include only the following: `0-9`, `a-z`, `A-Z`, `\\\".\\\"`, `\\\"_\\\"` and `\\\"~\\\"`.\\n\\nReturns:\\n str: A string with a proxy URL, including authentication credentials and port number.\\n For example, `http://bob:password123@proxy.example.com:8000`\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "str" + }, + "parameters": [ + { + "id": 181, + "name": "session_id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[Union[int, str]]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 183, + "name": "new_proxy_info", + "module": "proxy_configuration", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a new ProxyInfo object.\\n\\nUse it if you want to work with a rich representation of a proxy URL.\\nIf you need the URL string only, use `ProxyConfiguration.new_url`.\\n\\nArgs:\\n session_id (int or str, optional): Represents the identifier of a proxy session (https://docs.apify.com/proxy#sessions).\\n All the HTTP requests going through the proxy with the same session identifier\\n will use the same target proxy server (i.e. the same IP address).\\n The identifier must not be longer than 50 characters and include only the following: `0-9`, `a-z`, `A-Z`, `\\\".\\\"`, `\\\"_\\\"` and `\\\"~\\\"`.\\n\\nReturns:\\n ProxyInfo: Dictionary that represents information about the proxy and its configuration.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/proxy_configuration.py", + "line": 243, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/proxy_configuration.py#L243" + } + ], + "signatures": [ + { + "id": 185, + "name": "new_proxy_info", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a new ProxyInfo object.\\n\\nUse it if you want to work with a rich representation of a proxy URL.\\nIf you need the URL string only, use `ProxyConfiguration.new_url`.\\n\\nArgs:\\n session_id (int or str, optional): Represents the identifier of a proxy session (https://docs.apify.com/proxy#sessions).\\n All the HTTP requests going through the proxy with the same session identifier\\n will use the same target proxy server (i.e. the same IP address).\\n The identifier must not be longer than 50 characters and include only the following: `0-9`, `a-z`, `A-Z`, `\\\".\\\"`, `\\\"_\\\"` and `\\\"~\\\"`.\\n\\nReturns:\\n ProxyInfo: Dictionary that represents information about the proxy and its configuration.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "ProxyInfo" + }, + "parameters": [ + { + "id": 184, + "name": "session_id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[Union[int, str]]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 169 + ] + }, + { + "title": "Methods", + "children": [ + 178, + 180, + 183 + ] + } + ], + "sources": [ + { + "filename": "src/apify/proxy_configuration.py", + "line": 99, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/proxy_configuration.py#L99" + } + ] + }, + { + "id": 186, + "name": "ActorLogFormatter", + "module": "log", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Log formatter that prints out the log message nicely formatted, with colored level and stringified extra fields.\\n\\nIt formats the log records so that they:\\n- start with the level (colorized, and padded to 5 chars so that it is nicely aligned)\\n- then have the actual log message, if it's multiline then it's nicely indented\\n- then have the stringified extra log fields\\n- then, if an exception is a part of the log record, prints the formatted exception.\"]}" + } + ] + }, + "children": [ + { + "id": 187, + "name": "format", + "module": "log", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Format the log record nicely.\\n\\nThis formats the log record so that it:\\n- starts with the level (colorized, and padded to 5 chars so that it is nicely aligned)\\n- then has the actual log message, if it's multiline then it's nicely indented\\n- then has the stringified extra log fields\\n- then, if an exception is a part of the log record, prints the formatted exception.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/log.py", + "line": 66, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/log.py#L66" + } + ], + "signatures": [ + { + "id": 189, + "name": "format", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Format the log record nicely.\\n\\nThis formats the log record so that it:\\n- starts with the level (colorized, and padded to 5 chars so that it is nicely aligned)\\n- then has the actual log message, if it's multiline then it's nicely indented\\n- then has the stringified extra log fields\\n- then, if an exception is a part of the log record, prints the formatted exception.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "str" + }, + "parameters": [ + { + "id": 188, + "name": "record", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "logging.LogRecord" + } + } + ] + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "children": [ + 187 + ] + } + ], + "sources": [ + { + "filename": "src/apify/log.py", + "line": 40, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/log.py#L40" + } + ] + }, + { + "id": 190, + "name": "ActorEventTypes", + "module": "consts", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Possible values of actor event type.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/consts.py", + "line": 6, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/consts.py#L6" + } + ] + }, + { + "id": 191, + "name": "ApifyEnvVars", + "module": "consts", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Possible Apify-specific environment variables.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/consts.py", + "line": 19, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/consts.py#L19" + } + ] + }, + { + "id": 192, + "name": "ActorExitCodes", + "module": "consts", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Usual actor exit codes.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/consts.py", + "line": 198, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/consts.py#L198" + } + ] + }, + { + "id": 193, + "name": "Dataset", + "module": "storages.dataset", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The `Dataset` class represents a store for structured data where each object stored has the same attributes.\\n\\nYou can imagine it as a table, where each object is a row and its attributes are columns.\\nDataset is an append-only storage - you can only add new records to it but you cannot modify or remove existing records.\\nTypically it is used to store crawling results.\\n\\nDo not instantiate this class directly, use the `Actor.open_dataset()` function instead.\\n\\n`Dataset` stores its data either on local disk or in the Apify cloud,\\ndepending on whether the `APIFY_LOCAL_STORAGE_DIR` or `APIFY_TOKEN` environment variables are set.\\n\\nIf the `APIFY_LOCAL_STORAGE_DIR` environment variable is set, the data is stored in\\nthe local directory in the following files:\\n```\\n{APIFY_LOCAL_STORAGE_DIR}/datasets/{DATASET_ID}/{INDEX}.json\\n```\\nNote that `{DATASET_ID}` is the name or ID of the dataset. The default dataset has ID: `default`,\\nunless you override it by setting the `APIFY_DEFAULT_DATASET_ID` environment variable.\\nEach dataset item is stored as a separate JSON file, where `{INDEX}` is a zero-based index of the item in the dataset.\\n\\nIf the `APIFY_TOKEN` environment variable is set but `APIFY_LOCAL_STORAGE_DIR` is not, the data is stored in the\\n[Apify Dataset](https://docs.apify.com/storage/dataset) cloud storage.\"]}" + } + ] + }, + "children": [ + { + "id": 194, + "name": "__init__", + "module": "storages.dataset", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a `Dataset` instance.\\n\\nDo not use the constructor directly, use the `Actor.open_dataset()` function instead.\\n\\nArgs:\\n id (str): ID of the dataset.\\n name (str, optional): Name of the dataset.\\n client (ApifyClientAsync or MemoryStorageClient): The storage client which should be used.\\n config (Configuration): The configuration which should be used.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 96, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L96" + } + ], + "signatures": [ + { + "id": 199, + "name": "__init__", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a `Dataset` instance.\\n\\nDo not use the constructor directly, use the `Actor.open_dataset()` function instead.\\n\\nArgs:\\n id (str): ID of the dataset.\\n name (str, optional): Name of the dataset.\\n client (ApifyClientAsync or MemoryStorageClient): The storage client which should be used.\\n config (Configuration): The configuration which should be used.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 195, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 196, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[str]" + } + }, + { + "id": 197, + "name": "client", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Union[ApifyClientAsync, MemoryStorageClient]" + } + }, + { + "id": 198, + "name": "config", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Configuration" + } + } + ] + } + ] + }, + { + "id": 200, + "name": "push_data", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Store an object or an array of objects to the dataset.\\n\\nThe size of the data is limited by the receiving API and therefore `push_data()` will only\\nallow objects whose JSON representation is smaller than 9MB. When an array is passed,\\nnone of the included objects may be larger than 9MB, but the array itself may be of any size.\\n\\nArgs:\\n data (JSONSerializable): dict or array of dicts containing data to be stored in the default dataset.\\n The JSON representation of each item must be smaller than 9MB.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 136, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L136" + } + ], + "signatures": [ + { + "id": 202, + "name": "push_data", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Store an object or an array of objects to the dataset.\\n\\nThe size of the data is limited by the receiving API and therefore `push_data()` will only\\nallow objects whose JSON representation is smaller than 9MB. When an array is passed,\\nnone of the included objects may be larger than 9MB, but the array itself may be of any size.\\n\\nArgs:\\n data (JSONSerializable): dict or array of dicts containing data to be stored in the default dataset.\\n The JSON representation of each item must be smaller than 9MB.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 201, + "name": "data", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "JSONSerializable" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 203, + "name": "get_data", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get items from the dataset.\\n\\nArgs:\\n offset (int, optional): Number of items that should be skipped at the start. The default value is 0\\n limit (int, optional): Maximum number of items to return. By default there is no limit.\\n desc (bool, optional): By default, results are returned in the same order as they were stored.\\n To reverse the order, set this parameter to True.\\n clean (bool, optional): If True, returns only non-empty items and skips hidden fields (i.e. fields starting with the # character).\\n The clean parameter is just a shortcut for skip_hidden=True and skip_empty=True parameters.\\n Note that since some objects might be skipped from the output, that the result might contain less items than the limit value.\\n fields (list of str, optional): A list of fields which should be picked from the items,\\n only these fields will remain in the resulting record objects.\\n Note that the fields in the outputted items are sorted the same way as they are specified in the fields parameter.\\n You can use this feature to effectively fix the output format.\\n omit (list of str, optional): A list of fields which should be omitted from the items.\\n unwind (str, optional): Name of a field which should be unwound.\\n If the field is an array then every element of the array will become a separate record and merged with parent object.\\n If the unwound field is an object then it is merged with the parent object.\\n If the unwound field is missing or its value is neither an array nor an object and therefore cannot be merged with a parent object,\\n then the item gets preserved as it is. Note that the unwound items ignore the desc parameter.\\n skip_empty (bool, optional): If True, then empty items are skipped from the output.\\n Note that if used, the results might contain less items than the limit value.\\n skip_hidden (bool, optional): If True, then hidden fields are skipped from the output, i.e. fields starting with the # character.\\n flatten (list of str, optional): A list of fields that should be flattened\\n view (str, optional): Name of the dataset view to be used\\n\\nReturns:\\n ListPage: A page of the list of dataset items according to the specified filters.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 164, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L164" + } + ], + "signatures": [ + { + "id": 215, + "name": "get_data", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get items from the dataset.\\n\\nArgs:\\n offset (int, optional): Number of items that should be skipped at the start. The default value is 0\\n limit (int, optional): Maximum number of items to return. By default there is no limit.\\n desc (bool, optional): By default, results are returned in the same order as they were stored.\\n To reverse the order, set this parameter to True.\\n clean (bool, optional): If True, returns only non-empty items and skips hidden fields (i.e. fields starting with the # character).\\n The clean parameter is just a shortcut for skip_hidden=True and skip_empty=True parameters.\\n Note that since some objects might be skipped from the output, that the result might contain less items than the limit value.\\n fields (list of str, optional): A list of fields which should be picked from the items,\\n only these fields will remain in the resulting record objects.\\n Note that the fields in the outputted items are sorted the same way as they are specified in the fields parameter.\\n You can use this feature to effectively fix the output format.\\n omit (list of str, optional): A list of fields which should be omitted from the items.\\n unwind (str, optional): Name of a field which should be unwound.\\n If the field is an array then every element of the array will become a separate record and merged with parent object.\\n If the unwound field is an object then it is merged with the parent object.\\n If the unwound field is missing or its value is neither an array nor an object and therefore cannot be merged with a parent object,\\n then the item gets preserved as it is. Note that the unwound items ignore the desc parameter.\\n skip_empty (bool, optional): If True, then empty items are skipped from the output.\\n Note that if used, the results might contain less items than the limit value.\\n skip_hidden (bool, optional): If True, then hidden fields are skipped from the output, i.e. fields starting with the # character.\\n flatten (list of str, optional): A list of fields that should be flattened\\n view (str, optional): Name of the dataset view to be used\\n\\nReturns:\\n ListPage: A page of the list of dataset items according to the specified filters.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "ListPage" + }, + "parameters": [ + { + "id": 204, + "name": "offset", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 205, + "name": "limit", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 206, + "name": "clean", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 207, + "name": "desc", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 208, + "name": "fields", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 209, + "name": "omit", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 210, + "name": "unwind", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 211, + "name": "skip_empty", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 212, + "name": "skip_hidden", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 213, + "name": "flatten", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 214, + "name": "view", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 216, + "name": "export_to", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Save the entirety of the dataset's contents into one file within a key-value store.\\n\\nArgs:\\n key (str): The key to save the data under.\\n to_key_value_store_id (str, optional): The id of the key-value store in which the result will be saved.\\n to_key_value_store_name (str, optional): The name of the key-value store in which the result will be saved.\\n You must specify only one of `to_key_value_store_id` and `to_key_value_store_name` arguments.\\n If you omit both, it uses the default key-value store.\\n content_type (str, optional): Either 'text/csv' or 'application/json'. Defaults to JSON.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 262, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L262" + } + ], + "signatures": [ + { + "id": 221, + "name": "export_to", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Save the entirety of the dataset's contents into one file within a key-value store.\\n\\nArgs:\\n key (str): The key to save the data under.\\n to_key_value_store_id (str, optional): The id of the key-value store in which the result will be saved.\\n to_key_value_store_name (str, optional): The name of the key-value store in which the result will be saved.\\n You must specify only one of `to_key_value_store_id` and `to_key_value_store_name` arguments.\\n If you omit both, it uses the default key-value store.\\n content_type (str, optional): Either 'text/csv' or 'application/json'. Defaults to JSON.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 217, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 218, + "name": "to_key_value_store_id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 219, + "name": "to_key_value_store_name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 220, + "name": "content_type", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 222, + "name": "export_to_json", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Save the entirety of the dataset's contents into one JSON file within a key-value store.\\n\\nArgs:\\n key (str): The key to save the data under.\\n from_dataset_id (str, optional): The ID of the dataset in case of calling the class method. Uses default dataset if omitted.\\n from_dataset_name (str, optional): The name of the dataset in case of calling the class method. Uses default dataset if omitted.\\n You must specify only one of `from_dataset_id` and `from_dataset_name` arguments.\\n If you omit both, it uses the default dataset.\\n to_key_value_store_id (str, optional): The id of the key-value store in which the result will be saved.\\n to_key_value_store_name (str, optional): The name of the key-value store in which the result will be saved.\\n You must specify only one of `to_key_value_store_id` and `to_key_value_store_name` arguments.\\n If you omit both, it uses the default key-value store.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 307, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L307" + } + ], + "signatures": [ + { + "id": 228, + "name": "export_to_json", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Save the entirety of the dataset's contents into one JSON file within a key-value store.\\n\\nArgs:\\n key (str): The key to save the data under.\\n from_dataset_id (str, optional): The ID of the dataset in case of calling the class method. Uses default dataset if omitted.\\n from_dataset_name (str, optional): The name of the dataset in case of calling the class method. Uses default dataset if omitted.\\n You must specify only one of `from_dataset_id` and `from_dataset_name` arguments.\\n If you omit both, it uses the default dataset.\\n to_key_value_store_id (str, optional): The id of the key-value store in which the result will be saved.\\n to_key_value_store_name (str, optional): The name of the key-value store in which the result will be saved.\\n You must specify only one of `to_key_value_store_id` and `to_key_value_store_name` arguments.\\n If you omit both, it uses the default key-value store.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 223, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 224, + "name": "from_dataset_id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 225, + "name": "from_dataset_name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 226, + "name": "to_key_value_store_id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 227, + "name": "to_key_value_store_name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 229, + "name": "export_to_csv", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Save the entirety of the dataset's contents into one CSV file within a key-value store.\\n\\nArgs:\\n key (str): The key to save the data under.\\n from_dataset_id (str, optional): The ID of the dataset in case of calling the class method. Uses default dataset if omitted.\\n from_dataset_name (str, optional): The name of the dataset in case of calling the class method. Uses default dataset if omitted.\\n You must specify only one of `from_dataset_id` and `from_dataset_name` arguments.\\n If you omit both, it uses the default dataset.\\n to_key_value_store_id (str, optional): The id of the key-value store in which the result will be saved.\\n to_key_value_store_name (str, optional): The name of the key-value store in which the result will be saved.\\n You must specify only one of `to_key_value_store_id` and `to_key_value_store_name` arguments.\\n If you omit both, it uses the default key-value store.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 349, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L349" + } + ], + "signatures": [ + { + "id": 235, + "name": "export_to_csv", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Save the entirety of the dataset's contents into one CSV file within a key-value store.\\n\\nArgs:\\n key (str): The key to save the data under.\\n from_dataset_id (str, optional): The ID of the dataset in case of calling the class method. Uses default dataset if omitted.\\n from_dataset_name (str, optional): The name of the dataset in case of calling the class method. Uses default dataset if omitted.\\n You must specify only one of `from_dataset_id` and `from_dataset_name` arguments.\\n If you omit both, it uses the default dataset.\\n to_key_value_store_id (str, optional): The id of the key-value store in which the result will be saved.\\n to_key_value_store_name (str, optional): The name of the key-value store in which the result will be saved.\\n You must specify only one of `to_key_value_store_id` and `to_key_value_store_name` arguments.\\n If you omit both, it uses the default key-value store.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 230, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 231, + "name": "from_dataset_id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 232, + "name": "from_dataset_name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 233, + "name": "to_key_value_store_id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 234, + "name": "to_key_value_store_name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 236, + "name": "get_info", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get an object containing general information about the dataset.\\n\\nReturns:\\n dict: Object returned by calling the GET dataset API endpoint.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 390, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L390" + } + ], + "signatures": [ + { + "id": 237, + "name": "get_info", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get an object containing general information about the dataset.\\n\\nReturns:\\n dict: Object returned by calling the GET dataset API endpoint.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 238, + "name": "iterate_items", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Iterate over the items in the dataset.\\n\\nArgs:\\n offset (int, optional): Number of items that should be skipped at the start. The default value is 0\\n limit (int, optional): Maximum number of items to return. By default there is no limit.\\n desc (bool, optional): By default, results are returned in the same order as they were stored.\\n To reverse the order, set this parameter to True.\\n clean (bool, optional): If True, returns only non-empty items and skips hidden fields (i.e. fields starting with the # character).\\n The clean parameter is just a shortcut for skip_hidden=True and skip_empty=True parameters.\\n Note that since some objects might be skipped from the output, that the result might contain less items than the limit value.\\n fields (list of str, optional): A list of fields which should be picked from the items,\\n only these fields will remain in the resulting record objects.\\n Note that the fields in the outputted items are sorted the same way as they are specified in the fields parameter.\\n You can use this feature to effectively fix the output format.\\n omit (list of str, optional): A list of fields which should be omitted from the items.\\n unwind (str, optional): Name of a field which should be unwound.\\n If the field is an array then every element of the array will become a separate record and merged with parent object.\\n If the unwound field is an object then it is merged with the parent object.\\n If the unwound field is missing or its value is neither an array nor an object and therefore cannot be merged with a parent object,\\n then the item gets preserved as it is. Note that the unwound items ignore the desc parameter.\\n skip_empty (bool, optional): If True, then empty items are skipped from the output.\\n Note that if used, the results might contain less items than the limit value.\\n skip_hidden (bool, optional): If True, then hidden fields are skipped from the output, i.e. fields starting with the # character.\\n\\nYields:\\n dict: An item from the dataset\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 398, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L398" + } + ], + "signatures": [ + { + "id": 248, + "name": "iterate_items", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Iterate over the items in the dataset.\\n\\nArgs:\\n offset (int, optional): Number of items that should be skipped at the start. The default value is 0\\n limit (int, optional): Maximum number of items to return. By default there is no limit.\\n desc (bool, optional): By default, results are returned in the same order as they were stored.\\n To reverse the order, set this parameter to True.\\n clean (bool, optional): If True, returns only non-empty items and skips hidden fields (i.e. fields starting with the # character).\\n The clean parameter is just a shortcut for skip_hidden=True and skip_empty=True parameters.\\n Note that since some objects might be skipped from the output, that the result might contain less items than the limit value.\\n fields (list of str, optional): A list of fields which should be picked from the items,\\n only these fields will remain in the resulting record objects.\\n Note that the fields in the outputted items are sorted the same way as they are specified in the fields parameter.\\n You can use this feature to effectively fix the output format.\\n omit (list of str, optional): A list of fields which should be omitted from the items.\\n unwind (str, optional): Name of a field which should be unwound.\\n If the field is an array then every element of the array will become a separate record and merged with parent object.\\n If the unwound field is an object then it is merged with the parent object.\\n If the unwound field is missing or its value is neither an array nor an object and therefore cannot be merged with a parent object,\\n then the item gets preserved as it is. Note that the unwound items ignore the desc parameter.\\n skip_empty (bool, optional): If True, then empty items are skipped from the output.\\n Note that if used, the results might contain less items than the limit value.\\n skip_hidden (bool, optional): If True, then hidden fields are skipped from the output, i.e. fields starting with the # character.\\n\\nYields:\\n dict: An item from the dataset\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "AsyncIterator[Dict]" + }, + "parameters": [ + { + "id": 239, + "name": "offset", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "int" + }, + "defaultValue": "0" + }, + { + "id": 240, + "name": "limit", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[int]" + }, + "defaultValue": "None" + }, + { + "id": 241, + "name": "clean", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 242, + "name": "desc", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 243, + "name": "fields", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 244, + "name": "omit", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[List[str]]" + }, + "defaultValue": "None" + }, + { + "id": 245, + "name": "unwind", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 246, + "name": "skip_empty", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + }, + { + "id": 247, + "name": "skip_hidden", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[bool]" + }, + "defaultValue": "None" + } + ] + } + ] + }, + { + "id": 249, + "name": "drop", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Remove the dataset either from the Apify cloud storage or from the local directory.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 450, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L450" + } + ], + "signatures": [ + { + "id": 250, + "name": "drop", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Remove the dataset either from the Apify cloud storage or from the local directory.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 251, + "name": "open", + "module": "storages.dataset", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a dataset.\\n\\nDatasets are used to store structured data where each object stored has the same attributes,\\nsuch as online store products or real estate offers.\\nThe actual data is stored either on the local filesystem or in the Apify cloud.\\n\\nArgs:\\n id (str, optional): ID of the dataset to be opened.\\n If neither `id` nor `name` are provided, the method returns the default dataset associated with the actor run.\\n If the dataset with the given ID does not exist, it raises an error.\\n name (str, optional): Name of the dataset to be opened.\\n If neither `id` nor `name` are provided, the method returns the default dataset associated with the actor run.\\n If the dataset with the given name does not exist, it is created.\\n force_cloud (bool, optional): If set to True, it will open a dataset on the Apify Platform even when running the actor locally.\\n Defaults to False.\\n config (Configuration, optional): A `Configuration` instance, uses global configuration if omitted.\\n\\nReturns:\\n Dataset: An instance of the `Dataset` class for the given ID or name.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 456, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L456" + } + ], + "signatures": [ + { + "id": 256, + "name": "open", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a dataset.\\n\\nDatasets are used to store structured data where each object stored has the same attributes,\\nsuch as online store products or real estate offers.\\nThe actual data is stored either on the local filesystem or in the Apify cloud.\\n\\nArgs:\\n id (str, optional): ID of the dataset to be opened.\\n If neither `id` nor `name` are provided, the method returns the default dataset associated with the actor run.\\n If the dataset with the given ID does not exist, it raises an error.\\n name (str, optional): Name of the dataset to be opened.\\n If neither `id` nor `name` are provided, the method returns the default dataset associated with the actor run.\\n If the dataset with the given name does not exist, it is created.\\n force_cloud (bool, optional): If set to True, it will open a dataset on the Apify Platform even when running the actor locally.\\n Defaults to False.\\n config (Configuration, optional): A `Configuration` instance, uses global configuration if omitted.\\n\\nReturns:\\n Dataset: An instance of the `Dataset` class for the given ID or name.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "'Dataset'" + }, + "parameters": [ + { + "id": 252, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 253, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 254, + "name": "force_cloud", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "bool" + }, + "defaultValue": "False" + }, + { + "id": 255, + "name": "config", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[Configuration]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 194 + ] + }, + { + "title": "Methods", + "children": [ + 200, + 203, + 216, + 222, + 229, + 236, + 238, + 249, + 251 + ] + } + ], + "sources": [ + { + "filename": "src/apify/storages/dataset.py", + "line": 66, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/dataset.py#L66" + } + ] + }, + { + "id": 257, + "name": "KeyValueStore", + "module": "storages.key_value_store", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"The `KeyValueStore` class represents a key-value store.\\n\\nYou can imagine it as a simple data storage that is used\\nfor saving and reading data records or files. Each data record is\\nrepresented by a unique key and associated with a MIME content type.\\n\\nDo not instantiate this class directly, use the `Actor.open_key_value_store()` function instead.\\n\\nEach crawler run is associated with a default key-value store, which is created exclusively\\nfor the run. By convention, the crawler input and output are stored into the\\ndefault key-value store under the `INPUT` and `OUTPUT` key, respectively.\\nTypically, input and output are JSON files, although it can be any other format.\\nTo access the default key-value store directly, you can use the\\n`KeyValueStore.get_value` and `KeyValueStore.set_value` convenience functions.\\n\\n`KeyValueStore` stores its data either on local disk or in the Apify cloud,\\ndepending on whether the `APIFY_LOCAL_STORAGE_DIR` or `APIFY_TOKEN` environment variables are set.\\n\\nIf the `APIFY_LOCAL_STORAGE_DIR` environment variable is set, the data is stored in\\nthe local directory in the following files:\\n```\\n{APIFY_LOCAL_STORAGE_DIR}/key_value_stores/{STORE_ID}/{INDEX}.{EXT}\\n```\\nNote that `{STORE_ID}` is the name or ID of the key-value store. The default key-value store has ID: `default`,\\nunless you override it by setting the `APIFY_DEFAULT_KEY_VALUE_STORE_ID` environment variable.\\nThe `{KEY}` is the key of the record and `{EXT}` corresponds to the MIME content type of the data value.\\n\\nIf the `APIFY_TOKEN` environment variable is set but `APIFY_LOCAL_STORAGE_DIR` is not, the data is stored in the\\n[Apify Key-value store](https://docs.apify.com/storage/key-value-store) cloud storage.\"]}" + } + ] + }, + "children": [ + { + "id": 258, + "name": "__init__", + "module": "storages.key_value_store", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a `KeyValueStore` instance.\\n\\nDo not use the constructor directly, use the `Actor.open_key_value_store()` function instead.\\n\\nArgs:\\n id (str): ID of the key-value store.\\n name (str, optional): Name of the key-value store.\\n client (ApifyClientAsync or MemoryStorageClient): The storage client which should be used.\\n config (Configuration): The configuration which should be used.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 54, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L54" + } + ], + "signatures": [ + { + "id": 263, + "name": "__init__", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a `KeyValueStore` instance.\\n\\nDo not use the constructor directly, use the `Actor.open_key_value_store()` function instead.\\n\\nArgs:\\n id (str): ID of the key-value store.\\n name (str, optional): Name of the key-value store.\\n client (ApifyClientAsync or MemoryStorageClient): The storage client which should be used.\\n config (Configuration): The configuration which should be used.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 259, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 260, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[str]" + } + }, + { + "id": 261, + "name": "client", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Union[ApifyClientAsync, MemoryStorageClient]" + } + }, + { + "id": 262, + "name": "config", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Configuration" + } + } + ] + } + ] + }, + { + "id": 264, + "name": "get_value", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 99, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L99" + } + ], + "signatures": [ + { + "id": 266, + "name": "get_value", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [] + }, + "type": { + "type": "reference", + "name": "Any" + }, + "parameters": [ + { + "id": 265, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 267, + "name": "get_value", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 104, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L104" + } + ], + "signatures": [ + { + "id": 270, + "name": "get_value", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [] + }, + "type": { + "type": "reference", + "name": "T" + }, + "parameters": [ + { + "id": 268, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 269, + "name": "default_value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "T" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 271, + "name": "get_value", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 109, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L109" + } + ], + "signatures": [ + { + "id": 274, + "name": "get_value", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [] + }, + "type": { + "type": "reference", + "name": "Optional[T]" + }, + "parameters": [ + { + "id": 272, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 273, + "name": "default_value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[T]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 275, + "name": "get_value", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get a value from the key-value store.\\n\\nArgs:\\n key (str): Key of the record to retrieve.\\n default_value (Any, optional): Default value returned in case the record does not exist.\\n\\nReturns:\\n Any: The value associated with the given key. `default_value` is used in case the record does not exist.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 113, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L113" + } + ], + "signatures": [ + { + "id": 278, + "name": "get_value", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get a value from the key-value store.\\n\\nArgs:\\n key (str): Key of the record to retrieve.\\n default_value (Any, optional): Default value returned in case the record does not exist.\\n\\nReturns:\\n Any: The value associated with the given key. `default_value` is used in case the record does not exist.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[T]" + }, + "parameters": [ + { + "id": 276, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 277, + "name": "default_value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[T]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 279, + "name": "iterate_keys", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Iterate over the keys in the key-value store.\\n\\nArgs:\\n exclusive_start_key (str, optional): All keys up to this one (including) are skipped from the result.\\n\\nYields:\\n IterateKeysTuple: A tuple `(key, info)`,\\n where `key` is the record key, and `info` is an object that contains a single property `size`\\n indicating size of the record in bytes.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 130, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L130" + } + ], + "signatures": [ + { + "id": 281, + "name": "iterate_keys", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Iterate over the keys in the key-value store.\\n\\nArgs:\\n exclusive_start_key (str, optional): All keys up to this one (including) are skipped from the result.\\n\\nYields:\\n IterateKeysTuple: A tuple `(key, info)`,\\n where `key` is the record key, and `info` is an object that contains a single property `size`\\n indicating size of the record in bytes.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "AsyncIterator[IterateKeysTuple]" + }, + "parameters": [ + { + "id": 280, + "name": "exclusive_start_key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 282, + "name": "set_value", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Set or delete a value in the key-value store.\\n\\nArgs:\\n key (str): The key under which the value should be saved.\\n value (Any, optional): The value to save. If the value is `None`, the corresponding key-value pair will be deleted.\\n content_type (str, optional): The content type of the saved value.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 151, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L151" + } + ], + "signatures": [ + { + "id": 286, + "name": "set_value", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Set or delete a value in the key-value store.\\n\\nArgs:\\n key (str): The key under which the value should be saved.\\n value (Any, optional): The value to save. If the value is `None`, the corresponding key-value pair will be deleted.\\n content_type (str, optional): The content type of the saved value.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 283, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 284, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[T]" + } + }, + { + "id": 285, + "name": "content_type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 287, + "name": "get_public_url", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get a URL for the given key that may be used to publicly access the value in the remote key-value store.\\n\\nArgs:\\n key (str): The key for which the URL should be generated.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 169, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L169" + } + ], + "signatures": [ + { + "id": 289, + "name": "get_public_url", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get a URL for the given key that may be used to publicly access the value in the remote key-value store.\\n\\nArgs:\\n key (str): The key for which the URL should be generated.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "str" + }, + "parameters": [ + { + "id": 288, + "name": "key", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 290, + "name": "drop", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Remove the key-value store either from the Apify cloud storage or from the local directory.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 186, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L186" + } + ], + "signatures": [ + { + "id": 291, + "name": "drop", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Remove the key-value store either from the Apify cloud storage or from the local directory.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 292, + "name": "open", + "module": "storages.key_value_store", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a key-value store.\\n\\nKey-value stores are used to store records or files, along with their MIME content type.\\nThe records are stored and retrieved using a unique key.\\nThe actual data is stored either on a local filesystem or in the Apify cloud.\\n\\nArgs:\\n id (str, optional): ID of the key-value store to be opened.\\n If neither `id` nor `name` are provided, the method returns the default key-value store associated with the actor run.\\n If the key-value store with the given ID does not exist, it raises an error.\\n name (str, optional): Name of the key-value store to be opened.\\n If neither `id` nor `name` are provided, the method returns the default key-value store associated with the actor run.\\n If the key-value store with the given name does not exist, it is created.\\n force_cloud (bool, optional): If set to True, it will open a key-value store on the Apify Platform even when running the actor locally.\\n Defaults to False.\\n config (Configuration, optional): A `Configuration` instance, uses global configuration if omitted.\\n\\nReturns:\\n KeyValueStore: An instance of the `KeyValueStore` class for the given ID or name.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 192, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L192" + } + ], + "signatures": [ + { + "id": 297, + "name": "open", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a key-value store.\\n\\nKey-value stores are used to store records or files, along with their MIME content type.\\nThe records are stored and retrieved using a unique key.\\nThe actual data is stored either on a local filesystem or in the Apify cloud.\\n\\nArgs:\\n id (str, optional): ID of the key-value store to be opened.\\n If neither `id` nor `name` are provided, the method returns the default key-value store associated with the actor run.\\n If the key-value store with the given ID does not exist, it raises an error.\\n name (str, optional): Name of the key-value store to be opened.\\n If neither `id` nor `name` are provided, the method returns the default key-value store associated with the actor run.\\n If the key-value store with the given name does not exist, it is created.\\n force_cloud (bool, optional): If set to True, it will open a key-value store on the Apify Platform even when running the actor locally.\\n Defaults to False.\\n config (Configuration, optional): A `Configuration` instance, uses global configuration if omitted.\\n\\nReturns:\\n KeyValueStore: An instance of the `KeyValueStore` class for the given ID or name.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "'KeyValueStore'" + }, + "parameters": [ + { + "id": 293, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 294, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 295, + "name": "force_cloud", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "bool" + }, + "defaultValue": "False" + }, + { + "id": 296, + "name": "config", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[Configuration]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 258 + ] + }, + { + "title": "Methods", + "children": [ + 264, + 267, + 271, + 275, + 279, + 282, + 287, + 290, + 292 + ] + } + ], + "sources": [ + { + "filename": "src/apify/storages/key_value_store.py", + "line": 17, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/key_value_store.py#L17" + } + ] + }, + { + "id": 298, + "name": "RequestQueue", + "module": "storages.request_queue", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Represents a queue of URLs to crawl.\\n\\nCan be used for deep crawling of websites where you start with several URLs and then recursively\\nfollow links to other pages. The data structure supports both breadth-first and depth-first crawling orders.\\n\\nEach URL is represented using an instance of the {@apilink Request} class.\\nThe queue can only contain unique URLs. More precisely, it can only contain request dictionaries\\nwith distinct `uniqueKey` properties. By default, `uniqueKey` is generated from the URL, but it can also be overridden.\\nTo add a single URL multiple times to the queue,\\ncorresponding request dictionary will need to have different `uniqueKey` properties.\\n\\nDo not instantiate this class directly, use the `Actor.open_request_queue()` function instead.\\n\\n`RequestQueue` stores its data either on local disk or in the Apify cloud,\\ndepending on whether the `APIFY_LOCAL_STORAGE_DIR` or `APIFY_TOKEN` environment variables are set.\\n\\nIf the `APIFY_LOCAL_STORAGE_DIR` environment variable is set, the data is stored in\\nthe local directory in the following files:\\n```\\n{APIFY_LOCAL_STORAGE_DIR}/request_queues/{QUEUE_ID}/{REQUEST_ID}.json\\n```\\nNote that `{QUEUE_ID}` is the name or ID of the request queue. The default request queue has ID: `default`,\\nunless you override it by setting the `APIFY_DEFAULT_REQUEST_QUEUE_ID` environment variable.\\nThe `{REQUEST_ID}` is the id of the request.\\n\\nIf the `APIFY_TOKEN` environment variable is set but `APIFY_LOCAL_STORAGE_DIR` is not, the data is stored in the\\n[Apify Request Queue](https://docs.apify.com/storage/request-queue)\\ncloud storage.\"]}" + } + ] + }, + "children": [ + { + "id": 299, + "name": "__init__", + "module": "storages.request_queue", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a `RequestQueue` instance.\\n\\nDo not use the constructor directly, use the `Actor.open_request_queue()` function instead.\\n\\nArgs:\\n id (str): ID of the request queue.\\n name (str, optional): Name of the request queue.\\n client (ApifyClientAsync or MemoryStorageClient): The storage client which should be used.\\n config (Configuration): The configuration which should be used.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 87, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L87" + } + ], + "signatures": [ + { + "id": 304, + "name": "__init__", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Create a `RequestQueue` instance.\\n\\nDo not use the constructor directly, use the `Actor.open_request_queue()` function instead.\\n\\nArgs:\\n id (str): ID of the request queue.\\n name (str, optional): Name of the request queue.\\n client (ApifyClientAsync or MemoryStorageClient): The storage client which should be used.\\n config (Configuration): The configuration which should be used.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [ + { + "id": 300, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + }, + { + "id": 301, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Optional[str]" + } + }, + { + "id": 302, + "name": "client", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Union[ApifyClientAsync, MemoryStorageClient]" + } + }, + { + "id": 303, + "name": "config", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Configuration" + } + } + ] + } + ] + }, + { + "id": 305, + "name": "add_request", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Add a request to the queue.\\n\\nArgs:\\n request (dict): The request to add to the queue\\n forefront (bool, optional): Whether to add the request to the head or the end of the queue\\n\\nReturns:\\n dict: Information about the queue operation with keys `requestId`, `uniqueKey`, `wasAlreadyPresent`, `wasAlreadyHandled`.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 131, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L131" + } + ], + "signatures": [ + { + "id": 308, + "name": "add_request", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Add a request to the queue.\\n\\nArgs:\\n request (dict): The request to add to the queue\\n forefront (bool, optional): Whether to add the request to the head or the end of the queue\\n\\nReturns:\\n dict: Information about the queue operation with keys `requestId`, `uniqueKey`, `wasAlreadyPresent`, `wasAlreadyHandled`.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Dict" + }, + "parameters": [ + { + "id": 306, + "name": "request", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Dict" + } + }, + { + "id": 307, + "name": "forefront", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "bool" + }, + "defaultValue": "False" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 309, + "name": "get_request", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Retrieve a request from the queue.\\n\\nArgs:\\n request_id (str): ID of the request to retrieve.\\n\\nReturns:\\n dict, optional: The retrieved request, or `None`, if it does not exist.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 176, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L176" + } + ], + "signatures": [ + { + "id": 311, + "name": "get_request", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Retrieve a request from the queue.\\n\\nArgs:\\n request_id (str): ID of the request to retrieve.\\n\\nReturns:\\n dict, optional: The retrieved request, or `None`, if it does not exist.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [ + { + "id": 310, + "name": "request_id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "str" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 312, + "name": "fetch_next_request", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return the next request in the queue to be processed.\\n\\nOnce you successfully finish processing of the request, you need to call\\n`RequestQueue.mark_request_as_handled` to mark the request as handled in the queue.\\nIf there was some error in processing the request, call `RequestQueue.reclaim_request` instead,\\nso that the queue will give the request to some other consumer in another call to the `fetch_next_request` method.\\n\\nNote that the `None` return value does not mean the queue processing finished, it means there are currently no pending requests.\\nTo check whether all requests in queue were finished, use `RequestQueue.is_finished` instead.\\n\\nReturns:\\n dict, optional: The request or `None` if there are no more pending requests.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 188, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L188" + } + ], + "signatures": [ + { + "id": 313, + "name": "fetch_next_request", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Return the next request in the queue to be processed.\\n\\nOnce you successfully finish processing of the request, you need to call\\n`RequestQueue.mark_request_as_handled` to mark the request as handled in the queue.\\nIf there was some error in processing the request, call `RequestQueue.reclaim_request` instead,\\nso that the queue will give the request to some other consumer in another call to the `fetch_next_request` method.\\n\\nNote that the `None` return value does not mean the queue processing finished, it means there are currently no pending requests.\\nTo check whether all requests in queue were finished, use `RequestQueue.is_finished` instead.\\n\\nReturns:\\n dict, optional: The request or `None` if there are no more pending requests.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 314, + "name": "mark_request_as_handled", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Mark a request as handled after successful processing.\\n\\nHandled requests will never again be returned by the `RequestQueue.fetch_next_request` method.\\n\\nArgs:\\n request (dict): The request to mark as handled.\\n\\nReturns:\\n dict, optional: Information about the queue operation with keys `requestId`, `uniqueKey`, `wasAlreadyPresent`, `wasAlreadyHandled`.\\n `None` if the given request was not in progress.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 253, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L253" + } + ], + "signatures": [ + { + "id": 316, + "name": "mark_request_as_handled", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Mark a request as handled after successful processing.\\n\\nHandled requests will never again be returned by the `RequestQueue.fetch_next_request` method.\\n\\nArgs:\\n request (dict): The request to mark as handled.\\n\\nReturns:\\n dict, optional: Information about the queue operation with keys `requestId`, `uniqueKey`, `wasAlreadyPresent`, `wasAlreadyHandled`.\\n `None` if the given request was not in progress.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [ + { + "id": 315, + "name": "request", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Dict" + } + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 317, + "name": "reclaim_request", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Reclaim a failed request back to the queue.\\n\\nThe request will be returned for processing later again\\nby another call to `RequestQueue.fetchNextRequest`.\\n\\nArgs:\\n request (dict): The request to return to the queue.\\n forefront (bool, optional): Whether to add the request to the head or the end of the queue\\nReturns:\\n dict, optional: Information about the queue operation with keys `requestId`, `uniqueKey`, `wasAlreadyPresent`, `wasAlreadyHandled`.\\n `None` if the given request was not in progress.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 289, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L289" + } + ], + "signatures": [ + { + "id": 320, + "name": "reclaim_request", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Reclaim a failed request back to the queue.\\n\\nThe request will be returned for processing later again\\nby another call to `RequestQueue.fetchNextRequest`.\\n\\nArgs:\\n request (dict): The request to return to the queue.\\n forefront (bool, optional): Whether to add the request to the head or the end of the queue\\nReturns:\\n dict, optional: Information about the queue operation with keys `requestId`, `uniqueKey`, `wasAlreadyPresent`, `wasAlreadyHandled`.\\n `None` if the given request was not in progress.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [ + { + "id": 318, + "name": "request", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Dict" + } + }, + { + "id": 319, + "name": "forefront", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "bool" + }, + "defaultValue": "False" + } + ], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 321, + "name": "is_empty", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Check whether the queue is empty.\\n\\nReturns:\\n bool: `True` if the next call to `RequestQueue.fetchNextRequest` would return `None`, otherwise `False`.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 337, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L337" + } + ], + "signatures": [ + { + "id": 322, + "name": "is_empty", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Check whether the queue is empty.\\n\\nReturns:\\n bool: `True` if the next call to `RequestQueue.fetchNextRequest` would return `None`, otherwise `False`.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "bool" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 323, + "name": "is_finished", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Check whether the queue is finished.\\n\\nDue to the nature of distributed storage used by the queue,\\nthe function might occasionally return a false negative,\\nbut it will never return a false positive.\\n\\nReturns:\\n bool: `True` if all requests were already handled and there are no more left. `False` otherwise.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 346, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L346" + } + ], + "signatures": [ + { + "id": 324, + "name": "is_finished", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Check whether the queue is finished.\\n\\nDue to the nature of distributed storage used by the queue,\\nthe function might occasionally return a false negative,\\nbut it will never return a false positive.\\n\\nReturns:\\n bool: `True` if all requests were already handled and there are no more left. `False` otherwise.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "bool" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 325, + "name": "drop", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Remove the request queue either from the Apify cloud storage or from the local directory.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 480, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L480" + } + ], + "signatures": [ + { + "id": 326, + "name": "drop", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Remove the request queue either from the Apify cloud storage or from the local directory.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "None" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 327, + "name": "get_info", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get an object containing general information about the request queue.\\n\\nReturns:\\n dict: Object returned by calling the GET request queue API endpoint.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 485, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L485" + } + ], + "signatures": [ + { + "id": 328, + "name": "get_info", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Get an object containing general information about the request queue.\\n\\nReturns:\\n dict: Object returned by calling the GET request queue API endpoint.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "Optional[Dict]" + }, + "parameters": [], + "modifiers": [ + "async" + ] + } + ] + }, + { + "id": 329, + "name": "open", + "module": "storages.request_queue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a request queue.\\n\\nRequest queue represents a queue of URLs to crawl, which is stored either on local filesystem or in the Apify cloud.\\nThe queue is used for deep crawling of websites, where you start with several URLs and then\\nrecursively follow links to other pages. The data structure supports both breadth-first\\nand depth-first crawling orders.\\n\\nArgs:\\n id (str, optional): ID of the request queue to be opened.\\n If neither `id` nor `name` are provided, the method returns the default request queue associated with the actor run.\\n If the request queue with the given ID does not exist, it raises an error.\\n name (str, optional): Name of the request queue to be opened.\\n If neither `id` nor `name` are provided, the method returns the default request queue associated with the actor run.\\n If the request queue with the given name does not exist, it is created.\\n force_cloud (bool, optional): If set to True, it will open a request queue on the Apify Platform even when running the actor locally.\\n Defaults to False.\\n config (Configuration, optional): A `Configuration` instance, uses global configuration if omitted.\\n\\nReturns:\\n RequestQueue: An instance of the `RequestQueue` class for the given ID or name.\"]}" + } + ] + }, + "children": [], + "groups": [], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 494, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L494" + } + ], + "signatures": [ + { + "id": 334, + "name": "open", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "{\"content\": [\"Open a request queue.\\n\\nRequest queue represents a queue of URLs to crawl, which is stored either on local filesystem or in the Apify cloud.\\nThe queue is used for deep crawling of websites, where you start with several URLs and then\\nrecursively follow links to other pages. The data structure supports both breadth-first\\nand depth-first crawling orders.\\n\\nArgs:\\n id (str, optional): ID of the request queue to be opened.\\n If neither `id` nor `name` are provided, the method returns the default request queue associated with the actor run.\\n If the request queue with the given ID does not exist, it raises an error.\\n name (str, optional): Name of the request queue to be opened.\\n If neither `id` nor `name` are provided, the method returns the default request queue associated with the actor run.\\n If the request queue with the given name does not exist, it is created.\\n force_cloud (bool, optional): If set to True, it will open a request queue on the Apify Platform even when running the actor locally.\\n Defaults to False.\\n config (Configuration, optional): A `Configuration` instance, uses global configuration if omitted.\\n\\nReturns:\\n RequestQueue: An instance of the `RequestQueue` class for the given ID or name.\"]}" + } + ] + }, + "type": { + "type": "reference", + "name": "'RequestQueue'" + }, + "parameters": [ + { + "id": 330, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 331, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[str]" + }, + "defaultValue": "None" + }, + { + "id": 332, + "name": "force_cloud", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "bool" + }, + "defaultValue": "False" + }, + { + "id": 333, + "name": "config", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "keyword-only": "true" + }, + "type": { + "type": "reference", + "name": "Optional[Configuration]" + }, + "defaultValue": "None" + } + ], + "modifiers": [ + "async" + ] + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 299 + ] + }, + { + "title": "Methods", + "children": [ + 305, + 309, + 312, + 314, + 317, + 321, + 323, + 325, + 327, + 329 + ] + } + ], + "sources": [ + { + "filename": "src/apify/storages/request_queue.py", + "line": 43, + "character": 1, + "url": "https://github.com/apify/apify-sdk-python/blob/v0.2.0/src/apify/storages/request_queue.py#L43" + } + ] + } + ], + "groups": [ + { + "title": "Other", + "children": [ + 1, + 143, + 167, + 168, + 186, + 190, + 191, + 192, + 193, + 257, + 298 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 1, + "character": 0, + "url": "http://example.com/blob/v0.2.0/src/dummy.py" + } + ] +} \ No newline at end of file diff --git a/website/versioned_docs/version-0.2/changelog.md b/website/versioned_docs/version-0.2/changelog.md new file mode 100644 index 000000000..e3e1fe9f8 --- /dev/null +++ b/website/versioned_docs/version-0.2/changelog.md @@ -0,0 +1,512 @@ +--- +title: Changelog +sidebar_label: Changelog +toc_max_heading_level: 3 +--- +# Changelog + +All notable changes to this project will be documented in this file. + + + +### 3.3.2 - **not yet released** + +#### 🐛 Bug Fixes + +* **scrapy:** Resolve Crawlee's request data round-trip failure in request conversion ([#832](https://github.com/apify/apify-sdk-python/pull/832)) ([3b9d588](https://github.com/apify/apify-sdk-python/commit/3b9d5888611597a522300c742014c06cc0b857b9)) by [@vdusek](https://github.com/vdusek) +* Treat `default` alias as default storage when in schema ([#827](https://github.com/apify/apify-sdk-python/pull/827)) ([1610d0d](https://github.com/apify/apify-sdk-python/commit/1610d0dda40ba30bd3b4dea28d9fef04c9b7c839)) by [@Pijukatel](https://github.com/Pijukatel) +* Guard ReentrantLock against None task context ([#841](https://github.com/apify/apify-sdk-python/pull/841)) ([193de10](https://github.com/apify/apify-sdk-python/commit/193de10910946ca0ce93bc2fc7c741a26e9f6e9c)) by [@vdusek](https://github.com/vdusek) +* Isolate cleanup steps in Actor `__aexit__` to prevent cascading failures ([#842](https://github.com/apify/apify-sdk-python/pull/842)) ([68c2acf](https://github.com/apify/apify-sdk-python/commit/68c2acf3dba71b78f893fc6f1e816e3a3148f0c9)) by [@vdusek](https://github.com/vdusek) + + + +### [3.3.1](https://github.com/apify/apify-sdk-python/releases/tag/v3.3.1) (2026-03-11) + +#### 🐛 Bug Fixes + +* Fix f-string bugs in charging log message ([#817](https://github.com/apify/apify-sdk-python/pull/817)) ([bcb4050](https://github.com/apify/apify-sdk-python/commit/bcb4050b3f5ade0e577dd7499979dc65c0ba815e)) by [@vdusek](https://github.com/vdusek) +* Fix BeforeValidator treating 0 as falsy in configuration fields ([#819](https://github.com/apify/apify-sdk-python/pull/819)) ([72efe88](https://github.com/apify/apify-sdk-python/commit/72efe883574ef0d05795934337c7f1c8c0d11877)) by [@vdusek](https://github.com/vdusek) +* Clamp negative timedelta in \_get\_remaining\_time() ([#818](https://github.com/apify/apify-sdk-python/pull/818)) ([69b8af9](https://github.com/apify/apify-sdk-python/commit/69b8af9b8d245cfed76875f983f374e05d93bba8)) by [@vdusek](https://github.com/vdusek) +* **scrapy:** Close AsyncThread on scheduler open() failure ([#820](https://github.com/apify/apify-sdk-python/pull/820)) ([7dfaf1a](https://github.com/apify/apify-sdk-python/commit/7dfaf1a5c5af44743bd448a91140d9b074ac44bf)) by [@vdusek](https://github.com/vdusek) +* Keep track of synthetic apify-default-dataset-item events ([#814](https://github.com/apify/apify-sdk-python/pull/814)) ([50c4b6c](https://github.com/apify/apify-sdk-python/commit/50c4b6ce80b45da5348a74c559b8790edbeae04a)) by [@Mantisus](https://github.com/Mantisus), closes [#705](https://github.com/apify/apify-sdk-python/issues/705), [#760](https://github.com/apify/apify-sdk-python/issues/760) + +### [3.3.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.3.0) (2026-02-25) + +#### 🚀 Features + +* Support Actor schema storages with Alias mechanism ([#797](https://github.com/apify/apify-sdk-python/pull/797)) ([10986ac](https://github.com/apify/apify-sdk-python/commit/10986ac2f4a3d1112aa06eaf26f82884ab9c455a)) by [@Pijukatel](https://github.com/Pijukatel), closes [#762](https://github.com/apify/apify-sdk-python/issues/762) +* Migrate to Scrapy's native AsyncCrawlerRunner ([#793](https://github.com/apify/apify-sdk-python/pull/793)) ([01ad9da](https://github.com/apify/apify-sdk-python/commit/01ad9daf834894f798bbfa4362fc7d7f95bafe5c)) by [@vdusek](https://github.com/vdusek), closes [#638](https://github.com/apify/apify-sdk-python/issues/638) + +#### 🐛 Bug Fixes + +* Resolve LogRecord attribute conflict in event manager logging ([#802](https://github.com/apify/apify-sdk-python/pull/802)) ([e1bdbc9](https://github.com/apify/apify-sdk-python/commit/e1bdbc9e303c24571b9511f43ec0815e7e9f4b55)) by [@vdusek](https://github.com/vdusek) +* Update models.py to align with the current API behavior ([#782](https://github.com/apify/apify-sdk-python/pull/782)) ([b06355d](https://github.com/apify/apify-sdk-python/commit/b06355dbc1c8276e9930ecbde72795b6570dde33)) by [@vdusek](https://github.com/vdusek), closes [#778](https://github.com/apify/apify-sdk-python/issues/778) +* Handle `ServiceConflictError` when reusing `Actor` across sequential context ([#804](https://github.com/apify/apify-sdk-python/pull/804)) ([9e5078f](https://github.com/apify/apify-sdk-python/commit/9e5078fa7b1a19e44893bd3409b45108519aef63)) by [@Mantisus](https://github.com/Mantisus), closes [#678](https://github.com/apify/apify-sdk-python/issues/678) + +### [3.2.1](https://github.com/apify/apify-sdk-python/releases/tag/v3.2.1) (2026-02-17) + +#### 🐛 Bug Fixes + +* Fix crawler deadlock when API fails during marking request as handled ([#768](https://github.com/apify/apify-sdk-python/pull/768)) ([66ed5ea](https://github.com/apify/apify-sdk-python/commit/66ed5eaf819f9c9f411c814606187d76d32a4e11)) by [@Pijukatel](https://github.com/Pijukatel), closes [#1694](https://github.com/apify/apify-sdk-python/issues/1694) +* Use hashed request\_id as cache key in shared RQ client reclaim\_request ([#795](https://github.com/apify/apify-sdk-python/pull/795)) ([bd7572f](https://github.com/apify/apify-sdk-python/commit/bd7572f5b66e9417e4fa1c021b4d47a86b4cb8cf)) by [@vdusek](https://github.com/vdusek) +* Correct inverted return value in Scrapy scheduler enqueue\_request ([#794](https://github.com/apify/apify-sdk-python/pull/794)) ([405cf5d](https://github.com/apify/apify-sdk-python/commit/405cf5dc96f9fd794eaf570ffc877d503829244a)) by [@vdusek](https://github.com/vdusek) +* Eliminate race condition in \_fetch\_requests\_from\_url ([#796](https://github.com/apify/apify-sdk-python/pull/796)) ([c0a74b9](https://github.com/apify/apify-sdk-python/commit/c0a74b9eaf8032510528c2a9ab93c4840a51e79f)) by [@vdusek](https://github.com/vdusek) + +### [3.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.2.0) (2026-02-11) + +#### 🚀 Features + +* Add `Actor` method `use_state` ([#738](https://github.com/apify/apify-sdk-python/pull/738)) ([8a78b6f](https://github.com/apify/apify-sdk-python/commit/8a78b6fc9324e948b3481b07a3582215d3c966fe)) by [@Mantisus](https://github.com/Mantisus), closes [#735](https://github.com/apify/apify-sdk-python/issues/735) + +#### 🐛 Bug Fixes + +* Stop silently swallowing exceptions in request queue ([#777](https://github.com/apify/apify-sdk-python/pull/777)) ([6358d66](https://github.com/apify/apify-sdk-python/commit/6358d66aeb83484845b17f7c8632b6c763cef368)) by [@vdusek](https://github.com/vdusek) +* Handle TimeoutError in Actor **aexit** to prevent resource leaks ([#776](https://github.com/apify/apify-sdk-python/pull/776)) ([fb13765](https://github.com/apify/apify-sdk-python/commit/fb13765448a2a6e2b776de819ece68f90abff1e3)) by [@vdusek](https://github.com/vdusek) +* Pass name instead of id for name param in SmartApifyStorageClient ([#775](https://github.com/apify/apify-sdk-python/pull/775)) ([56cfc38](https://github.com/apify/apify-sdk-python/commit/56cfc38aa98a2a6689dd077e9d5c5d8729872413)) by [@vdusek](https://github.com/vdusek) + +### [3.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.1.0) (2025-12-08) + +#### 🚀 Features + +* Add support for Python 3.14 ([#680](https://github.com/apify/apify-sdk-python/pull/680)) ([b81e86a](https://github.com/apify/apify-sdk-python/commit/b81e86ad294b953f72bce944739649eac3789ebc)) by [@Mantisus](https://github.com/Mantisus) +* Add `ACTOR_PERMISSION_LEVEL` to the configuration ([#689](https://github.com/apify/apify-sdk-python/pull/689)) ([68012c7](https://github.com/apify/apify-sdk-python/commit/68012c7dfe5e4a8b043ce4075826e63c0262ae2e)) by [@stepskop](https://github.com/stepskop), closes [#690](https://github.com/apify/apify-sdk-python/issues/690) + +#### 🐛 Bug Fixes + +* Make `ApifyFileSystemStorageClient` compatible with the apify cli ([#677](https://github.com/apify/apify-sdk-python/pull/677)) ([a32274f](https://github.com/apify/apify-sdk-python/commit/a32274f26b1d2ae4fcf36958e799bf412941464a)) by [@Pijukatel](https://github.com/Pijukatel) +* Synchronize charge operations to prevent race conditions ([#684](https://github.com/apify/apify-sdk-python/pull/684)) ([1c7a9e6](https://github.com/apify/apify-sdk-python/commit/1c7a9e6f386105630c3c1de7ffa092e369698aa0)) by [@vdusek](https://github.com/vdusek), closes [#666](https://github.com/apify/apify-sdk-python/issues/666) + +### [3.0.5](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.5) (2025-11-18) + +#### 🐛 Bug Fixes + +* Fix crash in `Actor.push_data` with PPE and a strict charging limit ([#664](https://github.com/apify/apify-sdk-python/pull/664)) ([8f2e4b2](https://github.com/apify/apify-sdk-python/commit/8f2e4b2cc1f62e9a09656b4d3334caf840338a3a)) by [@janbuchar](https://github.com/janbuchar) +* Avoid charge calls with count=0 ([#665](https://github.com/apify/apify-sdk-python/pull/665)) ([a0f894e](https://github.com/apify/apify-sdk-python/commit/a0f894e879225eb1b639c4f897a1dd0103903c78)) by [@janbuchar](https://github.com/janbuchar) +* Fix Actor.charge behavior when the budget is overdrawn ([#668](https://github.com/apify/apify-sdk-python/pull/668)) ([88e6ba3](https://github.com/apify/apify-sdk-python/commit/88e6ba340a68dcf5e272ee947f4e38ce0f3dea46)) by [@janbuchar](https://github.com/janbuchar) +* Fix detection of whether any instance is initialized ([#675](https://github.com/apify/apify-sdk-python/pull/675)) ([b2355cf](https://github.com/apify/apify-sdk-python/commit/b2355cf697aac6383a404e1bbbefbecd5f38c760)) by [@vdusek](https://github.com/vdusek), closes [#674](https://github.com/apify/apify-sdk-python/issues/674) +* Update apify client to fix rare `JSONDecodeError` ([#679](https://github.com/apify/apify-sdk-python/pull/679)) ([17c13d1](https://github.com/apify/apify-sdk-python/commit/17c13d1ecfbe231fdc4f91c5a24abe65b8abdb26)) by [@Pijukatel](https://github.com/Pijukatel), closes [#672](https://github.com/apify/apify-sdk-python/issues/672) + +### [3.0.4](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.4) (2025-11-03) + +#### 🐛 Bug Fixes + +* Fix type of `cloud_storage_client` in `SmartApifyStorageClient` ([#642](https://github.com/apify/apify-sdk-python/pull/642)) ([3bf285d](https://github.com/apify/apify-sdk-python/commit/3bf285d60f507730954986a80c19ed2e27a38f9c)) by [@vdusek](https://github.com/vdusek) +* Fix local charging log dataset name ([#649](https://github.com/apify/apify-sdk-python/pull/649)) ([fdb1276](https://github.com/apify/apify-sdk-python/commit/fdb1276264aee2687596d87c96d19033fe915823)) by [@vdusek](https://github.com/vdusek), closes [#648](https://github.com/apify/apify-sdk-python/issues/648) + +#### ⚡ Performance + +* Use Apify-provided environment variables to obtain PPE pricing information ([#644](https://github.com/apify/apify-sdk-python/pull/644)) ([0c32f29](https://github.com/apify/apify-sdk-python/commit/0c32f29d6a316f5bacc931595d694f262c925b2b)) by [@Mantisus](https://github.com/Mantisus), closes [#614](https://github.com/apify/apify-sdk-python/issues/614) + +### [3.0.3](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.3) (2025-10-21) + +#### 🐛 Bug Fixes + +* Cache requests in RQ implementations by `id` ([#633](https://github.com/apify/apify-sdk-python/pull/633)) ([76886ce](https://github.com/apify/apify-sdk-python/commit/76886ce496165346a01f67e018547287c211ea54)) by [@Pijukatel](https://github.com/Pijukatel), closes [#630](https://github.com/apify/apify-sdk-python/issues/630) + +### [3.0.2](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.2) (2025-10-17) + +#### 🐛 Bug Fixes + +* Handle None result in single consumer request queue client ([#623](https://github.com/apify/apify-sdk-python/pull/623)) ([451284a](https://github.com/apify/apify-sdk-python/commit/451284a5c633bc5613bd1e9060df286a1c20b259)) by [@janbuchar](https://github.com/janbuchar), closes [#1472](https://github.com/apify/apify-sdk-python/issues/1472) +* Unify Actor context manager with init & exit methods ([#600](https://github.com/apify/apify-sdk-python/pull/600)) ([6b0d084](https://github.com/apify/apify-sdk-python/commit/6b0d0842ae66a3a206bbb682a3e5f81ad552f029)) by [@vdusek](https://github.com/vdusek), closes [#598](https://github.com/apify/apify-sdk-python/issues/598) +* Handle truncated `unique_key` in `list_head` by fetching full request data ([#631](https://github.com/apify/apify-sdk-python/pull/631)) ([4238086](https://github.com/apify/apify-sdk-python/commit/423808678d9155a84a266bf50bb09f1a56466174)) by [@vdusek](https://github.com/vdusek), closes [#627](https://github.com/apify/apify-sdk-python/issues/627) + +### [3.0.1](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.1) (2025-10-08) + +#### 🐛 Bug Fixes + +* Also load input from a file with a .json extension in file system storage ([#617](https://github.com/apify/apify-sdk-python/pull/617)) ([b62804c](https://github.com/apify/apify-sdk-python/commit/b62804c170069cd7aa77572bb9682a156581cbac)) by [@janbuchar](https://github.com/janbuchar) + +### [3.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.0) (2025-09-29) + +* Check out the [Upgrading guide](https://docs.apify.com/sdk/python/docs/upgrading/upgrading-to-v3) to ensure a smooth update. + +#### 🚀 Features + +* Add deduplication to `add_batch_of_requests` ([#534](https://github.com/apify/apify-sdk-python/pull/534)) ([dd03c4d](https://github.com/apify/apify-sdk-python/commit/dd03c4d446f611492adf35f1b5738648ee5a66f7)) by [@Pijukatel](https://github.com/Pijukatel), closes [#514](https://github.com/apify/apify-sdk-python/issues/514) +* Add new methods to ChargingManager ([#580](https://github.com/apify/apify-sdk-python/pull/580)) ([54f7f8b](https://github.com/apify/apify-sdk-python/commit/54f7f8b29c5982be98b595dac11eceff915035c9)) by [@vdusek](https://github.com/vdusek) +* Add support for NDU storages ([#594](https://github.com/apify/apify-sdk-python/pull/594)) ([8721ef5](https://github.com/apify/apify-sdk-python/commit/8721ef5731bcb1a04ad63c930089bf83be29f308)) by [@vdusek](https://github.com/vdusek), closes [#1175](https://github.com/apify/apify-sdk-python/issues/1175) +* Add stats to `ApifyRequestQueueClient` ([#574](https://github.com/apify/apify-sdk-python/pull/574)) ([21f6782](https://github.com/apify/apify-sdk-python/commit/21f6782b444f623aba986b4922cf67bafafd4b2c)) by [@Pijukatel](https://github.com/Pijukatel), closes [#1344](https://github.com/apify/apify-sdk-python/issues/1344) +* Add specialized ApifyRequestQueue clients ([#573](https://github.com/apify/apify-sdk-python/pull/573)) ([f830ab0](https://github.com/apify/apify-sdk-python/commit/f830ab09b1fa12189c9d3297d5cf18a4f2da62fa)) by [@Pijukatel](https://github.com/Pijukatel) + +#### 🐛 Bug Fixes + +* Restrict apify-shared and apify-client versions ([#523](https://github.com/apify/apify-sdk-python/pull/523)) ([b3ae5a9](https://github.com/apify/apify-sdk-python/commit/b3ae5a972a65454a4998eda59c9fcc3f6b7e8579)) by [@vdusek](https://github.com/vdusek) +* Expose `APIFY_USER_IS_PAYING` env var to the configuration ([#507](https://github.com/apify/apify-sdk-python/pull/507)) ([0801e54](https://github.com/apify/apify-sdk-python/commit/0801e54887317c1280cc6828ecd3f2cc53287e76)) by [@stepskop](https://github.com/stepskop) +* Resolve DeprecationWarning in ApifyEventManager ([#555](https://github.com/apify/apify-sdk-python/pull/555)) ([0c5111d](https://github.com/apify/apify-sdk-python/commit/0c5111dafe19796ec1fb9652a44c031bed9758df)) by [@vdusek](https://github.com/vdusek), closes [#343](https://github.com/apify/apify-sdk-python/issues/343) +* Use same `client_key` for `Actor` created `request_queue` and improve its metadata estimation ([#552](https://github.com/apify/apify-sdk-python/pull/552)) ([7e4e5da](https://github.com/apify/apify-sdk-python/commit/7e4e5da81dd87e84ebeef2bd336c6c1d422cb9a7)) by [@Pijukatel](https://github.com/Pijukatel), closes [#536](https://github.com/apify/apify-sdk-python/issues/536) +* Properly process pre-existing Actor input file ([#591](https://github.com/apify/apify-sdk-python/pull/591)) ([cc5075f](https://github.com/apify/apify-sdk-python/commit/cc5075fab8c72ca5711cfd97932037b34e6997cd)) by [@Pijukatel](https://github.com/Pijukatel), closes [#590](https://github.com/apify/apify-sdk-python/issues/590) + +#### ⚙️ Miscellaneous Tasks + +* \[**breaking**] Update apify-client and apify-shared to v2.0 ([#548](https://github.com/apify/apify-sdk-python/pull/548)) ([8ba084d](https://github.com/apify/apify-sdk-python/commit/8ba084ded6cd018111343f2219260b481c8d4e35)) by [@vdusek](https://github.com/vdusek) + +#### 🚜 Refactor + +* \[**breaking**] Adapt to the Crawlee v1.0 ([#470](https://github.com/apify/apify-sdk-python/pull/470)) ([f7e3320](https://github.com/apify/apify-sdk-python/commit/f7e33206cf3e4767faacbdc43511b45b6785f929)) by [@vdusek](https://github.com/vdusek), closes [#469](https://github.com/apify/apify-sdk-python/issues/469), [#540](https://github.com/apify/apify-sdk-python/issues/540) +* \[**breaking**] Replace `httpx` with `impit` ([#560](https://github.com/apify/apify-sdk-python/pull/560)) ([cca3869](https://github.com/apify/apify-sdk-python/commit/cca3869e85968865e56aafcdcb36fbccba27aef0)) by [@Mantisus](https://github.com/Mantisus), closes [#558](https://github.com/apify/apify-sdk-python/issues/558) +* \[**breaking**] Remove `Request.id` field ([#553](https://github.com/apify/apify-sdk-python/pull/553)) ([445ab5d](https://github.com/apify/apify-sdk-python/commit/445ab5d752b785fc2018b35c8adbe779253d7acd)) by [@Pijukatel](https://github.com/Pijukatel) +* \[**breaking**] Make `Actor` initialization stricter and more predictable ([#576](https://github.com/apify/apify-sdk-python/pull/576)) ([912222a](https://github.com/apify/apify-sdk-python/commit/912222a7a8123be66c94c50a2e461276fbfc50c4)) by [@Pijukatel](https://github.com/Pijukatel) +* \[**breaking**] Make default Apify storages use alias mechanism ([#606](https://github.com/apify/apify-sdk-python/pull/606)) ([dbea7d9](https://github.com/apify/apify-sdk-python/commit/dbea7d97fe7f25aa8658a32c5bb46a3800561df5)) by [@Pijukatel](https://github.com/Pijukatel), closes [#599](https://github.com/apify/apify-sdk-python/issues/599) + +### [2.7.3](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.3) (2025-08-11) + +#### 🐛 Bug Fixes + +* Expose `APIFY_USER_IS_PAYING` env var to the configuration (#507) ([0de022c](https://github.com/apify/apify-sdk-python/commit/0de022c3435f24c821053c771e7b659433e3fb6e)) + +### [2.7.2](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.2) (2025-07-30) + +#### 🐛 Bug Fixes + +* Restrict apify-shared and apify-client versions ([#523](https://github.com/apify/apify-sdk-python/pull/523)) ([581ebae](https://github.com/apify/apify-sdk-python/commit/581ebae5752a984a34cbabc02c49945ae392db00)) by [@vdusek](https://github.com/vdusek) + +### [2.7.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.1) (2025-07-24) + +#### 🐛 Bug Fixes + +* Add back support for Python 3.9. + +### [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14) + +#### 🚀 Features + +* Expose `logger` argument on `Actor.call` to control log redirection from started Actor run ([#487](https://github.com/apify/apify-sdk-python/pull/487)) ([aa6fa47](https://github.com/apify/apify-sdk-python/commit/aa6fa4750ea1bc7909be1191c0d276a2046930c2)) by [@Pijukatel](https://github.com/Pijukatel) +* **crypto:** Decrypt secret objects ([#482](https://github.com/apify/apify-sdk-python/pull/482)) ([ce9daf7](https://github.com/apify/apify-sdk-python/commit/ce9daf7381212b8dc194e8a643e5ca0dedbc0078)) by [@MFori](https://github.com/MFori) + +### [2.6.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.6.0) (2025-06-09) + +#### 🚀 Features + +* Add `RemainingTime` option for `timeout` argument of `Actor.call` and `Actor.start` ([#473](https://github.com/apify/apify-sdk-python/pull/473)) ([ba7f757](https://github.com/apify/apify-sdk-python/commit/ba7f757a82661a5a181d9bd767950d09557409f9)) by [@Pijukatel](https://github.com/Pijukatel), closes [#472](https://github.com/apify/apify-sdk-python/issues/472) + +#### 🐛 Bug Fixes + +* Fix duplicate logs from apify logger in Scrapy integration ([#457](https://github.com/apify/apify-sdk-python/pull/457)) ([2745ee6](https://github.com/apify/apify-sdk-python/commit/2745ee6529deecb4f2838c764b9bb3fb6606762b)) by [@vdusek](https://github.com/vdusek), closes [#391](https://github.com/apify/apify-sdk-python/issues/391) +* Prefer proxy password from env var ([#468](https://github.com/apify/apify-sdk-python/pull/468)) ([1c4ad9b](https://github.com/apify/apify-sdk-python/commit/1c4ad9bcfbf6ac404f942d7d2d249b036c2e7f54)) by [@stepskop](https://github.com/stepskop) + +### [2.5.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.5.0) (2025-03-27) + +#### 🚀 Features + +* Implement Scrapy HTTP cache backend ([#403](https://github.com/apify/apify-sdk-python/pull/403)) ([137e3c8](https://github.com/apify/apify-sdk-python/commit/137e3c8d5c6b28cf6935cfb742b5f072cd2e0a02)) by [@honzajavorek](https://github.com/honzajavorek) + +#### 🐛 Bug Fixes + +* Fix calculation of CPU utilization from SystemInfo events ([#447](https://github.com/apify/apify-sdk-python/pull/447)) ([eb4c8e4](https://github.com/apify/apify-sdk-python/commit/eb4c8e4e498e23f573b9e2d4c7dbd8e2ecc277d9)) by [@janbuchar](https://github.com/janbuchar) + +### [2.4.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.4.0) (2025-03-07) + +#### 🚀 Features + +* Update to Crawlee v0.6 ([#420](https://github.com/apify/apify-sdk-python/pull/420)) ([9be4336](https://github.com/apify/apify-sdk-python/commit/9be433667231cc5739861fa693d7a726860d6aca)) by [@vdusek](https://github.com/vdusek) +* Add Actor `exit_process` option ([#424](https://github.com/apify/apify-sdk-python/pull/424)) ([994c832](https://github.com/apify/apify-sdk-python/commit/994c8323b994e009db0ccdcb624891a2fef97070)) by [@vdusek](https://github.com/vdusek), closes [#396](https://github.com/apify/apify-sdk-python/issues/396), [#401](https://github.com/apify/apify-sdk-python/issues/401) +* Upgrade websockets to v14 to adapt to library API changes ([#425](https://github.com/apify/apify-sdk-python/pull/425)) ([5f49275](https://github.com/apify/apify-sdk-python/commit/5f49275ca1177e5ba56856ffe3860f6b97bee9ee)) by [@Mantisus](https://github.com/Mantisus), closes [#325](https://github.com/apify/apify-sdk-python/issues/325) +* Add signing of public URL ([#407](https://github.com/apify/apify-sdk-python/pull/407)) ([a865461](https://github.com/apify/apify-sdk-python/commit/a865461c703aea01d91317f4fdf38c1bedd35f00)) by [@danpoletaev](https://github.com/danpoletaev) + +### [2.3.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.3.1) (2025-02-25) + +#### 🐛 Bug Fixes + +* Allow None value in 'inputBodyLen' in ActorRunStats ([#413](https://github.com/apify/apify-sdk-python/pull/413)) ([1cf37f1](https://github.com/apify/apify-sdk-python/commit/1cf37f13f8db1313ac82276d13200af4aa2bf773)) by [@janbuchar](https://github.com/janbuchar) + +### [2.3.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.3.0) (2025-02-19) + +#### 🚀 Features + +* Add `rate_limit_errors` property for `ApifyStorageClient` ([#387](https://github.com/apify/apify-sdk-python/pull/387)) ([89c230a](https://github.com/apify/apify-sdk-python/commit/89c230a21a1a8698159975f97c73a724b9063278)) by [@Mantisus](https://github.com/Mantisus), closes [#318](https://github.com/apify/apify-sdk-python/issues/318) +* Unify Apify and Scrapy to use single event loop & remove `nest-asyncio` ([#390](https://github.com/apify/apify-sdk-python/pull/390)) ([96949be](https://github.com/apify/apify-sdk-python/commit/96949be4f7687ac9285992d1fb02ac6172307bdb)) by [@vdusek](https://github.com/vdusek), closes [#148](https://github.com/apify/apify-sdk-python/issues/148), [#176](https://github.com/apify/apify-sdk-python/issues/176), [#392](https://github.com/apify/apify-sdk-python/issues/392) +* Support pay-per-event via `Actor.charge` ([#393](https://github.com/apify/apify-sdk-python/pull/393)) ([78888c4](https://github.com/apify/apify-sdk-python/commit/78888c4d6258211cdbc5fd5b5cbadbf23c39d818)) by [@janbuchar](https://github.com/janbuchar), closes [#374](https://github.com/apify/apify-sdk-python/issues/374) + +#### 🐛 Bug Fixes + +* Fix RQ usage in Scrapy scheduler ([#385](https://github.com/apify/apify-sdk-python/pull/385)) ([3363478](https://github.com/apify/apify-sdk-python/commit/3363478dbf6eb35e45c237546fe0df5c104166f6)) by [@vdusek](https://github.com/vdusek) +* Make sure that Actor instances with non-default configurations are also accessible through the global Actor proxy after initialization ([#402](https://github.com/apify/apify-sdk-python/pull/402)) ([b956a02](https://github.com/apify/apify-sdk-python/commit/b956a02d0ba59e0cfde489cc13ca92d7f8f8c84f)) by [@janbuchar](https://github.com/janbuchar), closes [#397](https://github.com/apify/apify-sdk-python/issues/397) + +### [2.2.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.2.1) (2025-01-17) + +#### 🐛 Bug Fixes + +* Better event listener type definitions ([#354](https://github.com/apify/apify-sdk-python/pull/354)) ([52a6dee](https://github.com/apify/apify-sdk-python/commit/52a6dee92cc0cc4fa032dfc8c312545bc5e07206)) by [@janbuchar](https://github.com/janbuchar), closes [#344](https://github.com/apify/apify-sdk-python/issues/344) + +### [2.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.2.0) (2025-01-10) + +#### 🚀 Features + +* Add new config variables to `Actor.config` ([#351](https://github.com/apify/apify-sdk-python/pull/351)) ([7b6478c](https://github.com/apify/apify-sdk-python/commit/7b6478c3fc239b454f733fbd98348dab7b3a1766)) by [@fnesveda](https://github.com/fnesveda) +* Upgrade to Crawlee v0.5 ([#355](https://github.com/apify/apify-sdk-python/pull/355)) ([826f4db](https://github.com/apify/apify-sdk-python/commit/826f4dbcc8cfd693d97e40c17faf91d225d7ffaf)) by [@vdusek](https://github.com/vdusek) + +#### 🐛 Bug Fixes + +* Better error message when attempting to use force\_cloud without an Apify token ([#356](https://github.com/apify/apify-sdk-python/pull/356)) ([33245ce](https://github.com/apify/apify-sdk-python/commit/33245ceddb1fa0ed39548181fb57fb3e6b98f954)) by [@janbuchar](https://github.com/janbuchar) +* Allow calling `Actor.reboot()` from migrating handler, align reboot behavior with JS SDK ([#361](https://github.com/apify/apify-sdk-python/pull/361)) ([7ba0221](https://github.com/apify/apify-sdk-python/commit/7ba022121fe7b65470fec901295f74cebce72610)) by [@fnesveda](https://github.com/fnesveda) + +### [2.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.1.0) (2024-12-03) + +#### 🚀 Features + +* Handle request list user input ([#326](https://github.com/apify/apify-sdk-python/pull/326)) ([c14fb9a](https://github.com/apify/apify-sdk-python/commit/c14fb9a9527c8b699e32ed49d39ce0a69447f87c)) by [@Pijukatel](https://github.com/Pijukatel), closes [#310](https://github.com/apify/apify-sdk-python/issues/310) + +#### 🐛 Bug Fixes + +* Add upper bound of HTTPX version ([#347](https://github.com/apify/apify-sdk-python/pull/347)) ([e86dbce](https://github.com/apify/apify-sdk-python/commit/e86dbce69f6978cf2c15910213655e5d80f62a23)) by [@vdusek](https://github.com/vdusek) + +### [2.0.2](https://github.com/apify/apify-sdk-python/releases/tag/v2.0.2) (2024-11-12) + +#### 🐛 Bug Fixes + +* Fix CPU usage calculation ([#315](https://github.com/apify/apify-sdk-python/pull/315)) ([0521d91](https://github.com/apify/apify-sdk-python/commit/0521d911afbb8029ad29949f69c4f19166a01fc0)) by [@janbuchar](https://github.com/janbuchar) +* Set version constraint of the `websockets` dependency to <14.0.0 ([#322](https://github.com/apify/apify-sdk-python/pull/322)) ([15ad055](https://github.com/apify/apify-sdk-python/commit/15ad0550e7a5508adff3eb35511248c611a0f595)) by [@Pijukatel](https://github.com/Pijukatel) +* Fix Dataset.iter\_items for apify\_storage ([#321](https://github.com/apify/apify-sdk-python/pull/321)) ([2db1beb](https://github.com/apify/apify-sdk-python/commit/2db1beb2d56a7e7954cd76023d1273c7546d7cbf)) by [@Pijukatel](https://github.com/Pijukatel), closes [#320](https://github.com/apify/apify-sdk-python/issues/320) + +### [2.0.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.0.1) (2024-10-25) + +#### 🚀 Features + +* Add standby URL, change default standby port ([#287](https://github.com/apify/apify-sdk-python/pull/287)) ([8cd2f2c](https://github.com/apify/apify-sdk-python/commit/8cd2f2cb9d1191dbc93bf1b8a2d70189881c64ad)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Add crawlee version to system info print ([#304](https://github.com/apify/apify-sdk-python/pull/304)) ([c28f38f](https://github.com/apify/apify-sdk-python/commit/c28f38f4e205515e1b5d1ce97a2072be3a09d338)) by [@vdusek](https://github.com/vdusek) + +#### 🐛 Bug Fixes + +* Adjust tests of scrapy user data ([#284](https://github.com/apify/apify-sdk-python/pull/284)) ([26ffb15](https://github.com/apify/apify-sdk-python/commit/26ffb15797effcfad1a25c840dd3d17663e26ea3)) by [@janbuchar](https://github.com/janbuchar) +* Use HttpHeaders type in Scrapy integration ([#289](https://github.com/apify/apify-sdk-python/pull/289)) ([3e33e91](https://github.com/apify/apify-sdk-python/commit/3e33e9147bfd60554b9da41b032c0451f91ba27b)) by [@vdusek](https://github.com/vdusek) +* Allow empty timeout\_at env variable ([#303](https://github.com/apify/apify-sdk-python/pull/303)) ([b67ec98](https://github.com/apify/apify-sdk-python/commit/b67ec989dfcc21756cc976c52edc25735a3f0501)) by [@janbuchar](https://github.com/janbuchar), closes [#596](https://github.com/apify/apify-sdk-python/issues/596) + +### [2.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.0.0) (2024-09-10) + +* Check out the [Upgrading guide](https://docs.apify.com/sdk/python/docs/upgrading/upgrading-to-v2) to ensure a smooth update. + +#### 🚀 Features + +* Better Actor API typing ([#256](https://github.com/apify/apify-sdk-python/pull/256)) ([abb87e7](https://github.com/apify/apify-sdk-python/commit/abb87e7f3c272f88a9a76292d8394fe93b98428a)) by [@janbuchar](https://github.com/janbuchar), closes [#243](https://github.com/apify/apify-sdk-python/issues/243) +* Expose Request from Crawlee ([#266](https://github.com/apify/apify-sdk-python/pull/266)) ([1f01278](https://github.com/apify/apify-sdk-python/commit/1f01278c77f261500bc74efd700c0583ac45fd82)) by [@vdusek](https://github.com/vdusek) +* Automatically configure logging ([#271](https://github.com/apify/apify-sdk-python/pull/271)) ([1906bb2](https://github.com/apify/apify-sdk-python/commit/1906bb216b8a3f1c2ad740c551ee019c2ba0696f)) by [@janbuchar](https://github.com/janbuchar) + +#### 🐛 Bug Fixes + +* Make apify.log public again ([#249](https://github.com/apify/apify-sdk-python/pull/249)) ([22677f5](https://github.com/apify/apify-sdk-python/commit/22677f57b2aff6c9bddbee305e5a62e39bbf5915)) by [@janbuchar](https://github.com/janbuchar) +* Dataset list response handling ([#257](https://github.com/apify/apify-sdk-python/pull/257)) ([0ea57d7](https://github.com/apify/apify-sdk-python/commit/0ea57d7c4788bff31f215c447c1881e56d6508bb)) by [@janbuchar](https://github.com/janbuchar) +* Ignore deprecated platform events ([#258](https://github.com/apify/apify-sdk-python/pull/258)) ([ed5ab3b](https://github.com/apify/apify-sdk-python/commit/ed5ab3b80c851a817aa87806c39cd8ef3e86fde5)) by [@janbuchar](https://github.com/janbuchar) +* Possible infinity loop in Apify-Scrapy proxy middleware ([#259](https://github.com/apify/apify-sdk-python/pull/259)) ([8647a94](https://github.com/apify/apify-sdk-python/commit/8647a94289423528f2940d9f7174f81682fbb407)) by [@vdusek](https://github.com/vdusek) +* Hotfix for batch\_add\_requests batch size limit ([#261](https://github.com/apify/apify-sdk-python/pull/261)) ([61d7a39](https://github.com/apify/apify-sdk-python/commit/61d7a392d182a752c91193170dca351f4cb0fbf3)) by [@janbuchar](https://github.com/janbuchar) + +#### 🚜 Refactor + +* \[**breaking**] Preparation for v2 release ([#210](https://github.com/apify/apify-sdk-python/pull/210)) ([2f9dcc5](https://github.com/apify/apify-sdk-python/commit/2f9dcc559414f31e3f4fc87e72417a36494b9c84)) by [@janbuchar](https://github.com/janbuchar), closes [#135](https://github.com/apify/apify-sdk-python/issues/135), [#137](https://github.com/apify/apify-sdk-python/issues/137), [#138](https://github.com/apify/apify-sdk-python/issues/138), [#147](https://github.com/apify/apify-sdk-python/issues/147), [#149](https://github.com/apify/apify-sdk-python/issues/149), [#237](https://github.com/apify/apify-sdk-python/issues/237) + +#### ⚙️ Miscellaneous Tasks + +* \[**breaking**] Drop support for Python 3.8 + +### [1.7.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.2) (2024-07-08) + +* Add Actor Standby port + +### [1.7.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.1) (2024-05-23) + +#### 🐛 Bug Fixes + +* Set a timeout for Actor cleanup + +### [1.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.0) (2024-03-12) + +#### 🚀 Features + +* Add a new way of generating the `uniqueKey` field of the request, aligning it with the Crawlee. + +#### 🐛 Bug Fixes + +* Improve error handling for `to_apify_request` serialization failures +* Scrapy's `Request.dont_filter` works. + +### [1.6.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.6.0) (2024-02-23) + +#### 🐛 Bug Fixes + +* Update of Scrapy integration, fixes in `ApifyScheduler`, `to_apify_request` and `apply_apify_settings`. + +#### ⚙️ Miscellaneous Tasks + +* Remove `ApifyRetryMiddleware` and stay with the Scrapy's default one + +### [1.5.5](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.5) (2024-02-01) + +#### 🐛 Bug Fixes + +* Fix conversion of `headers` fields in Apify <--> Scrapy request translation + +### [1.5.4](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.4) (2024-01-24) + +#### 🐛 Bug Fixes + +* Fix conversion of `userData` and `headers` fields in Apify <--> Scrapy request translation + +### [1.5.3](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.3) (2024-01-23) + +#### 🚀 Features + +* Add `apply_apify_settings` function to Scrapy subpackage + +### [1.5.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.2) (2024-01-19) + +#### 🐛 Bug Fixes + +* Add missing import check to `ApifyHttpProxyMiddleware` + +#### ⚙️ Miscellaneous Tasks + +* Create a new subpackage for Scrapy pipelines +* Remove some noqas thanks to the new Ruff release +* Replace relative imports with absolute imports +* Replace asserts with custom checks in Scrapy subpackage + +### [1.5.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.1) (2024-01-10) + +#### ⚙️ Miscellaneous Tasks + +* Allowed running integration tests from PRs from forks, after maintainer approval +* Do not close `nested_event_loop` in the `Scheduler.__del__` + +### [1.5.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.0) (2024-01-03) + +#### 🚀 Features + +* Add `ApifyHttpProxyMiddleware` + +### [1.4.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.4.1) (2023-12-21) + +#### 🐛 Bug Fixes + +* Resolve issue in `ApifyRetryMiddleware.process_exception()`, where requests were getting stuck in the request queue + +#### ⚙️ Miscellaneous Tasks + +* Fix type hint problems for resource clients + +### [1.4.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.4.0) (2023-12-05) + +#### ⚙️ Miscellaneous Tasks + +* Migrate from Autopep8 and Flake8 to Ruff + +### [1.3.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.3.0) (2023-11-15) + +#### 🚀 Features + +* Add `scrapy` extra + +### [1.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.2.0) (2023-10-23) + +#### 🚀 Features + +* Add support for Python 3.12 + +#### ⚙️ Miscellaneous Tasks + +* Fix lint error (E721) in unit tests (for instance checks use `isinstance()`) + +### [1.1.5](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.5) (2023-10-03) + +#### 🚀 Features + +* Update the Apify log formatter to contain an option for adding the logger name + +#### ⚙️ Miscellaneous Tasks + +* Rewrite documentation publication to use Docusaurus +* Remove PR Toolkit workflow + +### [1.1.4](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.4) (2023-09-06) + +#### 🐛 Bug Fixes + +* Resolve issue with querying request queue head multiple times in parallel + +#### ⚙️ Miscellaneous Tasks + +* Fix integration tests for Actor logger +* Remove `pytest-randomly` Pytest plugin +* Unpin `apify-client` and `apify-shared` to improve compatibility with their newer versions + +### [1.1.3](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.3) (2023-08-25) + +#### ⚙️ Miscellaneous Tasks + +* Unify indentation in configuration files +* Update the `Actor.reboot` method to use the new reboot endpoint + +### [1.1.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.2) (2023-08-02) + +#### ⚙️ Miscellaneous Tasks + +* Start importing general constants and utilities from the `apify-shared` library +* Simplify code via `flake8-simplify` +* Start using environment variables with prefix `ACTOR_` instead of some with prefix `APIFY_` +* Pin `apify-client` and `apify-shared` to prevent their implicit updates from breaking SDK + +### [1.1.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.1) (2023-05-23) + +#### 🐛 Bug Fixes + +* Relax dependency requirements to improve compatibility with other libraries + +### [1.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.0) (2023-05-23) + +#### 🚀 Features + +* Add option to add event handlers which accept no arguments +* Add support for `is_terminal` flag in status message update +* Add option to set status message along with `Actor.exit()` + +#### 🐛 Bug Fixes + +* Start enforcing local storage to always use the UTF-8 encoding +* Fix saving key-value store values to local storage with the right extension for a given content type + +#### ⚙️ Miscellaneous Tasks + +* Switch from `setup.py` to `pyproject.toml` for specifying project setup + +### [1.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.0.0) (2023-03-13) + +#### 🐛 Bug Fixes + +* Fix `RequestQueue` not loading requests from an existing queue properly + +#### ⚙️ Miscellaneous Tasks + +* Update to `apify-client` 1.0.0 +* Start triggering base Docker image builds when releasing a new version + +### [0.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v0.2.0) (2023-03-06) + +#### 🚀 Features + +* Add chunking mechanism to push\_data, cleanup TODOs ([#67](https://github.com/apify/apify-sdk-python/pull/67)) ([5f38d51](https://github.com/apify/apify-sdk-python/commit/5f38d51a57912071439ac88405311d2cb7044190)) by [@jirimoravcik](https://github.com/jirimoravcik) + +### [0.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v0.1.0) (2023-02-09) + +#### 🚀 Features + +* Implement MemoryStorage and local storage clients ([#15](https://github.com/apify/apify-sdk-python/pull/15)) ([b7c9886](https://github.com/apify/apify-sdk-python/commit/b7c98869bdc749feadc7b5a0d105fce041506011)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Implement Dataset, KeyValueStore classes, create storage management logic ([#21](https://github.com/apify/apify-sdk-python/pull/21)) ([d1b357c](https://github.com/apify/apify-sdk-python/commit/d1b357cd02f7357137fd9413b105a8ac48b1796b)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Implement RequestQueue class ([#25](https://github.com/apify/apify-sdk-python/pull/25)) ([c6cad34](https://github.com/apify/apify-sdk-python/commit/c6cad3442d1a9a37c3eb3991cf45daed03e74ff5)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Add test for get\_env and is\_at\_home ([#29](https://github.com/apify/apify-sdk-python/pull/29)) ([cc45afb](https://github.com/apify/apify-sdk-python/commit/cc45afbf848db3626054c599cb3a5a2972a48748)) by [@drobnikj](https://github.com/drobnikj) +* Updating pull request toolkit config \[INTERNAL] ([387143c](https://github.com/apify/apify-sdk-python/commit/387143ccf2c32a99c95e9931e5649e558d35daeb)) by [@mtrunkat](https://github.com/mtrunkat) +* Add documentation for `StorageManager` and `StorageClientManager`, open\_\* methods in `Actor` ([#34](https://github.com/apify/apify-sdk-python/pull/34)) ([3f6b942](https://github.com/apify/apify-sdk-python/commit/3f6b9426dc03fea40d80af2e4c8f04ecf2620e8a)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Add tests for actor lifecycle ([#35](https://github.com/apify/apify-sdk-python/pull/35)) ([4674728](https://github.com/apify/apify-sdk-python/commit/4674728905be5076283ff3795332866e8bef6ee8)) by [@drobnikj](https://github.com/drobnikj) +* Add docs for `Dataset`, `KeyValueStore`, and `RequestQueue` ([#37](https://github.com/apify/apify-sdk-python/pull/37)) ([174548e](https://github.com/apify/apify-sdk-python/commit/174548e952b47ee519d1a05c0821a2c42c2fddf6)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Docs string for memory storage clients ([#31](https://github.com/apify/apify-sdk-python/pull/31)) ([8f55d46](https://github.com/apify/apify-sdk-python/commit/8f55d463394307b004193efc43b67b44d030f6de)) by [@drobnikj](https://github.com/drobnikj) +* Add test for storage actor methods ([#39](https://github.com/apify/apify-sdk-python/pull/39)) ([b89bbcf](https://github.com/apify/apify-sdk-python/commit/b89bbcfdcae4f436a68e92f1f60628aea1036dde)) by [@drobnikj](https://github.com/drobnikj) +* Various fixes and improvements ([#41](https://github.com/apify/apify-sdk-python/pull/41)) ([5bae238](https://github.com/apify/apify-sdk-python/commit/5bae238821b3b63c73d0cbadf4b478511cb045d2)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Add the rest unit tests for actor ([#40](https://github.com/apify/apify-sdk-python/pull/40)) ([72d92ea](https://github.com/apify/apify-sdk-python/commit/72d92ea080670ceecc234c149058d2ebe763e3a8)) by [@drobnikj](https://github.com/drobnikj) +* Decrypt input secrets if there are some ([#45](https://github.com/apify/apify-sdk-python/pull/45)) ([6eb1630](https://github.com/apify/apify-sdk-python/commit/6eb163077341218a3f9dcf566986d7464f6ab09e)) by [@drobnikj](https://github.com/drobnikj) +* Add a few integration tests ([#48](https://github.com/apify/apify-sdk-python/pull/48)) ([1843f48](https://github.com/apify/apify-sdk-python/commit/1843f48845e724e1c2682b8d09a6b5c48c57d9ec)) by [@drobnikj](https://github.com/drobnikj) +* Add integration tests for storages, proxy configuration ([#49](https://github.com/apify/apify-sdk-python/pull/49)) ([fd0566e](https://github.com/apify/apify-sdk-python/commit/fd0566ed3b8c85c7884f8bba3cf7394215fabed0)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Unify datetime handling, remove utcnow() ([#52](https://github.com/apify/apify-sdk-python/pull/52)) ([09dd8ac](https://github.com/apify/apify-sdk-python/commit/09dd8ac9dc26afee777f497ed1d2733af1eef848)) by [@jirimoravcik](https://github.com/jirimoravcik) +* Separate ID and name params for `Actor.open_xxx` ([#56](https://github.com/apify/apify-sdk-python/pull/56)) ([a1e962e](https://github.com/apify/apify-sdk-python/commit/a1e962ebe74384baabb96fdbb4f0e0ed2f92e454)) by [@jirimoravcik](https://github.com/jirimoravcik) + +#### 🐛 Bug Fixes + +* Key error for storage name ([#28](https://github.com/apify/apify-sdk-python/pull/28)) ([83b30a9](https://github.com/apify/apify-sdk-python/commit/83b30a90df4d3b173302f1c6006b346091fced60)) by [@drobnikj](https://github.com/drobnikj) + diff --git a/website/versioned_sidebars/version-0.2-sidebars.json b/website/versioned_sidebars/version-0.2-sidebars.json new file mode 100644 index 000000000..59100da19 --- /dev/null +++ b/website/versioned_sidebars/version-0.2-sidebars.json @@ -0,0 +1,27 @@ +{ + "sidebar": [ + { + "type": "doc", + "id": "introduction/introduction" + }, + { + "type": "doc", + "id": "introduction/quick-start" + }, + { + "type": "category", + "label": "Concepts", + "collapsed": true, + "items": [ + { + "type": "autogenerated", + "dirName": "02-concepts" + } + ] + }, + { + "type": "doc", + "id": "changelog" + } + ] +} diff --git a/website/versions.json b/website/versions.json index 8e097de6a..14b588926 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,5 +1,6 @@ [ "3.3", "2.7", - "1.7" + "1.7", + "0.2" ] From 5d5296606114fa748b05934dbfc3be653d29440b Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 14 Apr 2026 16:31:49 +0200 Subject: [PATCH 2/5] fix: resolve spell check CI failures in versioned docs Fix "Retrive" typo in api-typedoc.json and exclude versioned changelogs from typos spell checker (commit hashes trigger false positives). Co-Authored-By: Claude Opus 4.6 (1M context) --- typos.toml | 1 + website/versioned_docs/version-0.2/api-typedoc.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/typos.toml b/typos.toml index 8eee42a9a..eebb1d0b2 100644 --- a/typos.toml +++ b/typos.toml @@ -17,4 +17,5 @@ extend-exclude = [ "*.min.js", "*.min.css", "CHANGELOG.md", + "website/versioned_docs/*/changelog.md", ] diff --git a/website/versioned_docs/version-0.2/api-typedoc.json b/website/versioned_docs/version-0.2/api-typedoc.json index 8a7c8fa5b..262edb81f 100644 --- a/website/versioned_docs/version-0.2/api-typedoc.json +++ b/website/versioned_docs/version-0.2/api-typedoc.json @@ -3008,7 +3008,7 @@ "summary": [ { "kind": "text", - "text": "{\"content\": [\"Retrive the global configuration.\\n\\nThe global configuration applies when you call actor methods via their static versions, e.g. `Actor.init()`.\\nAlso accessible via `Actor.config`.\"]}" + "text": "{\"content\": [\"Retrieve the global configuration.\\n\\nThe global configuration applies when you call actor methods via their static versions, e.g. `Actor.init()`.\\nAlso accessible via `Actor.config`.\"]}" } ] }, @@ -3033,7 +3033,7 @@ "summary": [ { "kind": "text", - "text": "{\"content\": [\"Retrive the global configuration.\\n\\nThe global configuration applies when you call actor methods via their static versions, e.g. `Actor.init()`.\\nAlso accessible via `Actor.config`.\"]}" + "text": "{\"content\": [\"Retrieve the global configuration.\\n\\nThe global configuration applies when you call actor methods via their static versions, e.g. `Actor.init()`.\\nAlso accessible via `Actor.config`.\"]}" } ] }, From 9f543d762511222ea0c9b0a98503a5e8eace5100 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 14 Apr 2026 16:32:49 +0200 Subject: [PATCH 3/5] fix: use glob patterns to exclude all changelog files from spell check Co-Authored-By: Claude Opus 4.6 (1M context) --- typos.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typos.toml b/typos.toml index eebb1d0b2..71b82b413 100644 --- a/typos.toml +++ b/typos.toml @@ -16,6 +16,6 @@ extend-exclude = [ "*.lock", "*.min.js", "*.min.css", - "CHANGELOG.md", - "website/versioned_docs/*/changelog.md", + "**/CHANGELOG.md", + "**/changelog.md", ] From c43af9cdd37603644aa5ada45f0107944646b442 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 14 Apr 2026 16:38:32 +0200 Subject: [PATCH 4/5] fix: remove changelog.md from versioned docs and gitignore it We use a single top-level CHANGELOG for all versions, so per-version changelog files should not be committed in versioned docs. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 1 + .../versioned_docs/version-0.2/changelog.md | 512 ------------------ 2 files changed, 1 insertion(+), 512 deletions(-) delete mode 100644 website/versioned_docs/version-0.2/changelog.md diff --git a/.gitignore b/.gitignore index 6cd3acfa1..77add859a 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,7 @@ Session.vim # Docs docs/changelog.md +website/versioned_docs/*/changelog.md # Website build artifacts, node dependencies website/build diff --git a/website/versioned_docs/version-0.2/changelog.md b/website/versioned_docs/version-0.2/changelog.md deleted file mode 100644 index e3e1fe9f8..000000000 --- a/website/versioned_docs/version-0.2/changelog.md +++ /dev/null @@ -1,512 +0,0 @@ ---- -title: Changelog -sidebar_label: Changelog -toc_max_heading_level: 3 ---- -# Changelog - -All notable changes to this project will be documented in this file. - - - -### 3.3.2 - **not yet released** - -#### 🐛 Bug Fixes - -* **scrapy:** Resolve Crawlee's request data round-trip failure in request conversion ([#832](https://github.com/apify/apify-sdk-python/pull/832)) ([3b9d588](https://github.com/apify/apify-sdk-python/commit/3b9d5888611597a522300c742014c06cc0b857b9)) by [@vdusek](https://github.com/vdusek) -* Treat `default` alias as default storage when in schema ([#827](https://github.com/apify/apify-sdk-python/pull/827)) ([1610d0d](https://github.com/apify/apify-sdk-python/commit/1610d0dda40ba30bd3b4dea28d9fef04c9b7c839)) by [@Pijukatel](https://github.com/Pijukatel) -* Guard ReentrantLock against None task context ([#841](https://github.com/apify/apify-sdk-python/pull/841)) ([193de10](https://github.com/apify/apify-sdk-python/commit/193de10910946ca0ce93bc2fc7c741a26e9f6e9c)) by [@vdusek](https://github.com/vdusek) -* Isolate cleanup steps in Actor `__aexit__` to prevent cascading failures ([#842](https://github.com/apify/apify-sdk-python/pull/842)) ([68c2acf](https://github.com/apify/apify-sdk-python/commit/68c2acf3dba71b78f893fc6f1e816e3a3148f0c9)) by [@vdusek](https://github.com/vdusek) - - - -### [3.3.1](https://github.com/apify/apify-sdk-python/releases/tag/v3.3.1) (2026-03-11) - -#### 🐛 Bug Fixes - -* Fix f-string bugs in charging log message ([#817](https://github.com/apify/apify-sdk-python/pull/817)) ([bcb4050](https://github.com/apify/apify-sdk-python/commit/bcb4050b3f5ade0e577dd7499979dc65c0ba815e)) by [@vdusek](https://github.com/vdusek) -* Fix BeforeValidator treating 0 as falsy in configuration fields ([#819](https://github.com/apify/apify-sdk-python/pull/819)) ([72efe88](https://github.com/apify/apify-sdk-python/commit/72efe883574ef0d05795934337c7f1c8c0d11877)) by [@vdusek](https://github.com/vdusek) -* Clamp negative timedelta in \_get\_remaining\_time() ([#818](https://github.com/apify/apify-sdk-python/pull/818)) ([69b8af9](https://github.com/apify/apify-sdk-python/commit/69b8af9b8d245cfed76875f983f374e05d93bba8)) by [@vdusek](https://github.com/vdusek) -* **scrapy:** Close AsyncThread on scheduler open() failure ([#820](https://github.com/apify/apify-sdk-python/pull/820)) ([7dfaf1a](https://github.com/apify/apify-sdk-python/commit/7dfaf1a5c5af44743bd448a91140d9b074ac44bf)) by [@vdusek](https://github.com/vdusek) -* Keep track of synthetic apify-default-dataset-item events ([#814](https://github.com/apify/apify-sdk-python/pull/814)) ([50c4b6c](https://github.com/apify/apify-sdk-python/commit/50c4b6ce80b45da5348a74c559b8790edbeae04a)) by [@Mantisus](https://github.com/Mantisus), closes [#705](https://github.com/apify/apify-sdk-python/issues/705), [#760](https://github.com/apify/apify-sdk-python/issues/760) - -### [3.3.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.3.0) (2026-02-25) - -#### 🚀 Features - -* Support Actor schema storages with Alias mechanism ([#797](https://github.com/apify/apify-sdk-python/pull/797)) ([10986ac](https://github.com/apify/apify-sdk-python/commit/10986ac2f4a3d1112aa06eaf26f82884ab9c455a)) by [@Pijukatel](https://github.com/Pijukatel), closes [#762](https://github.com/apify/apify-sdk-python/issues/762) -* Migrate to Scrapy's native AsyncCrawlerRunner ([#793](https://github.com/apify/apify-sdk-python/pull/793)) ([01ad9da](https://github.com/apify/apify-sdk-python/commit/01ad9daf834894f798bbfa4362fc7d7f95bafe5c)) by [@vdusek](https://github.com/vdusek), closes [#638](https://github.com/apify/apify-sdk-python/issues/638) - -#### 🐛 Bug Fixes - -* Resolve LogRecord attribute conflict in event manager logging ([#802](https://github.com/apify/apify-sdk-python/pull/802)) ([e1bdbc9](https://github.com/apify/apify-sdk-python/commit/e1bdbc9e303c24571b9511f43ec0815e7e9f4b55)) by [@vdusek](https://github.com/vdusek) -* Update models.py to align with the current API behavior ([#782](https://github.com/apify/apify-sdk-python/pull/782)) ([b06355d](https://github.com/apify/apify-sdk-python/commit/b06355dbc1c8276e9930ecbde72795b6570dde33)) by [@vdusek](https://github.com/vdusek), closes [#778](https://github.com/apify/apify-sdk-python/issues/778) -* Handle `ServiceConflictError` when reusing `Actor` across sequential context ([#804](https://github.com/apify/apify-sdk-python/pull/804)) ([9e5078f](https://github.com/apify/apify-sdk-python/commit/9e5078fa7b1a19e44893bd3409b45108519aef63)) by [@Mantisus](https://github.com/Mantisus), closes [#678](https://github.com/apify/apify-sdk-python/issues/678) - -### [3.2.1](https://github.com/apify/apify-sdk-python/releases/tag/v3.2.1) (2026-02-17) - -#### 🐛 Bug Fixes - -* Fix crawler deadlock when API fails during marking request as handled ([#768](https://github.com/apify/apify-sdk-python/pull/768)) ([66ed5ea](https://github.com/apify/apify-sdk-python/commit/66ed5eaf819f9c9f411c814606187d76d32a4e11)) by [@Pijukatel](https://github.com/Pijukatel), closes [#1694](https://github.com/apify/apify-sdk-python/issues/1694) -* Use hashed request\_id as cache key in shared RQ client reclaim\_request ([#795](https://github.com/apify/apify-sdk-python/pull/795)) ([bd7572f](https://github.com/apify/apify-sdk-python/commit/bd7572f5b66e9417e4fa1c021b4d47a86b4cb8cf)) by [@vdusek](https://github.com/vdusek) -* Correct inverted return value in Scrapy scheduler enqueue\_request ([#794](https://github.com/apify/apify-sdk-python/pull/794)) ([405cf5d](https://github.com/apify/apify-sdk-python/commit/405cf5dc96f9fd794eaf570ffc877d503829244a)) by [@vdusek](https://github.com/vdusek) -* Eliminate race condition in \_fetch\_requests\_from\_url ([#796](https://github.com/apify/apify-sdk-python/pull/796)) ([c0a74b9](https://github.com/apify/apify-sdk-python/commit/c0a74b9eaf8032510528c2a9ab93c4840a51e79f)) by [@vdusek](https://github.com/vdusek) - -### [3.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.2.0) (2026-02-11) - -#### 🚀 Features - -* Add `Actor` method `use_state` ([#738](https://github.com/apify/apify-sdk-python/pull/738)) ([8a78b6f](https://github.com/apify/apify-sdk-python/commit/8a78b6fc9324e948b3481b07a3582215d3c966fe)) by [@Mantisus](https://github.com/Mantisus), closes [#735](https://github.com/apify/apify-sdk-python/issues/735) - -#### 🐛 Bug Fixes - -* Stop silently swallowing exceptions in request queue ([#777](https://github.com/apify/apify-sdk-python/pull/777)) ([6358d66](https://github.com/apify/apify-sdk-python/commit/6358d66aeb83484845b17f7c8632b6c763cef368)) by [@vdusek](https://github.com/vdusek) -* Handle TimeoutError in Actor **aexit** to prevent resource leaks ([#776](https://github.com/apify/apify-sdk-python/pull/776)) ([fb13765](https://github.com/apify/apify-sdk-python/commit/fb13765448a2a6e2b776de819ece68f90abff1e3)) by [@vdusek](https://github.com/vdusek) -* Pass name instead of id for name param in SmartApifyStorageClient ([#775](https://github.com/apify/apify-sdk-python/pull/775)) ([56cfc38](https://github.com/apify/apify-sdk-python/commit/56cfc38aa98a2a6689dd077e9d5c5d8729872413)) by [@vdusek](https://github.com/vdusek) - -### [3.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.1.0) (2025-12-08) - -#### 🚀 Features - -* Add support for Python 3.14 ([#680](https://github.com/apify/apify-sdk-python/pull/680)) ([b81e86a](https://github.com/apify/apify-sdk-python/commit/b81e86ad294b953f72bce944739649eac3789ebc)) by [@Mantisus](https://github.com/Mantisus) -* Add `ACTOR_PERMISSION_LEVEL` to the configuration ([#689](https://github.com/apify/apify-sdk-python/pull/689)) ([68012c7](https://github.com/apify/apify-sdk-python/commit/68012c7dfe5e4a8b043ce4075826e63c0262ae2e)) by [@stepskop](https://github.com/stepskop), closes [#690](https://github.com/apify/apify-sdk-python/issues/690) - -#### 🐛 Bug Fixes - -* Make `ApifyFileSystemStorageClient` compatible with the apify cli ([#677](https://github.com/apify/apify-sdk-python/pull/677)) ([a32274f](https://github.com/apify/apify-sdk-python/commit/a32274f26b1d2ae4fcf36958e799bf412941464a)) by [@Pijukatel](https://github.com/Pijukatel) -* Synchronize charge operations to prevent race conditions ([#684](https://github.com/apify/apify-sdk-python/pull/684)) ([1c7a9e6](https://github.com/apify/apify-sdk-python/commit/1c7a9e6f386105630c3c1de7ffa092e369698aa0)) by [@vdusek](https://github.com/vdusek), closes [#666](https://github.com/apify/apify-sdk-python/issues/666) - -### [3.0.5](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.5) (2025-11-18) - -#### 🐛 Bug Fixes - -* Fix crash in `Actor.push_data` with PPE and a strict charging limit ([#664](https://github.com/apify/apify-sdk-python/pull/664)) ([8f2e4b2](https://github.com/apify/apify-sdk-python/commit/8f2e4b2cc1f62e9a09656b4d3334caf840338a3a)) by [@janbuchar](https://github.com/janbuchar) -* Avoid charge calls with count=0 ([#665](https://github.com/apify/apify-sdk-python/pull/665)) ([a0f894e](https://github.com/apify/apify-sdk-python/commit/a0f894e879225eb1b639c4f897a1dd0103903c78)) by [@janbuchar](https://github.com/janbuchar) -* Fix Actor.charge behavior when the budget is overdrawn ([#668](https://github.com/apify/apify-sdk-python/pull/668)) ([88e6ba3](https://github.com/apify/apify-sdk-python/commit/88e6ba340a68dcf5e272ee947f4e38ce0f3dea46)) by [@janbuchar](https://github.com/janbuchar) -* Fix detection of whether any instance is initialized ([#675](https://github.com/apify/apify-sdk-python/pull/675)) ([b2355cf](https://github.com/apify/apify-sdk-python/commit/b2355cf697aac6383a404e1bbbefbecd5f38c760)) by [@vdusek](https://github.com/vdusek), closes [#674](https://github.com/apify/apify-sdk-python/issues/674) -* Update apify client to fix rare `JSONDecodeError` ([#679](https://github.com/apify/apify-sdk-python/pull/679)) ([17c13d1](https://github.com/apify/apify-sdk-python/commit/17c13d1ecfbe231fdc4f91c5a24abe65b8abdb26)) by [@Pijukatel](https://github.com/Pijukatel), closes [#672](https://github.com/apify/apify-sdk-python/issues/672) - -### [3.0.4](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.4) (2025-11-03) - -#### 🐛 Bug Fixes - -* Fix type of `cloud_storage_client` in `SmartApifyStorageClient` ([#642](https://github.com/apify/apify-sdk-python/pull/642)) ([3bf285d](https://github.com/apify/apify-sdk-python/commit/3bf285d60f507730954986a80c19ed2e27a38f9c)) by [@vdusek](https://github.com/vdusek) -* Fix local charging log dataset name ([#649](https://github.com/apify/apify-sdk-python/pull/649)) ([fdb1276](https://github.com/apify/apify-sdk-python/commit/fdb1276264aee2687596d87c96d19033fe915823)) by [@vdusek](https://github.com/vdusek), closes [#648](https://github.com/apify/apify-sdk-python/issues/648) - -#### ⚡ Performance - -* Use Apify-provided environment variables to obtain PPE pricing information ([#644](https://github.com/apify/apify-sdk-python/pull/644)) ([0c32f29](https://github.com/apify/apify-sdk-python/commit/0c32f29d6a316f5bacc931595d694f262c925b2b)) by [@Mantisus](https://github.com/Mantisus), closes [#614](https://github.com/apify/apify-sdk-python/issues/614) - -### [3.0.3](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.3) (2025-10-21) - -#### 🐛 Bug Fixes - -* Cache requests in RQ implementations by `id` ([#633](https://github.com/apify/apify-sdk-python/pull/633)) ([76886ce](https://github.com/apify/apify-sdk-python/commit/76886ce496165346a01f67e018547287c211ea54)) by [@Pijukatel](https://github.com/Pijukatel), closes [#630](https://github.com/apify/apify-sdk-python/issues/630) - -### [3.0.2](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.2) (2025-10-17) - -#### 🐛 Bug Fixes - -* Handle None result in single consumer request queue client ([#623](https://github.com/apify/apify-sdk-python/pull/623)) ([451284a](https://github.com/apify/apify-sdk-python/commit/451284a5c633bc5613bd1e9060df286a1c20b259)) by [@janbuchar](https://github.com/janbuchar), closes [#1472](https://github.com/apify/apify-sdk-python/issues/1472) -* Unify Actor context manager with init & exit methods ([#600](https://github.com/apify/apify-sdk-python/pull/600)) ([6b0d084](https://github.com/apify/apify-sdk-python/commit/6b0d0842ae66a3a206bbb682a3e5f81ad552f029)) by [@vdusek](https://github.com/vdusek), closes [#598](https://github.com/apify/apify-sdk-python/issues/598) -* Handle truncated `unique_key` in `list_head` by fetching full request data ([#631](https://github.com/apify/apify-sdk-python/pull/631)) ([4238086](https://github.com/apify/apify-sdk-python/commit/423808678d9155a84a266bf50bb09f1a56466174)) by [@vdusek](https://github.com/vdusek), closes [#627](https://github.com/apify/apify-sdk-python/issues/627) - -### [3.0.1](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.1) (2025-10-08) - -#### 🐛 Bug Fixes - -* Also load input from a file with a .json extension in file system storage ([#617](https://github.com/apify/apify-sdk-python/pull/617)) ([b62804c](https://github.com/apify/apify-sdk-python/commit/b62804c170069cd7aa77572bb9682a156581cbac)) by [@janbuchar](https://github.com/janbuchar) - -### [3.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.0) (2025-09-29) - -* Check out the [Upgrading guide](https://docs.apify.com/sdk/python/docs/upgrading/upgrading-to-v3) to ensure a smooth update. - -#### 🚀 Features - -* Add deduplication to `add_batch_of_requests` ([#534](https://github.com/apify/apify-sdk-python/pull/534)) ([dd03c4d](https://github.com/apify/apify-sdk-python/commit/dd03c4d446f611492adf35f1b5738648ee5a66f7)) by [@Pijukatel](https://github.com/Pijukatel), closes [#514](https://github.com/apify/apify-sdk-python/issues/514) -* Add new methods to ChargingManager ([#580](https://github.com/apify/apify-sdk-python/pull/580)) ([54f7f8b](https://github.com/apify/apify-sdk-python/commit/54f7f8b29c5982be98b595dac11eceff915035c9)) by [@vdusek](https://github.com/vdusek) -* Add support for NDU storages ([#594](https://github.com/apify/apify-sdk-python/pull/594)) ([8721ef5](https://github.com/apify/apify-sdk-python/commit/8721ef5731bcb1a04ad63c930089bf83be29f308)) by [@vdusek](https://github.com/vdusek), closes [#1175](https://github.com/apify/apify-sdk-python/issues/1175) -* Add stats to `ApifyRequestQueueClient` ([#574](https://github.com/apify/apify-sdk-python/pull/574)) ([21f6782](https://github.com/apify/apify-sdk-python/commit/21f6782b444f623aba986b4922cf67bafafd4b2c)) by [@Pijukatel](https://github.com/Pijukatel), closes [#1344](https://github.com/apify/apify-sdk-python/issues/1344) -* Add specialized ApifyRequestQueue clients ([#573](https://github.com/apify/apify-sdk-python/pull/573)) ([f830ab0](https://github.com/apify/apify-sdk-python/commit/f830ab09b1fa12189c9d3297d5cf18a4f2da62fa)) by [@Pijukatel](https://github.com/Pijukatel) - -#### 🐛 Bug Fixes - -* Restrict apify-shared and apify-client versions ([#523](https://github.com/apify/apify-sdk-python/pull/523)) ([b3ae5a9](https://github.com/apify/apify-sdk-python/commit/b3ae5a972a65454a4998eda59c9fcc3f6b7e8579)) by [@vdusek](https://github.com/vdusek) -* Expose `APIFY_USER_IS_PAYING` env var to the configuration ([#507](https://github.com/apify/apify-sdk-python/pull/507)) ([0801e54](https://github.com/apify/apify-sdk-python/commit/0801e54887317c1280cc6828ecd3f2cc53287e76)) by [@stepskop](https://github.com/stepskop) -* Resolve DeprecationWarning in ApifyEventManager ([#555](https://github.com/apify/apify-sdk-python/pull/555)) ([0c5111d](https://github.com/apify/apify-sdk-python/commit/0c5111dafe19796ec1fb9652a44c031bed9758df)) by [@vdusek](https://github.com/vdusek), closes [#343](https://github.com/apify/apify-sdk-python/issues/343) -* Use same `client_key` for `Actor` created `request_queue` and improve its metadata estimation ([#552](https://github.com/apify/apify-sdk-python/pull/552)) ([7e4e5da](https://github.com/apify/apify-sdk-python/commit/7e4e5da81dd87e84ebeef2bd336c6c1d422cb9a7)) by [@Pijukatel](https://github.com/Pijukatel), closes [#536](https://github.com/apify/apify-sdk-python/issues/536) -* Properly process pre-existing Actor input file ([#591](https://github.com/apify/apify-sdk-python/pull/591)) ([cc5075f](https://github.com/apify/apify-sdk-python/commit/cc5075fab8c72ca5711cfd97932037b34e6997cd)) by [@Pijukatel](https://github.com/Pijukatel), closes [#590](https://github.com/apify/apify-sdk-python/issues/590) - -#### ⚙️ Miscellaneous Tasks - -* \[**breaking**] Update apify-client and apify-shared to v2.0 ([#548](https://github.com/apify/apify-sdk-python/pull/548)) ([8ba084d](https://github.com/apify/apify-sdk-python/commit/8ba084ded6cd018111343f2219260b481c8d4e35)) by [@vdusek](https://github.com/vdusek) - -#### 🚜 Refactor - -* \[**breaking**] Adapt to the Crawlee v1.0 ([#470](https://github.com/apify/apify-sdk-python/pull/470)) ([f7e3320](https://github.com/apify/apify-sdk-python/commit/f7e33206cf3e4767faacbdc43511b45b6785f929)) by [@vdusek](https://github.com/vdusek), closes [#469](https://github.com/apify/apify-sdk-python/issues/469), [#540](https://github.com/apify/apify-sdk-python/issues/540) -* \[**breaking**] Replace `httpx` with `impit` ([#560](https://github.com/apify/apify-sdk-python/pull/560)) ([cca3869](https://github.com/apify/apify-sdk-python/commit/cca3869e85968865e56aafcdcb36fbccba27aef0)) by [@Mantisus](https://github.com/Mantisus), closes [#558](https://github.com/apify/apify-sdk-python/issues/558) -* \[**breaking**] Remove `Request.id` field ([#553](https://github.com/apify/apify-sdk-python/pull/553)) ([445ab5d](https://github.com/apify/apify-sdk-python/commit/445ab5d752b785fc2018b35c8adbe779253d7acd)) by [@Pijukatel](https://github.com/Pijukatel) -* \[**breaking**] Make `Actor` initialization stricter and more predictable ([#576](https://github.com/apify/apify-sdk-python/pull/576)) ([912222a](https://github.com/apify/apify-sdk-python/commit/912222a7a8123be66c94c50a2e461276fbfc50c4)) by [@Pijukatel](https://github.com/Pijukatel) -* \[**breaking**] Make default Apify storages use alias mechanism ([#606](https://github.com/apify/apify-sdk-python/pull/606)) ([dbea7d9](https://github.com/apify/apify-sdk-python/commit/dbea7d97fe7f25aa8658a32c5bb46a3800561df5)) by [@Pijukatel](https://github.com/Pijukatel), closes [#599](https://github.com/apify/apify-sdk-python/issues/599) - -### [2.7.3](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.3) (2025-08-11) - -#### 🐛 Bug Fixes - -* Expose `APIFY_USER_IS_PAYING` env var to the configuration (#507) ([0de022c](https://github.com/apify/apify-sdk-python/commit/0de022c3435f24c821053c771e7b659433e3fb6e)) - -### [2.7.2](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.2) (2025-07-30) - -#### 🐛 Bug Fixes - -* Restrict apify-shared and apify-client versions ([#523](https://github.com/apify/apify-sdk-python/pull/523)) ([581ebae](https://github.com/apify/apify-sdk-python/commit/581ebae5752a984a34cbabc02c49945ae392db00)) by [@vdusek](https://github.com/vdusek) - -### [2.7.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.1) (2025-07-24) - -#### 🐛 Bug Fixes - -* Add back support for Python 3.9. - -### [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14) - -#### 🚀 Features - -* Expose `logger` argument on `Actor.call` to control log redirection from started Actor run ([#487](https://github.com/apify/apify-sdk-python/pull/487)) ([aa6fa47](https://github.com/apify/apify-sdk-python/commit/aa6fa4750ea1bc7909be1191c0d276a2046930c2)) by [@Pijukatel](https://github.com/Pijukatel) -* **crypto:** Decrypt secret objects ([#482](https://github.com/apify/apify-sdk-python/pull/482)) ([ce9daf7](https://github.com/apify/apify-sdk-python/commit/ce9daf7381212b8dc194e8a643e5ca0dedbc0078)) by [@MFori](https://github.com/MFori) - -### [2.6.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.6.0) (2025-06-09) - -#### 🚀 Features - -* Add `RemainingTime` option for `timeout` argument of `Actor.call` and `Actor.start` ([#473](https://github.com/apify/apify-sdk-python/pull/473)) ([ba7f757](https://github.com/apify/apify-sdk-python/commit/ba7f757a82661a5a181d9bd767950d09557409f9)) by [@Pijukatel](https://github.com/Pijukatel), closes [#472](https://github.com/apify/apify-sdk-python/issues/472) - -#### 🐛 Bug Fixes - -* Fix duplicate logs from apify logger in Scrapy integration ([#457](https://github.com/apify/apify-sdk-python/pull/457)) ([2745ee6](https://github.com/apify/apify-sdk-python/commit/2745ee6529deecb4f2838c764b9bb3fb6606762b)) by [@vdusek](https://github.com/vdusek), closes [#391](https://github.com/apify/apify-sdk-python/issues/391) -* Prefer proxy password from env var ([#468](https://github.com/apify/apify-sdk-python/pull/468)) ([1c4ad9b](https://github.com/apify/apify-sdk-python/commit/1c4ad9bcfbf6ac404f942d7d2d249b036c2e7f54)) by [@stepskop](https://github.com/stepskop) - -### [2.5.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.5.0) (2025-03-27) - -#### 🚀 Features - -* Implement Scrapy HTTP cache backend ([#403](https://github.com/apify/apify-sdk-python/pull/403)) ([137e3c8](https://github.com/apify/apify-sdk-python/commit/137e3c8d5c6b28cf6935cfb742b5f072cd2e0a02)) by [@honzajavorek](https://github.com/honzajavorek) - -#### 🐛 Bug Fixes - -* Fix calculation of CPU utilization from SystemInfo events ([#447](https://github.com/apify/apify-sdk-python/pull/447)) ([eb4c8e4](https://github.com/apify/apify-sdk-python/commit/eb4c8e4e498e23f573b9e2d4c7dbd8e2ecc277d9)) by [@janbuchar](https://github.com/janbuchar) - -### [2.4.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.4.0) (2025-03-07) - -#### 🚀 Features - -* Update to Crawlee v0.6 ([#420](https://github.com/apify/apify-sdk-python/pull/420)) ([9be4336](https://github.com/apify/apify-sdk-python/commit/9be433667231cc5739861fa693d7a726860d6aca)) by [@vdusek](https://github.com/vdusek) -* Add Actor `exit_process` option ([#424](https://github.com/apify/apify-sdk-python/pull/424)) ([994c832](https://github.com/apify/apify-sdk-python/commit/994c8323b994e009db0ccdcb624891a2fef97070)) by [@vdusek](https://github.com/vdusek), closes [#396](https://github.com/apify/apify-sdk-python/issues/396), [#401](https://github.com/apify/apify-sdk-python/issues/401) -* Upgrade websockets to v14 to adapt to library API changes ([#425](https://github.com/apify/apify-sdk-python/pull/425)) ([5f49275](https://github.com/apify/apify-sdk-python/commit/5f49275ca1177e5ba56856ffe3860f6b97bee9ee)) by [@Mantisus](https://github.com/Mantisus), closes [#325](https://github.com/apify/apify-sdk-python/issues/325) -* Add signing of public URL ([#407](https://github.com/apify/apify-sdk-python/pull/407)) ([a865461](https://github.com/apify/apify-sdk-python/commit/a865461c703aea01d91317f4fdf38c1bedd35f00)) by [@danpoletaev](https://github.com/danpoletaev) - -### [2.3.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.3.1) (2025-02-25) - -#### 🐛 Bug Fixes - -* Allow None value in 'inputBodyLen' in ActorRunStats ([#413](https://github.com/apify/apify-sdk-python/pull/413)) ([1cf37f1](https://github.com/apify/apify-sdk-python/commit/1cf37f13f8db1313ac82276d13200af4aa2bf773)) by [@janbuchar](https://github.com/janbuchar) - -### [2.3.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.3.0) (2025-02-19) - -#### 🚀 Features - -* Add `rate_limit_errors` property for `ApifyStorageClient` ([#387](https://github.com/apify/apify-sdk-python/pull/387)) ([89c230a](https://github.com/apify/apify-sdk-python/commit/89c230a21a1a8698159975f97c73a724b9063278)) by [@Mantisus](https://github.com/Mantisus), closes [#318](https://github.com/apify/apify-sdk-python/issues/318) -* Unify Apify and Scrapy to use single event loop & remove `nest-asyncio` ([#390](https://github.com/apify/apify-sdk-python/pull/390)) ([96949be](https://github.com/apify/apify-sdk-python/commit/96949be4f7687ac9285992d1fb02ac6172307bdb)) by [@vdusek](https://github.com/vdusek), closes [#148](https://github.com/apify/apify-sdk-python/issues/148), [#176](https://github.com/apify/apify-sdk-python/issues/176), [#392](https://github.com/apify/apify-sdk-python/issues/392) -* Support pay-per-event via `Actor.charge` ([#393](https://github.com/apify/apify-sdk-python/pull/393)) ([78888c4](https://github.com/apify/apify-sdk-python/commit/78888c4d6258211cdbc5fd5b5cbadbf23c39d818)) by [@janbuchar](https://github.com/janbuchar), closes [#374](https://github.com/apify/apify-sdk-python/issues/374) - -#### 🐛 Bug Fixes - -* Fix RQ usage in Scrapy scheduler ([#385](https://github.com/apify/apify-sdk-python/pull/385)) ([3363478](https://github.com/apify/apify-sdk-python/commit/3363478dbf6eb35e45c237546fe0df5c104166f6)) by [@vdusek](https://github.com/vdusek) -* Make sure that Actor instances with non-default configurations are also accessible through the global Actor proxy after initialization ([#402](https://github.com/apify/apify-sdk-python/pull/402)) ([b956a02](https://github.com/apify/apify-sdk-python/commit/b956a02d0ba59e0cfde489cc13ca92d7f8f8c84f)) by [@janbuchar](https://github.com/janbuchar), closes [#397](https://github.com/apify/apify-sdk-python/issues/397) - -### [2.2.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.2.1) (2025-01-17) - -#### 🐛 Bug Fixes - -* Better event listener type definitions ([#354](https://github.com/apify/apify-sdk-python/pull/354)) ([52a6dee](https://github.com/apify/apify-sdk-python/commit/52a6dee92cc0cc4fa032dfc8c312545bc5e07206)) by [@janbuchar](https://github.com/janbuchar), closes [#344](https://github.com/apify/apify-sdk-python/issues/344) - -### [2.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.2.0) (2025-01-10) - -#### 🚀 Features - -* Add new config variables to `Actor.config` ([#351](https://github.com/apify/apify-sdk-python/pull/351)) ([7b6478c](https://github.com/apify/apify-sdk-python/commit/7b6478c3fc239b454f733fbd98348dab7b3a1766)) by [@fnesveda](https://github.com/fnesveda) -* Upgrade to Crawlee v0.5 ([#355](https://github.com/apify/apify-sdk-python/pull/355)) ([826f4db](https://github.com/apify/apify-sdk-python/commit/826f4dbcc8cfd693d97e40c17faf91d225d7ffaf)) by [@vdusek](https://github.com/vdusek) - -#### 🐛 Bug Fixes - -* Better error message when attempting to use force\_cloud without an Apify token ([#356](https://github.com/apify/apify-sdk-python/pull/356)) ([33245ce](https://github.com/apify/apify-sdk-python/commit/33245ceddb1fa0ed39548181fb57fb3e6b98f954)) by [@janbuchar](https://github.com/janbuchar) -* Allow calling `Actor.reboot()` from migrating handler, align reboot behavior with JS SDK ([#361](https://github.com/apify/apify-sdk-python/pull/361)) ([7ba0221](https://github.com/apify/apify-sdk-python/commit/7ba022121fe7b65470fec901295f74cebce72610)) by [@fnesveda](https://github.com/fnesveda) - -### [2.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.1.0) (2024-12-03) - -#### 🚀 Features - -* Handle request list user input ([#326](https://github.com/apify/apify-sdk-python/pull/326)) ([c14fb9a](https://github.com/apify/apify-sdk-python/commit/c14fb9a9527c8b699e32ed49d39ce0a69447f87c)) by [@Pijukatel](https://github.com/Pijukatel), closes [#310](https://github.com/apify/apify-sdk-python/issues/310) - -#### 🐛 Bug Fixes - -* Add upper bound of HTTPX version ([#347](https://github.com/apify/apify-sdk-python/pull/347)) ([e86dbce](https://github.com/apify/apify-sdk-python/commit/e86dbce69f6978cf2c15910213655e5d80f62a23)) by [@vdusek](https://github.com/vdusek) - -### [2.0.2](https://github.com/apify/apify-sdk-python/releases/tag/v2.0.2) (2024-11-12) - -#### 🐛 Bug Fixes - -* Fix CPU usage calculation ([#315](https://github.com/apify/apify-sdk-python/pull/315)) ([0521d91](https://github.com/apify/apify-sdk-python/commit/0521d911afbb8029ad29949f69c4f19166a01fc0)) by [@janbuchar](https://github.com/janbuchar) -* Set version constraint of the `websockets` dependency to <14.0.0 ([#322](https://github.com/apify/apify-sdk-python/pull/322)) ([15ad055](https://github.com/apify/apify-sdk-python/commit/15ad0550e7a5508adff3eb35511248c611a0f595)) by [@Pijukatel](https://github.com/Pijukatel) -* Fix Dataset.iter\_items for apify\_storage ([#321](https://github.com/apify/apify-sdk-python/pull/321)) ([2db1beb](https://github.com/apify/apify-sdk-python/commit/2db1beb2d56a7e7954cd76023d1273c7546d7cbf)) by [@Pijukatel](https://github.com/Pijukatel), closes [#320](https://github.com/apify/apify-sdk-python/issues/320) - -### [2.0.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.0.1) (2024-10-25) - -#### 🚀 Features - -* Add standby URL, change default standby port ([#287](https://github.com/apify/apify-sdk-python/pull/287)) ([8cd2f2c](https://github.com/apify/apify-sdk-python/commit/8cd2f2cb9d1191dbc93bf1b8a2d70189881c64ad)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Add crawlee version to system info print ([#304](https://github.com/apify/apify-sdk-python/pull/304)) ([c28f38f](https://github.com/apify/apify-sdk-python/commit/c28f38f4e205515e1b5d1ce97a2072be3a09d338)) by [@vdusek](https://github.com/vdusek) - -#### 🐛 Bug Fixes - -* Adjust tests of scrapy user data ([#284](https://github.com/apify/apify-sdk-python/pull/284)) ([26ffb15](https://github.com/apify/apify-sdk-python/commit/26ffb15797effcfad1a25c840dd3d17663e26ea3)) by [@janbuchar](https://github.com/janbuchar) -* Use HttpHeaders type in Scrapy integration ([#289](https://github.com/apify/apify-sdk-python/pull/289)) ([3e33e91](https://github.com/apify/apify-sdk-python/commit/3e33e9147bfd60554b9da41b032c0451f91ba27b)) by [@vdusek](https://github.com/vdusek) -* Allow empty timeout\_at env variable ([#303](https://github.com/apify/apify-sdk-python/pull/303)) ([b67ec98](https://github.com/apify/apify-sdk-python/commit/b67ec989dfcc21756cc976c52edc25735a3f0501)) by [@janbuchar](https://github.com/janbuchar), closes [#596](https://github.com/apify/apify-sdk-python/issues/596) - -### [2.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.0.0) (2024-09-10) - -* Check out the [Upgrading guide](https://docs.apify.com/sdk/python/docs/upgrading/upgrading-to-v2) to ensure a smooth update. - -#### 🚀 Features - -* Better Actor API typing ([#256](https://github.com/apify/apify-sdk-python/pull/256)) ([abb87e7](https://github.com/apify/apify-sdk-python/commit/abb87e7f3c272f88a9a76292d8394fe93b98428a)) by [@janbuchar](https://github.com/janbuchar), closes [#243](https://github.com/apify/apify-sdk-python/issues/243) -* Expose Request from Crawlee ([#266](https://github.com/apify/apify-sdk-python/pull/266)) ([1f01278](https://github.com/apify/apify-sdk-python/commit/1f01278c77f261500bc74efd700c0583ac45fd82)) by [@vdusek](https://github.com/vdusek) -* Automatically configure logging ([#271](https://github.com/apify/apify-sdk-python/pull/271)) ([1906bb2](https://github.com/apify/apify-sdk-python/commit/1906bb216b8a3f1c2ad740c551ee019c2ba0696f)) by [@janbuchar](https://github.com/janbuchar) - -#### 🐛 Bug Fixes - -* Make apify.log public again ([#249](https://github.com/apify/apify-sdk-python/pull/249)) ([22677f5](https://github.com/apify/apify-sdk-python/commit/22677f57b2aff6c9bddbee305e5a62e39bbf5915)) by [@janbuchar](https://github.com/janbuchar) -* Dataset list response handling ([#257](https://github.com/apify/apify-sdk-python/pull/257)) ([0ea57d7](https://github.com/apify/apify-sdk-python/commit/0ea57d7c4788bff31f215c447c1881e56d6508bb)) by [@janbuchar](https://github.com/janbuchar) -* Ignore deprecated platform events ([#258](https://github.com/apify/apify-sdk-python/pull/258)) ([ed5ab3b](https://github.com/apify/apify-sdk-python/commit/ed5ab3b80c851a817aa87806c39cd8ef3e86fde5)) by [@janbuchar](https://github.com/janbuchar) -* Possible infinity loop in Apify-Scrapy proxy middleware ([#259](https://github.com/apify/apify-sdk-python/pull/259)) ([8647a94](https://github.com/apify/apify-sdk-python/commit/8647a94289423528f2940d9f7174f81682fbb407)) by [@vdusek](https://github.com/vdusek) -* Hotfix for batch\_add\_requests batch size limit ([#261](https://github.com/apify/apify-sdk-python/pull/261)) ([61d7a39](https://github.com/apify/apify-sdk-python/commit/61d7a392d182a752c91193170dca351f4cb0fbf3)) by [@janbuchar](https://github.com/janbuchar) - -#### 🚜 Refactor - -* \[**breaking**] Preparation for v2 release ([#210](https://github.com/apify/apify-sdk-python/pull/210)) ([2f9dcc5](https://github.com/apify/apify-sdk-python/commit/2f9dcc559414f31e3f4fc87e72417a36494b9c84)) by [@janbuchar](https://github.com/janbuchar), closes [#135](https://github.com/apify/apify-sdk-python/issues/135), [#137](https://github.com/apify/apify-sdk-python/issues/137), [#138](https://github.com/apify/apify-sdk-python/issues/138), [#147](https://github.com/apify/apify-sdk-python/issues/147), [#149](https://github.com/apify/apify-sdk-python/issues/149), [#237](https://github.com/apify/apify-sdk-python/issues/237) - -#### ⚙️ Miscellaneous Tasks - -* \[**breaking**] Drop support for Python 3.8 - -### [1.7.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.2) (2024-07-08) - -* Add Actor Standby port - -### [1.7.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.1) (2024-05-23) - -#### 🐛 Bug Fixes - -* Set a timeout for Actor cleanup - -### [1.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.0) (2024-03-12) - -#### 🚀 Features - -* Add a new way of generating the `uniqueKey` field of the request, aligning it with the Crawlee. - -#### 🐛 Bug Fixes - -* Improve error handling for `to_apify_request` serialization failures -* Scrapy's `Request.dont_filter` works. - -### [1.6.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.6.0) (2024-02-23) - -#### 🐛 Bug Fixes - -* Update of Scrapy integration, fixes in `ApifyScheduler`, `to_apify_request` and `apply_apify_settings`. - -#### ⚙️ Miscellaneous Tasks - -* Remove `ApifyRetryMiddleware` and stay with the Scrapy's default one - -### [1.5.5](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.5) (2024-02-01) - -#### 🐛 Bug Fixes - -* Fix conversion of `headers` fields in Apify <--> Scrapy request translation - -### [1.5.4](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.4) (2024-01-24) - -#### 🐛 Bug Fixes - -* Fix conversion of `userData` and `headers` fields in Apify <--> Scrapy request translation - -### [1.5.3](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.3) (2024-01-23) - -#### 🚀 Features - -* Add `apply_apify_settings` function to Scrapy subpackage - -### [1.5.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.2) (2024-01-19) - -#### 🐛 Bug Fixes - -* Add missing import check to `ApifyHttpProxyMiddleware` - -#### ⚙️ Miscellaneous Tasks - -* Create a new subpackage for Scrapy pipelines -* Remove some noqas thanks to the new Ruff release -* Replace relative imports with absolute imports -* Replace asserts with custom checks in Scrapy subpackage - -### [1.5.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.1) (2024-01-10) - -#### ⚙️ Miscellaneous Tasks - -* Allowed running integration tests from PRs from forks, after maintainer approval -* Do not close `nested_event_loop` in the `Scheduler.__del__` - -### [1.5.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.0) (2024-01-03) - -#### 🚀 Features - -* Add `ApifyHttpProxyMiddleware` - -### [1.4.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.4.1) (2023-12-21) - -#### 🐛 Bug Fixes - -* Resolve issue in `ApifyRetryMiddleware.process_exception()`, where requests were getting stuck in the request queue - -#### ⚙️ Miscellaneous Tasks - -* Fix type hint problems for resource clients - -### [1.4.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.4.0) (2023-12-05) - -#### ⚙️ Miscellaneous Tasks - -* Migrate from Autopep8 and Flake8 to Ruff - -### [1.3.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.3.0) (2023-11-15) - -#### 🚀 Features - -* Add `scrapy` extra - -### [1.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.2.0) (2023-10-23) - -#### 🚀 Features - -* Add support for Python 3.12 - -#### ⚙️ Miscellaneous Tasks - -* Fix lint error (E721) in unit tests (for instance checks use `isinstance()`) - -### [1.1.5](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.5) (2023-10-03) - -#### 🚀 Features - -* Update the Apify log formatter to contain an option for adding the logger name - -#### ⚙️ Miscellaneous Tasks - -* Rewrite documentation publication to use Docusaurus -* Remove PR Toolkit workflow - -### [1.1.4](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.4) (2023-09-06) - -#### 🐛 Bug Fixes - -* Resolve issue with querying request queue head multiple times in parallel - -#### ⚙️ Miscellaneous Tasks - -* Fix integration tests for Actor logger -* Remove `pytest-randomly` Pytest plugin -* Unpin `apify-client` and `apify-shared` to improve compatibility with their newer versions - -### [1.1.3](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.3) (2023-08-25) - -#### ⚙️ Miscellaneous Tasks - -* Unify indentation in configuration files -* Update the `Actor.reboot` method to use the new reboot endpoint - -### [1.1.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.2) (2023-08-02) - -#### ⚙️ Miscellaneous Tasks - -* Start importing general constants and utilities from the `apify-shared` library -* Simplify code via `flake8-simplify` -* Start using environment variables with prefix `ACTOR_` instead of some with prefix `APIFY_` -* Pin `apify-client` and `apify-shared` to prevent their implicit updates from breaking SDK - -### [1.1.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.1) (2023-05-23) - -#### 🐛 Bug Fixes - -* Relax dependency requirements to improve compatibility with other libraries - -### [1.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.0) (2023-05-23) - -#### 🚀 Features - -* Add option to add event handlers which accept no arguments -* Add support for `is_terminal` flag in status message update -* Add option to set status message along with `Actor.exit()` - -#### 🐛 Bug Fixes - -* Start enforcing local storage to always use the UTF-8 encoding -* Fix saving key-value store values to local storage with the right extension for a given content type - -#### ⚙️ Miscellaneous Tasks - -* Switch from `setup.py` to `pyproject.toml` for specifying project setup - -### [1.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.0.0) (2023-03-13) - -#### 🐛 Bug Fixes - -* Fix `RequestQueue` not loading requests from an existing queue properly - -#### ⚙️ Miscellaneous Tasks - -* Update to `apify-client` 1.0.0 -* Start triggering base Docker image builds when releasing a new version - -### [0.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v0.2.0) (2023-03-06) - -#### 🚀 Features - -* Add chunking mechanism to push\_data, cleanup TODOs ([#67](https://github.com/apify/apify-sdk-python/pull/67)) ([5f38d51](https://github.com/apify/apify-sdk-python/commit/5f38d51a57912071439ac88405311d2cb7044190)) by [@jirimoravcik](https://github.com/jirimoravcik) - -### [0.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v0.1.0) (2023-02-09) - -#### 🚀 Features - -* Implement MemoryStorage and local storage clients ([#15](https://github.com/apify/apify-sdk-python/pull/15)) ([b7c9886](https://github.com/apify/apify-sdk-python/commit/b7c98869bdc749feadc7b5a0d105fce041506011)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Implement Dataset, KeyValueStore classes, create storage management logic ([#21](https://github.com/apify/apify-sdk-python/pull/21)) ([d1b357c](https://github.com/apify/apify-sdk-python/commit/d1b357cd02f7357137fd9413b105a8ac48b1796b)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Implement RequestQueue class ([#25](https://github.com/apify/apify-sdk-python/pull/25)) ([c6cad34](https://github.com/apify/apify-sdk-python/commit/c6cad3442d1a9a37c3eb3991cf45daed03e74ff5)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Add test for get\_env and is\_at\_home ([#29](https://github.com/apify/apify-sdk-python/pull/29)) ([cc45afb](https://github.com/apify/apify-sdk-python/commit/cc45afbf848db3626054c599cb3a5a2972a48748)) by [@drobnikj](https://github.com/drobnikj) -* Updating pull request toolkit config \[INTERNAL] ([387143c](https://github.com/apify/apify-sdk-python/commit/387143ccf2c32a99c95e9931e5649e558d35daeb)) by [@mtrunkat](https://github.com/mtrunkat) -* Add documentation for `StorageManager` and `StorageClientManager`, open\_\* methods in `Actor` ([#34](https://github.com/apify/apify-sdk-python/pull/34)) ([3f6b942](https://github.com/apify/apify-sdk-python/commit/3f6b9426dc03fea40d80af2e4c8f04ecf2620e8a)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Add tests for actor lifecycle ([#35](https://github.com/apify/apify-sdk-python/pull/35)) ([4674728](https://github.com/apify/apify-sdk-python/commit/4674728905be5076283ff3795332866e8bef6ee8)) by [@drobnikj](https://github.com/drobnikj) -* Add docs for `Dataset`, `KeyValueStore`, and `RequestQueue` ([#37](https://github.com/apify/apify-sdk-python/pull/37)) ([174548e](https://github.com/apify/apify-sdk-python/commit/174548e952b47ee519d1a05c0821a2c42c2fddf6)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Docs string for memory storage clients ([#31](https://github.com/apify/apify-sdk-python/pull/31)) ([8f55d46](https://github.com/apify/apify-sdk-python/commit/8f55d463394307b004193efc43b67b44d030f6de)) by [@drobnikj](https://github.com/drobnikj) -* Add test for storage actor methods ([#39](https://github.com/apify/apify-sdk-python/pull/39)) ([b89bbcf](https://github.com/apify/apify-sdk-python/commit/b89bbcfdcae4f436a68e92f1f60628aea1036dde)) by [@drobnikj](https://github.com/drobnikj) -* Various fixes and improvements ([#41](https://github.com/apify/apify-sdk-python/pull/41)) ([5bae238](https://github.com/apify/apify-sdk-python/commit/5bae238821b3b63c73d0cbadf4b478511cb045d2)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Add the rest unit tests for actor ([#40](https://github.com/apify/apify-sdk-python/pull/40)) ([72d92ea](https://github.com/apify/apify-sdk-python/commit/72d92ea080670ceecc234c149058d2ebe763e3a8)) by [@drobnikj](https://github.com/drobnikj) -* Decrypt input secrets if there are some ([#45](https://github.com/apify/apify-sdk-python/pull/45)) ([6eb1630](https://github.com/apify/apify-sdk-python/commit/6eb163077341218a3f9dcf566986d7464f6ab09e)) by [@drobnikj](https://github.com/drobnikj) -* Add a few integration tests ([#48](https://github.com/apify/apify-sdk-python/pull/48)) ([1843f48](https://github.com/apify/apify-sdk-python/commit/1843f48845e724e1c2682b8d09a6b5c48c57d9ec)) by [@drobnikj](https://github.com/drobnikj) -* Add integration tests for storages, proxy configuration ([#49](https://github.com/apify/apify-sdk-python/pull/49)) ([fd0566e](https://github.com/apify/apify-sdk-python/commit/fd0566ed3b8c85c7884f8bba3cf7394215fabed0)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Unify datetime handling, remove utcnow() ([#52](https://github.com/apify/apify-sdk-python/pull/52)) ([09dd8ac](https://github.com/apify/apify-sdk-python/commit/09dd8ac9dc26afee777f497ed1d2733af1eef848)) by [@jirimoravcik](https://github.com/jirimoravcik) -* Separate ID and name params for `Actor.open_xxx` ([#56](https://github.com/apify/apify-sdk-python/pull/56)) ([a1e962e](https://github.com/apify/apify-sdk-python/commit/a1e962ebe74384baabb96fdbb4f0e0ed2f92e454)) by [@jirimoravcik](https://github.com/jirimoravcik) - -#### 🐛 Bug Fixes - -* Key error for storage name ([#28](https://github.com/apify/apify-sdk-python/pull/28)) ([83b30a9](https://github.com/apify/apify-sdk-python/commit/83b30a90df4d3b173302f1c6006b346091fced60)) by [@drobnikj](https://github.com/drobnikj) - From 47659fa2155620bb3a7e341e010fb3514578b3a9 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 14 Apr 2026 16:40:34 +0200 Subject: [PATCH 5/5] fix: remove inner .gitignore files from versioned docs The changelog.md exclusion is now handled by the top-level .gitignore. Co-Authored-By: Claude Opus 4.6 (1M context) --- website/versioned_docs/version-1.7/.gitignore | 1 - website/versioned_docs/version-2.7/.gitignore | 1 - website/versioned_docs/version-3.3/.gitignore | 1 - 3 files changed, 3 deletions(-) delete mode 100644 website/versioned_docs/version-1.7/.gitignore delete mode 100644 website/versioned_docs/version-2.7/.gitignore delete mode 100644 website/versioned_docs/version-3.3/.gitignore diff --git a/website/versioned_docs/version-1.7/.gitignore b/website/versioned_docs/version-1.7/.gitignore deleted file mode 100644 index 1a13c3638..000000000 --- a/website/versioned_docs/version-1.7/.gitignore +++ /dev/null @@ -1 +0,0 @@ -changelog.md diff --git a/website/versioned_docs/version-2.7/.gitignore b/website/versioned_docs/version-2.7/.gitignore deleted file mode 100644 index 1a13c3638..000000000 --- a/website/versioned_docs/version-2.7/.gitignore +++ /dev/null @@ -1 +0,0 @@ -changelog.md diff --git a/website/versioned_docs/version-3.3/.gitignore b/website/versioned_docs/version-3.3/.gitignore deleted file mode 100644 index 1a13c3638..000000000 --- a/website/versioned_docs/version-3.3/.gitignore +++ /dev/null @@ -1 +0,0 @@ -changelog.md