apify 2.7.1b15__tar.gz → 3.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of apify might be problematic. Click here for more details.
- {apify-2.7.1b15 → apify-3.0.4}/.github/workflows/build_and_deploy_docs.yaml +2 -2
- {apify-2.7.1b15 → apify-3.0.4}/CHANGELOG.md +35 -78
- {apify-2.7.1b15 → apify-3.0.4}/PKG-INFO +4 -4
- apify-3.0.4/docs/02_concepts/01_actor_lifecycle.mdx +101 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/09_running_webserver.mdx +2 -2
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/12_pay_per_event.mdx +7 -1
- apify-3.0.4/docs/02_concepts/code/01_class_context.py +21 -0
- apify-3.0.4/docs/02_concepts/code/01_class_manual.py +26 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/01_context_manager.py +6 -0
- apify-3.0.4/docs/02_concepts/code/01_error_handling_context.py +13 -0
- apify-3.0.4/docs/02_concepts/code/01_error_handling_manual.py +33 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/01_init_exit.py +6 -0
- apify-3.0.4/docs/02_concepts/code/01_instance_context.py +27 -0
- apify-3.0.4/docs/02_concepts/code/01_instance_manual.py +32 -0
- apify-3.0.4/docs/02_concepts/code/01_reboot.py +23 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/01_status_message.py +10 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/07_webhook_preventing.py +1 -1
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/09_webserver.py +2 -2
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/conditional_actor_charge.py +1 -1
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/03_playwright.py +1 -1
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/04_selenium.py +1 -1
- apify-3.0.4/docs/04_upgrading/upgrading_to_v3.md +159 -0
- {apify-2.7.1b15 → apify-3.0.4}/pyproject.toml +8 -7
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/_actor.py +333 -249
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/_charging.py +89 -37
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/_configuration.py +81 -11
- apify-3.0.4/src/apify/events/__init__.py +5 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/request_loaders/_apify_request_list.py +2 -2
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/middlewares/apify_proxy.py +1 -1
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/__init__.py +2 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/_apify/_dataset_client.py +57 -50
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/_apify/_key_value_store_client.py +57 -63
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/_apify/_models.py +27 -3
- apify-3.0.4/src/apify/storage_clients/_apify/_request_queue_client.py +304 -0
- apify-2.7.1b15/src/apify/storage_clients/_apify/_request_queue_client.py → apify-3.0.4/src/apify/storage_clients/_apify/_request_queue_shared_client.py +86 -338
- apify-3.0.4/src/apify/storage_clients/_apify/_request_queue_single_client.py +424 -0
- apify-3.0.4/src/apify/storage_clients/_apify/_storage_client.py +132 -0
- apify-3.0.4/src/apify/storage_clients/_apify/_utils.py +221 -0
- apify-3.0.4/src/apify/storage_clients/_file_system/_key_value_store_client.py +103 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/_file_system/_storage_client.py +7 -1
- apify-3.0.4/src/apify/storage_clients/_smart_apify/__init__.py +1 -0
- apify-3.0.4/src/apify/storage_clients/_smart_apify/_storage_client.py +124 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/integration/README.md +20 -9
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/actor_source_base/requirements.txt +1 -1
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/conftest.py +8 -101
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_api_helpers.py +1 -1
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_create_proxy_configuration.py +4 -1
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_dataset.py +84 -1
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_key_value_store.py +86 -3
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_lifecycle.py +43 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_log.py +8 -10
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_request_queue.py +242 -113
- apify-3.0.4/tests/integration/actor/test_apify_storages.py +28 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_crawlers_with_storages.py +2 -1
- apify-3.0.4/tests/integration/apify_api/conftest.py +70 -0
- apify-3.0.4/tests/integration/apify_api/test_apify_storages.py +125 -0
- apify-3.0.4/tests/integration/apify_api/test_request_queue.py +1194 -0
- apify-3.0.4/tests/integration/conftest.py +28 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/actor/test_actor_env_helpers.py +1 -1
- apify-3.0.4/tests/unit/actor/test_actor_lifecycle.py +317 -0
- apify-3.0.4/tests/unit/actor/test_actor_log.py +107 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/actor/test_actor_non_default_instance.py +1 -1
- apify-3.0.4/tests/unit/actor/test_configuration.py +243 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/conftest.py +5 -8
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/events/test_apify_event_manager.py +1 -2
- apify-3.0.4/tests/unit/storage_clients/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/storage_clients/test_apify_request_queue_client.py +1 -1
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/storage_clients/test_file_system.py +24 -14
- apify-3.0.4/tests/unit/test_apify_storages.py +63 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/test_proxy_configuration.py +5 -3
- apify-3.0.4/uv.lock +2953 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/docusaurus.config.js +4 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/package-lock.json +3186 -1409
- {apify-2.7.1b15 → apify-3.0.4}/website/package.json +2 -2
- {apify-2.7.1b15 → apify-3.0.4}/website/src/pages/index.js +1 -1
- apify-3.0.4/website/static/.nojekyll +0 -0
- apify-2.7.1b15/docs/02_concepts/01_actor_lifecycle.mdx +0 -55
- apify-2.7.1b15/docs/02_concepts/code/01_reboot.py +0 -7
- apify-2.7.1b15/docs/04_upgrading/upgrading_to_v3.md +0 -18
- apify-2.7.1b15/src/apify/events/__init__.py +0 -5
- apify-2.7.1b15/src/apify/storage_clients/_apify/_storage_client.py +0 -80
- apify-2.7.1b15/src/apify/storage_clients/_file_system/_key_value_store_client.py +0 -57
- apify-2.7.1b15/tests/integration/test_request_queue.py +0 -1280
- apify-2.7.1b15/tests/unit/actor/test_actor_lifecycle.py +0 -211
- apify-2.7.1b15/tests/unit/actor/test_actor_log.py +0 -104
- apify-2.7.1b15/tests/unit/actor/test_configuration.py +0 -21
- apify-2.7.1b15/uv.lock +0 -2604
- {apify-2.7.1b15 → apify-3.0.4}/.editorconfig +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.github/CODEOWNERS +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.github/workflows/check_pr_title.yaml +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.github/workflows/pre_release.yaml +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.github/workflows/release.yaml +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.github/workflows/run_code_checks.yaml +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.github/workflows/update_new_issue.yaml +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.gitignore +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.markdownlint.yaml +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/.pre-commit-config.yaml +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/CONTRIBUTING.md +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/LICENSE +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/Makefile +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/README.md +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/01_overview/01_introduction.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/01_overview/02_running_actors_locally.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/01_overview/03_actor_structure.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/01_overview/code/01_introduction.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/01_overview/code/actor_structure/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/01_overview/code/actor_structure/__main__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/01_overview/code/actor_structure/main.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/01_overview/code/actor_structure/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/02_actor_input.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/03_storages.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/04_actor_events.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/05_proxy_management.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/06_interacting_with_other_actors.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/07_webhooks.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/08_access_apify_api.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/10_logging.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/11_configuration.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/02_input.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/03_dataset_exports.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/03_dataset_read_write.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/03_deleting_storages.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/03_kvs_iterating.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/03_kvs_public_url.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/03_kvs_read_write.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/03_opening_storages.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/03_rq.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/04_actor_events.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/05_apify_proxy.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/05_apify_proxy_config.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/05_custom_proxy.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/05_custom_proxy_function.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/05_proxy_actor_input.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/05_proxy_httpx.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/05_proxy_rotation.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/06_interacting_call.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/06_interacting_call_task.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/06_interacting_metamorph.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/06_interacting_start.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/07_webhook.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/08_actor_client.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/08_actor_new_client.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/10_log_config.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/10_logger_usage.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/10_redirect_log.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/10_redirect_log_existing_run.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/11_config.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/02_concepts/code/actor_charge.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/01_beautifulsoup_httpx.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/02_parsel_impit.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/03_playwright.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/04_selenium.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/05_crawlee.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/06_scrapy.mdx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/01_beautifulsoup_httpx.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/02_parsel_impit.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/05_crawlee_beautifulsoup.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/05_crawlee_parsel.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/05_crawlee_playwright.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/__main__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/items.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/main.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/settings.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/spiders/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/spiders/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/03_guides/code/scrapy_project/src/spiders/title.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/04_upgrading/upgrading_to_v2.md +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/docs/pyproject.toml +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/renovate.json +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/_consts.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/_crypto.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/_models.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/_proxy_configuration.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/_utils.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/events/_apify_event_manager.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/events/_types.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/events/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/log.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/request_loaders/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/request_loaders/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/_actor_runner.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/_async_thread.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/_logging_config.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/extensions/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/extensions/_httpcache.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/middlewares/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/middlewares/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/pipelines/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/pipelines/actor_dataset_push.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/pipelines/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/requests.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/scheduler.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/scrapy/utils.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/_apify/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/_apify/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/_file_system/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storage_clients/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storages/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/src/apify/storages/py.typed +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/integration/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/integration/_utils.py +0 -0
- {apify-2.7.1b15/tests/integration/actor_source_base/src → apify-3.0.4/tests/integration/actor}/__init__.py +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/actor_source_base/Dockerfile +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/actor_source_base/server.py +0 -0
- {apify-2.7.1b15/tests/unit → apify-3.0.4/tests/integration/actor/actor_source_base/src}/__init__.py +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/actor_source_base/src/__main__.py +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/actor_source_base/src/main.py +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_call_timeouts.py +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_charge.py +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_events.py +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_actor_scrapy.py +0 -0
- {apify-2.7.1b15/tests/integration → apify-3.0.4/tests/integration/actor}/test_fixtures.py +0 -0
- {apify-2.7.1b15/tests/unit/actor → apify-3.0.4/tests/integration/apify_api}/__init__.py +0 -0
- {apify-2.7.1b15/tests/unit/events → apify-3.0.4/tests/unit}/__init__.py +0 -0
- {apify-2.7.1b15/tests/unit/scrapy → apify-3.0.4/tests/unit/actor}/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/actor/test_actor_create_proxy_configuration.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/actor/test_actor_dataset.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/actor/test_actor_helpers.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/actor/test_actor_key_value_store.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/actor/test_actor_request_queue.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/actor/test_request_list.py +0 -0
- {apify-2.7.1b15/tests/unit/scrapy/extensions → apify-3.0.4/tests/unit/events}/__init__.py +0 -0
- {apify-2.7.1b15/tests/unit/scrapy/middlewares → apify-3.0.4/tests/unit/scrapy}/__init__.py +0 -0
- {apify-2.7.1b15/tests/unit/scrapy/pipelines → apify-3.0.4/tests/unit/scrapy/extensions}/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/scrapy/extensions/test_httpcache.py +0 -0
- {apify-2.7.1b15/tests/unit/scrapy/requests → apify-3.0.4/tests/unit/scrapy/middlewares}/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/scrapy/middlewares/test_apify_proxy.py +0 -0
- {apify-2.7.1b15/tests/unit/scrapy/utils → apify-3.0.4/tests/unit/scrapy/pipelines}/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/scrapy/pipelines/test_actor_dataset_push.py +0 -0
- {apify-2.7.1b15/tests/unit/storage_clients → apify-3.0.4/tests/unit/scrapy/requests}/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/scrapy/requests/test_to_apify_request.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/scrapy/requests/test_to_scrapy_request.py +0 -0
- /apify-2.7.1b15/website/static/.nojekyll → /apify-3.0.4/tests/unit/scrapy/utils/__init__.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/scrapy/utils/test_apply_apify_settings.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/scrapy/utils/test_get_basic_auth_header.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/tests/unit/test_crypto.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/.eslintrc.json +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/babel.config.js +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/build_api_reference.sh +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/generate_module_shortcuts.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/sidebars.js +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/components/ApiLink.jsx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/components/Gradients.jsx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/components/Highlights.jsx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/components/Highlights.module.css +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/components/RunnableCodeBlock.jsx +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/components/RunnableCodeBlock.module.css +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/css/custom.css +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/pages/home_page_example.py +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/pages/index.module.css +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/src/theme/DocItem/Content/index.js +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/static/img/docs-og.png +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/static/img/guides/redirected_logs_example.webp +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/tools/docs-prettier.config.js +0 -0
- {apify-2.7.1b15 → apify-3.0.4}/website/tools/utils/externalLink.js +0 -0
|
@@ -27,7 +27,7 @@ jobs:
|
|
|
27
27
|
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
|
|
28
28
|
|
|
29
29
|
- name: Set up Node
|
|
30
|
-
uses: actions/setup-node@
|
|
30
|
+
uses: actions/setup-node@v6
|
|
31
31
|
with:
|
|
32
32
|
node-version: ${{ env.NODE_VERSION }}
|
|
33
33
|
cache: npm
|
|
@@ -55,7 +55,7 @@ jobs:
|
|
|
55
55
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
56
56
|
|
|
57
57
|
- name: Set up uv package manager
|
|
58
|
-
uses: astral-sh/setup-uv@
|
|
58
|
+
uses: astral-sh/setup-uv@v7
|
|
59
59
|
with:
|
|
60
60
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
61
61
|
|
|
@@ -2,117 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
## 2.7.1 - **not yet released**
|
|
7
|
-
|
|
8
|
-
### 🚀 Features
|
|
9
|
-
|
|
10
|
-
- 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)
|
|
11
|
-
- 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)
|
|
5
|
+
## [3.0.4](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.4) (2025-11-03)
|
|
12
6
|
|
|
13
7
|
### 🐛 Bug Fixes
|
|
14
8
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
- 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)
|
|
18
|
-
- 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)
|
|
19
|
-
- 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)
|
|
20
|
-
|
|
21
|
-
### Chore
|
|
22
|
-
|
|
23
|
-
- [**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)
|
|
24
|
-
|
|
25
|
-
### Refactor
|
|
26
|
-
|
|
27
|
-
- [**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)
|
|
28
|
-
- [**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)
|
|
29
|
-
- [**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)
|
|
9
|
+
- 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)
|
|
10
|
+
- 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)
|
|
30
11
|
|
|
12
|
+
### ⚡ Performance
|
|
31
13
|
|
|
32
|
-
|
|
33
|
-
## [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14)
|
|
14
|
+
- 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)
|
|
34
15
|
|
|
35
|
-
### 🚀 Features
|
|
36
16
|
|
|
37
|
-
|
|
17
|
+
## [3.0.3](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.3) (2025-10-21)
|
|
38
18
|
|
|
39
19
|
### 🐛 Bug Fixes
|
|
40
20
|
|
|
41
|
-
-
|
|
42
|
-
- Tagline overlap ([#501](https://github.com/apify/apify-sdk-python/pull/501)) ([bae8340](https://github.com/apify/apify-sdk-python/commit/bae8340c46fea756ea35ea4d591da84c09d478e2)) by [@katzino](https://github.com/katzino)
|
|
43
|
-
|
|
21
|
+
- 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)
|
|
44
22
|
|
|
45
|
-
## [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14)
|
|
46
23
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- **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)
|
|
24
|
+
## [3.0.2](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.2) (2025-10-17)
|
|
50
25
|
|
|
51
26
|
### 🐛 Bug Fixes
|
|
52
27
|
|
|
53
|
-
-
|
|
54
|
-
-
|
|
28
|
+
- 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)
|
|
29
|
+
- 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)
|
|
30
|
+
- 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)
|
|
55
31
|
|
|
56
32
|
|
|
57
|
-
## [
|
|
58
|
-
|
|
59
|
-
### 🚀 Features
|
|
60
|
-
|
|
61
|
-
- **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)
|
|
33
|
+
## [3.0.1](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.1) (2025-10-08)
|
|
62
34
|
|
|
63
35
|
### 🐛 Bug Fixes
|
|
64
36
|
|
|
65
|
-
-
|
|
66
|
-
- Tagline overlap ([#501](https://github.com/apify/apify-sdk-python/pull/501)) ([bae8340](https://github.com/apify/apify-sdk-python/commit/bae8340c46fea756ea35ea4d591da84c09d478e2)) by [@katzino](https://github.com/katzino)
|
|
37
|
+
- 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)
|
|
67
38
|
|
|
68
39
|
|
|
69
|
-
## [
|
|
40
|
+
## [3.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v3.0.0) (2025-09-29)
|
|
70
41
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- **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)
|
|
74
|
-
|
|
75
|
-
### 🐛 Bug Fixes
|
|
76
|
-
|
|
77
|
-
- Sync `@docusaurus` theme version [internal] ([#500](https://github.com/apify/apify-sdk-python/pull/500)) ([a7485e7](https://github.com/apify/apify-sdk-python/commit/a7485e7d2276fde464ce862573d5b95e7d4d836a)) by [@katzino](https://github.com/katzino)
|
|
78
|
-
- Tagline overlap ([#501](https://github.com/apify/apify-sdk-python/pull/501)) ([bae8340](https://github.com/apify/apify-sdk-python/commit/bae8340c46fea756ea35ea4d591da84c09d478e2)) by [@katzino](https://github.com/katzino)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14)
|
|
42
|
+
- Check out the [Upgrading guide](https://docs.apify.com/sdk/python/docs/upgrading/upgrading-to-v3) to ensure a smooth update.
|
|
82
43
|
|
|
83
44
|
### 🚀 Features
|
|
84
45
|
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
- Tagline overlap ([#501](https://github.com/apify/apify-sdk-python/pull/501)) ([bae8340](https://github.com/apify/apify-sdk-python/commit/bae8340c46fea756ea35ea4d591da84c09d478e2)) by [@katzino](https://github.com/katzino)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
## [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14)
|
|
94
|
-
|
|
95
|
-
### 🚀 Features
|
|
96
|
-
|
|
97
|
-
- **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)
|
|
46
|
+
- 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)
|
|
47
|
+
- 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)
|
|
48
|
+
- 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)
|
|
49
|
+
- 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)
|
|
50
|
+
- 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)
|
|
98
51
|
|
|
99
52
|
### 🐛 Bug Fixes
|
|
100
53
|
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
### 🚀 Features
|
|
54
|
+
- 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)
|
|
55
|
+
- 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)
|
|
56
|
+
- 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)
|
|
57
|
+
- 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)
|
|
58
|
+
- 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)
|
|
108
59
|
|
|
109
|
-
|
|
60
|
+
### Chore
|
|
110
61
|
|
|
111
|
-
|
|
62
|
+
- [**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)
|
|
112
63
|
|
|
113
|
-
|
|
114
|
-
- Tagline overlap ([#501](https://github.com/apify/apify-sdk-python/pull/501)) ([bae8340](https://github.com/apify/apify-sdk-python/commit/bae8340c46fea756ea35ea4d591da84c09d478e2)) by [@katzino](https://github.com/katzino)
|
|
64
|
+
### Refactor
|
|
115
65
|
|
|
66
|
+
- [**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)
|
|
67
|
+
- [**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)
|
|
68
|
+
- [**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)
|
|
69
|
+
- [**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)
|
|
70
|
+
- [**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)
|
|
116
71
|
|
|
117
72
|
|
|
118
73
|
## [2.7.3](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.3) (2025-08-11)
|
|
@@ -254,6 +209,8 @@ All notable changes to this project will be documented in this file.
|
|
|
254
209
|
|
|
255
210
|
## [2.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.0.0) (2024-09-10)
|
|
256
211
|
|
|
212
|
+
- Check out the [Upgrading guide](https://docs.apify.com/sdk/python/docs/upgrading/upgrading-to-v2) to ensure a smooth update.
|
|
213
|
+
|
|
257
214
|
### 🚀 Features
|
|
258
215
|
|
|
259
216
|
- 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)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apify
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.4
|
|
4
4
|
Summary: Apify SDK for Python
|
|
5
5
|
Project-URL: Apify Homepage, https://apify.com
|
|
6
6
|
Project-URL: Changelog, https://docs.apify.com/sdk/python/docs/changelog
|
|
@@ -225,12 +225,12 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
225
225
|
Classifier: Programming Language :: Python :: 3.13
|
|
226
226
|
Classifier: Topic :: Software Development :: Libraries
|
|
227
227
|
Requires-Python: >=3.10
|
|
228
|
-
Requires-Dist: apify-client<3.0.0,>=2.
|
|
228
|
+
Requires-Dist: apify-client<3.0.0,>=2.2.0
|
|
229
229
|
Requires-Dist: apify-shared<3.0.0,>=2.0.0
|
|
230
230
|
Requires-Dist: cachetools>=5.5.0
|
|
231
|
-
Requires-Dist: crawlee
|
|
231
|
+
Requires-Dist: crawlee<2.0.0,>=1.0.4
|
|
232
232
|
Requires-Dist: cryptography>=42.0.0
|
|
233
|
-
Requires-Dist: impit>=0.
|
|
233
|
+
Requires-Dist: impit>=0.6.1
|
|
234
234
|
Requires-Dist: lazy-object-proxy>=1.11.0
|
|
235
235
|
Requires-Dist: more-itertools>=10.2.0
|
|
236
236
|
Requires-Dist: typing-extensions>=4.1.0
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: actor-lifecycle
|
|
3
|
+
title: Actor lifecycle
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import CodeBlock from '@theme/CodeBlock';
|
|
7
|
+
import Tabs from '@theme/Tabs';
|
|
8
|
+
import TabItem from '@theme/TabItem';
|
|
9
|
+
|
|
10
|
+
import ClassContextExample from '!!raw-loader!./code/01_class_context.py';
|
|
11
|
+
import ClassManualExample from '!!raw-loader!./code/01_class_manual.py';
|
|
12
|
+
import InstanceContextExample from '!!raw-loader!./code/01_instance_context.py';
|
|
13
|
+
import InstanceManualExample from '!!raw-loader!./code/01_instance_manual.py';
|
|
14
|
+
|
|
15
|
+
import ErrorHandlingContextExample from '!!raw-loader!./code/01_error_handling_context.py';
|
|
16
|
+
import ErrorHandlingManualExample from '!!raw-loader!./code/01_error_handling_manual.py';
|
|
17
|
+
|
|
18
|
+
import RebootExample from '!!raw-loader!./code/01_reboot.py';
|
|
19
|
+
|
|
20
|
+
import StatusMessageExample from '!!raw-loader!./code/01_status_message.py';
|
|
21
|
+
|
|
22
|
+
This guide explains how an **Apify Actor** starts, runs, and shuts down, describing the complete Actor lifecycle. For information about the core concepts such as Actors, the Apify Console, storages, and events, check out the [Apify platform documentation](https://docs.apify.com/platform).
|
|
23
|
+
|
|
24
|
+
## Actor initialization
|
|
25
|
+
|
|
26
|
+
During initialization, the SDK prepares all the components required to integrate with the Apify platform. It loads configuration from environment variables, initializes access to platform storages such as the [key-value store, dataset, and request queue](https://docs.apify.com/platform/storage), sets up event handling for [platform events](https://docs.apify.com/platform/integrations/webhooks/events), and configures logging.
|
|
27
|
+
|
|
28
|
+
The recommended approach in Python is to use the global [`Actor`](https://docs.apify.com/sdk/python/reference/class/Actor) class as an asynchronous context manager. This approach automatically manages setup and teardown and keeps your code concise. When entering the context, the SDK loads configuration and initializes clients lazily—for example, a dataset is opened only when it is first accessed. If the Actor runs on the Apify platform, it also begins listening for platform events.
|
|
29
|
+
|
|
30
|
+
When the Actor exits, either normally or due to an exception, the SDK performs a graceful shutdown. It persists the final Actor state, stops event handling, and sets the terminal exit code together with the [status message](https://docs.apify.com/platform/actors/development/programming-interface/status-messages).
|
|
31
|
+
|
|
32
|
+
<Tabs groupId="request_queue">
|
|
33
|
+
<TabItem value="actor_class_with_context_manager" label="Actor class with context manager" default>
|
|
34
|
+
<CodeBlock className="language-python">
|
|
35
|
+
{ClassContextExample}
|
|
36
|
+
</CodeBlock>
|
|
37
|
+
</TabItem>
|
|
38
|
+
<TabItem value="actor_class_with_manual_init_exit" label="Actor class with manual init/exit">
|
|
39
|
+
<CodeBlock className="language-python">
|
|
40
|
+
{ClassManualExample}
|
|
41
|
+
</CodeBlock>
|
|
42
|
+
</TabItem>
|
|
43
|
+
</Tabs>
|
|
44
|
+
|
|
45
|
+
You can also create an [`Actor`](https://docs.apify.com/sdk/python/reference/class/Actor) instance directly. This does not change its capabilities but allows you to specify optional parameters during initialization, such as disabling automatic `sys.exit()` calls or customizing timeouts. The choice between using a context manager or manual initialization depends on how much control you require over the Actor's startup and shutdown sequence.
|
|
46
|
+
|
|
47
|
+
<Tabs groupId="request_queue">
|
|
48
|
+
<TabItem value="actor_instance_with_context_manager" label="Actor instance with context manager" default>
|
|
49
|
+
<CodeBlock className="language-python">
|
|
50
|
+
{InstanceContextExample}
|
|
51
|
+
</CodeBlock>
|
|
52
|
+
</TabItem>
|
|
53
|
+
<TabItem value="actor_instance_with_manual_init_exit" label="Actor instance with manual init/exit">
|
|
54
|
+
<CodeBlock className="language-python">
|
|
55
|
+
{InstanceManualExample}
|
|
56
|
+
</CodeBlock>
|
|
57
|
+
</TabItem>
|
|
58
|
+
</Tabs>
|
|
59
|
+
|
|
60
|
+
## Error handling
|
|
61
|
+
|
|
62
|
+
Good error handling lets your Actor fail fast on critical errors, retry transient issues safely, and keep data consistent. Normally you rely on the `async with Actor:` block—if it finishes, the run succeeds (exit code 0); if an unhandled exception occurs, the run fails (exit code 1).
|
|
63
|
+
|
|
64
|
+
The SDK provides helper methods for explicit control:
|
|
65
|
+
|
|
66
|
+
- [`Actor.exit`](https://docs.apify.com/sdk/python/reference/class/Actor#exit) - terminates the run successfully (default exit code 0).
|
|
67
|
+
- [`Actor.fail`](https://docs.apify.com/sdk/python/reference/class/Actor#fail) - marks the run as failed (default exit code 1).
|
|
68
|
+
|
|
69
|
+
Any non-zero exit code is treated as a `FAILED` run. You rarely need to call these methods directly unless you want to perform a controlled shutdown or customize the exit behavior.
|
|
70
|
+
|
|
71
|
+
Catch exceptions only when necessary - for example, to retry network timeouts or map specific errors to exit codes. Keep retry loops bounded with backoff and re-raise once exhausted. Make your processing idempotent so that restarts don't corrupt results. Both [`Actor.exit`](https://docs.apify.com/sdk/python/reference/class/Actor#exit) and [`Actor.fail`](https://docs.apify.com/sdk/python/reference/class/Actor#fail) perform the same cleanup, so complete any long-running persistence before calling them.
|
|
72
|
+
|
|
73
|
+
Below is a minimal context-manager example where an unhandled exception automatically fails the run, followed by a manual pattern giving you more control.
|
|
74
|
+
|
|
75
|
+
<CodeBlock className="language-python">{ErrorHandlingContextExample}</CodeBlock>
|
|
76
|
+
|
|
77
|
+
If you need explicit control over exit codes or status messages, you can manage the Actor manually using [`Actor.init`](https://docs.apify.com/sdk/python/reference/class/Actor#init), [`Actor.exit`](https://docs.apify.com/sdk/python/reference/class/Actor#exit), and [`Actor.fail`](https://docs.apify.com/sdk/python/reference/class/Actor#fail).
|
|
78
|
+
|
|
79
|
+
<CodeBlock className="language-python">{ErrorHandlingManualExample}</CodeBlock>
|
|
80
|
+
|
|
81
|
+
## Reboot
|
|
82
|
+
|
|
83
|
+
Rebooting (available on the Apify platform only) instructs the platform worker to restart your Actor from the beginning of its execution. Use this mechanism only for transient conditions that are likely to resolve after a fresh start — for example, rotating a blocked proxy pool or recovering from a stuck browser environment.
|
|
84
|
+
|
|
85
|
+
Before triggering a reboot, persist any essential state externally (e.g., to the key-value store or dataset), as all in-memory data is lost after reboot. The example below tracks a reboot counter in the default key-value store and allows at most three restarts before exiting normally.
|
|
86
|
+
|
|
87
|
+
<CodeBlock className="language-python">{RebootExample}</CodeBlock>
|
|
88
|
+
|
|
89
|
+
## Status message
|
|
90
|
+
|
|
91
|
+
[Status messages](https://docs.apify.com/platform/actors/development/programming-interface/status-messages) are lightweight, human-readable progress indicators displayed with the Actor run on the Apify platform (separate from logs). Use them to communicate high-level phases or milestones, such as "Fetching list", "Processed 120/500 pages", or "Uploading results".
|
|
92
|
+
|
|
93
|
+
Update the status only when the user's understanding of progress changes - avoid frequent updates for every processed item. Detailed information should go to logs or storages (dataset, key-value store) instead.
|
|
94
|
+
|
|
95
|
+
The SDK optimizes updates by sending an API request only when the message text changes, so repeating the same message incurs no additional cost.
|
|
96
|
+
|
|
97
|
+
<CodeBlock className="language-python">{StatusMessageExample}</CodeBlock>
|
|
98
|
+
|
|
99
|
+
## Conclusion
|
|
100
|
+
|
|
101
|
+
This page has presented the full Actor lifecycle: initialization, execution, error handling, rebooting, shutdown and status messages. You've seen how the SDK supports both context-based and manual control patterns. For deeper dives, explore the [reference docs](https://docs.apify.com/sdk/python/reference), [guides](https://docs.apify.com/sdk/python/docs/guides/beautifulsoup-httpx), and [platform documentation](https://docs.apify.com/platform).
|
|
@@ -13,9 +13,9 @@ The URL is available in the following places:
|
|
|
13
13
|
|
|
14
14
|
- In Apify Console, on the Actor run details page as the **Container URL** field.
|
|
15
15
|
- In the API as the `container_url` property of the [Run object](https://docs.apify.com/api/v2#/reference/actors/run-object/get-run).
|
|
16
|
-
- In the Actor as the `Actor.
|
|
16
|
+
- In the Actor as the `Actor.configuration.container_url` property.
|
|
17
17
|
|
|
18
|
-
The web server running inside the container must listen at the port defined by the `Actor.
|
|
18
|
+
The web server running inside the container must listen at the port defined by the `Actor.configuration.container_port` property. When running Actors locally, the port defaults to `4321`, so the web server will be accessible at `http://localhost:4321`.
|
|
19
19
|
|
|
20
20
|
## Example
|
|
21
21
|
|
|
@@ -13,6 +13,12 @@ Apify provides several [pricing models](https://docs.apify.com/platform/actors/p
|
|
|
13
13
|
|
|
14
14
|
To use the pay-per-event pricing model, you first need to [set it up](https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event) for your Actor in the Apify console. After that, you're free to start charging for events.
|
|
15
15
|
|
|
16
|
+
:::info How pay-per-event pricing works
|
|
17
|
+
|
|
18
|
+
If you want more details about PPE pricing, please refer to our [PPE documentation](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event).
|
|
19
|
+
|
|
20
|
+
:::
|
|
21
|
+
|
|
16
22
|
## Charging for events
|
|
17
23
|
|
|
18
24
|
After monetization is set in the Apify console, you can add <ApiLink to="class/Actor#charge">`Actor.charge`</ApiLink> calls to your code and start monetizing!
|
|
@@ -41,6 +47,6 @@ It is encouraged to test your monetization code on your machine before releasing
|
|
|
41
47
|
ACTOR_TEST_PAY_PER_EVENT=true python -m youractor
|
|
42
48
|
```
|
|
43
49
|
|
|
44
|
-
If you also wish to see a log of all the events charged throughout the run, the Apify SDK keeps a log of charged events in a so called charging dataset. Your charging dataset can be found under the `
|
|
50
|
+
If you also wish to see a log of all the events charged throughout the run, the Apify SDK keeps a log of charged events in a so called charging dataset. Your charging dataset can be found under the `charging-log` name (unless you change your storage settings, this dataset is stored in `storage/datasets/charging-log/`). Please note that this log is not available when running the Actor in production on the Apify platform.
|
|
45
51
|
|
|
46
52
|
Because pricing configuration is stored by the Apify platform, all events will have a default price of $1.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
from apify import Actor
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
async def main() -> None:
|
|
7
|
+
async with Actor:
|
|
8
|
+
# Get input
|
|
9
|
+
actor_input = await Actor.get_input()
|
|
10
|
+
Actor.log.info('Actor input: %s', actor_input)
|
|
11
|
+
|
|
12
|
+
# Your Actor logic here
|
|
13
|
+
data = {'message': 'Hello from Actor!', 'input': actor_input}
|
|
14
|
+
await Actor.push_data(data)
|
|
15
|
+
|
|
16
|
+
# Set status message
|
|
17
|
+
await Actor.set_status_message('Actor completed successfully')
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
if __name__ == '__main__':
|
|
21
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
from apify import Actor
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
async def main() -> None:
|
|
7
|
+
await Actor.init()
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
# Get input
|
|
11
|
+
actor_input = await Actor.get_input()
|
|
12
|
+
Actor.log.info('Actor input: %s', actor_input)
|
|
13
|
+
|
|
14
|
+
# Your Actor logic here
|
|
15
|
+
data = {'message': 'Hello from Actor!', 'input': actor_input}
|
|
16
|
+
await Actor.push_data(data)
|
|
17
|
+
|
|
18
|
+
# Set status message
|
|
19
|
+
await Actor.set_status_message('Actor completed successfully')
|
|
20
|
+
|
|
21
|
+
finally:
|
|
22
|
+
await Actor.exit()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
if __name__ == '__main__':
|
|
26
|
+
asyncio.run(main())
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
1
3
|
from apify import Actor
|
|
2
4
|
|
|
3
5
|
|
|
@@ -7,3 +9,7 @@ async def main() -> None:
|
|
|
7
9
|
Actor.log.info('Actor input: %s', actor_input)
|
|
8
10
|
await Actor.set_value('OUTPUT', 'Hello, world!')
|
|
9
11
|
raise RuntimeError('Ouch!')
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
if __name__ == '__main__':
|
|
15
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import random
|
|
3
|
+
|
|
4
|
+
from apify import Actor
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
async def do_work() -> None:
|
|
8
|
+
# Simulate random outcomes: success or one of two exception types.
|
|
9
|
+
outcome = random.random()
|
|
10
|
+
|
|
11
|
+
if outcome < 0.33:
|
|
12
|
+
raise ValueError('Invalid input data encountered')
|
|
13
|
+
if outcome < 0.66:
|
|
14
|
+
raise RuntimeError('Unexpected runtime failure')
|
|
15
|
+
|
|
16
|
+
# Simulate successful work
|
|
17
|
+
Actor.log.info('Work completed successfully')
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
async def main() -> None:
|
|
21
|
+
await Actor.init()
|
|
22
|
+
try:
|
|
23
|
+
await do_work()
|
|
24
|
+
except ValueError as exc: # Specific error mapping example
|
|
25
|
+
await Actor.fail(exit_code=10, exception=exc)
|
|
26
|
+
except Exception as exc: # Catch-all for unexpected errors
|
|
27
|
+
await Actor.fail(exit_code=91, exception=exc)
|
|
28
|
+
else:
|
|
29
|
+
await Actor.exit(status_message='Actor completed successfully')
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == '__main__':
|
|
33
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from datetime import timedelta
|
|
3
|
+
|
|
4
|
+
from apify import Actor
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
async def main() -> None:
|
|
8
|
+
actor = Actor(
|
|
9
|
+
event_listeners_timeout=timedelta(seconds=30),
|
|
10
|
+
cleanup_timeout=timedelta(seconds=30),
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
async with actor:
|
|
14
|
+
# Get input
|
|
15
|
+
actor_input = await actor.get_input()
|
|
16
|
+
actor.log.info('Actor input: %s', actor_input)
|
|
17
|
+
|
|
18
|
+
# Your Actor logic here
|
|
19
|
+
data = {'message': 'Hello from Actor instance!', 'input': actor_input}
|
|
20
|
+
await actor.push_data(data)
|
|
21
|
+
|
|
22
|
+
# Set status message
|
|
23
|
+
await actor.set_status_message('Actor completed successfully')
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
if __name__ == '__main__':
|
|
27
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from datetime import timedelta
|
|
3
|
+
|
|
4
|
+
from apify import Actor
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
async def main() -> None:
|
|
8
|
+
actor = Actor(
|
|
9
|
+
event_listeners_timeout=timedelta(seconds=30),
|
|
10
|
+
cleanup_timeout=timedelta(seconds=30),
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
await actor.init()
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
# Get input
|
|
17
|
+
actor_input = await actor.get_input()
|
|
18
|
+
actor.log.info('Actor input: %s', actor_input)
|
|
19
|
+
|
|
20
|
+
# Your Actor logic here
|
|
21
|
+
data = {'message': 'Hello from Actor!', 'input': actor_input}
|
|
22
|
+
await actor.push_data(data)
|
|
23
|
+
|
|
24
|
+
# Set status message
|
|
25
|
+
await actor.set_status_message('Actor completed successfully')
|
|
26
|
+
|
|
27
|
+
finally:
|
|
28
|
+
await actor.exit()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if __name__ == '__main__':
|
|
32
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
from apify import Actor
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
async def main() -> None:
|
|
7
|
+
async with Actor:
|
|
8
|
+
# Use the KVS to persist a simple reboot counter across restarts.
|
|
9
|
+
kvs = await Actor.open_key_value_store()
|
|
10
|
+
reboot_counter = await kvs.get_value('reboot_counter', 0)
|
|
11
|
+
|
|
12
|
+
# Limit the number of reboots to avoid infinite loops.
|
|
13
|
+
if reboot_counter < 3:
|
|
14
|
+
await kvs.set_value('reboot_counter', reboot_counter + 1)
|
|
15
|
+
Actor.log.info(f'Reboot attempt {reboot_counter + 1}/3')
|
|
16
|
+
# Trigger a platform reboot; after restart the code runs from the beginning.
|
|
17
|
+
await Actor.reboot()
|
|
18
|
+
|
|
19
|
+
Actor.log.info('Reboot limit reached, finishing run')
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if __name__ == '__main__':
|
|
23
|
+
asyncio.run(main())
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
1
3
|
from apify import Actor
|
|
2
4
|
|
|
3
5
|
|
|
@@ -5,10 +7,18 @@ async def main() -> None:
|
|
|
5
7
|
async with Actor:
|
|
6
8
|
await Actor.set_status_message('Here we go!')
|
|
7
9
|
# Do some work...
|
|
10
|
+
await asyncio.sleep(3)
|
|
8
11
|
await Actor.set_status_message('So far so good...')
|
|
12
|
+
await asyncio.sleep(3)
|
|
9
13
|
# Do some more work...
|
|
10
14
|
await Actor.set_status_message('Steady as she goes...')
|
|
15
|
+
await asyncio.sleep(3)
|
|
11
16
|
# Do even more work...
|
|
12
17
|
await Actor.set_status_message('Almost there...')
|
|
18
|
+
await asyncio.sleep(3)
|
|
13
19
|
# Finish the job
|
|
14
20
|
await Actor.set_status_message('Phew! That was not that hard!')
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
if __name__ == '__main__':
|
|
24
|
+
asyncio.run(main())
|
|
@@ -7,7 +7,7 @@ async def main() -> None:
|
|
|
7
7
|
webhook = Webhook(
|
|
8
8
|
event_types=['ACTOR.RUN.FAILED'],
|
|
9
9
|
request_url='https://example.com/run-failed',
|
|
10
|
-
idempotency_key=Actor.
|
|
10
|
+
idempotency_key=Actor.configuration.actor_run_id,
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
# Add the webhook to the Actor.
|
|
@@ -22,9 +22,9 @@ def run_server() -> None:
|
|
|
22
22
|
# and save a reference to the server.
|
|
23
23
|
global http_server
|
|
24
24
|
with ThreadingHTTPServer(
|
|
25
|
-
('', Actor.
|
|
25
|
+
('', Actor.configuration.web_server_port), RequestHandler
|
|
26
26
|
) as server:
|
|
27
|
-
Actor.log.info(f'Server running on {Actor.
|
|
27
|
+
Actor.log.info(f'Server running on {Actor.configuration.web_server_port}')
|
|
28
28
|
http_server = server
|
|
29
29
|
server.serve_forever()
|
|
30
30
|
|