apify 2.7.1b2__tar.gz → 2.7.1b4__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.1b2 → apify-2.7.1b4}/.github/workflows/pre_release.yaml +1 -1
- {apify-2.7.1b2 → apify-2.7.1b4}/.github/workflows/run_code_checks.yaml +10 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/CHANGELOG.md +207 -7
- {apify-2.7.1b2 → apify-2.7.1b4}/PKG-INFO +3 -3
- {apify-2.7.1b2 → apify-2.7.1b4}/pyproject.toml +4 -4
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_actor.py +40 -5
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_charging.py +13 -6
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_configuration.py +1 -1
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_crypto.py +0 -6
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_models.py +6 -6
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_platform_event_manager.py +15 -16
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_proxy_configuration.py +2 -5
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_utils.py +13 -1
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/_apify_storage_client.py +1 -1
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/log.py +0 -2
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/storages/_request_list.py +1 -1
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/README.md +23 -0
- apify-2.7.1b4/tests/integration/test_request_queue.py +1192 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/uv.lock +6 -6
- apify-2.7.1b4/website/docusaurus.config.js +273 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/package-lock.json +9 -9
- {apify-2.7.1b2 → apify-2.7.1b4}/website/package.json +6 -6
- apify-2.7.1b2/tests/integration/test_request_queue.py +0 -113
- apify-2.7.1b2/website/docusaurus.config.js +0 -145
- {apify-2.7.1b2 → apify-2.7.1b4}/.editorconfig +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/.github/CODEOWNERS +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/.github/workflows/build_and_deploy_docs.yaml +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/.github/workflows/check_pr_title.yaml +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/.github/workflows/release.yaml +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/.github/workflows/update_new_issue.yaml +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/.gitignore +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/.markdownlint.yaml +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/.pre-commit-config.yaml +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/CONTRIBUTING.md +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/LICENSE +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/Makefile +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/README.md +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/01_overview/01_introduction.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/01_overview/02_running_actors_locally.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/01_overview/03_actor_structure.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/01_overview/code/01_introduction.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/01_overview/code/actor_structure/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/01_overview/code/actor_structure/__main__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/01_overview/code/actor_structure/main.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/01_overview/code/actor_structure/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/01_beautifulsoup_httpx.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/02_crawlee.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/03_playwright.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/04_selenium.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/05_scrapy.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/01_beautifulsoup_httpx.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/02_crawlee_beautifulsoup.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/02_crawlee_playwright.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/03_playwright.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/04_selenium.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/__main__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/items.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/main.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/settings.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/spiders/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/spiders/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/02_guides/code/scrapy_project/src/spiders/title.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/01_actor_lifecycle.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/02_actor_input.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/03_storages.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/04_actor_events.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/05_proxy_management.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/06_interacting_with_other_actors.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/07_webhooks.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/08_access_apify_api.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/09_running_webserver.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/10_logging.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/11_configuration.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/12_pay_per_event.mdx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/01_context_manager.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/01_init_exit.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/01_reboot.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/01_status_message.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/02_input.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/03_dataset_exports.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/03_dataset_read_write.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/03_deleting_storages.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/03_kvs_iterating.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/03_kvs_public_url.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/03_kvs_read_write.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/03_opening_storages.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/03_rq.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/04_actor_events.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/05_apify_proxy.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/05_apify_proxy_config.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/05_custom_proxy.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/05_custom_proxy_function.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/05_proxy_actor_input.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/05_proxy_httpx.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/05_proxy_rotation.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/06_interacting_call.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/06_interacting_call_task.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/06_interacting_metamorph.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/06_interacting_start.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/07_webhook.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/07_webhook_preventing.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/08_actor_client.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/08_actor_new_client.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/09_webserver.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/10_log_config.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/10_logger_usage.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/10_redirect_log.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/10_redirect_log_existing_run.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/11_config.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/actor_charge.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/03_concepts/code/conditional_actor_charge.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/04_upgrading/upgrading_to_v2.md +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/docs/pyproject.toml +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/renovate.json +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/_consts.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/_dataset_client.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/_dataset_collection_client.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/_key_value_store_client.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/_key_value_store_collection_client.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/_request_queue_client.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/_request_queue_collection_client.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/apify_storage_client/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/_actor_runner.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/_async_thread.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/_logging_config.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/extensions/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/extensions/_httpcache.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/middlewares/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/middlewares/apify_proxy.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/middlewares/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/pipelines/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/pipelines/actor_dataset_push.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/pipelines/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/requests.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/scheduler.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/scrapy/utils.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/storages/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/src/apify/storages/py.typed +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/_utils.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/actor_source_base/Dockerfile +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/actor_source_base/requirements.txt +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/actor_source_base/src/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/actor_source_base/src/__main__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/actor_source_base/src/main.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/conftest.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_api_helpers.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_call_timeouts.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_charge.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_create_proxy_configuration.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_dataset.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_events.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_key_value_store.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_lifecycle.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_log.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_request_queue.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_actor_scrapy.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/integration/test_fixtures.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_create_proxy_configuration.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_dataset.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_env_helpers.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_helpers.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_key_value_store.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_lifecycle.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_log.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_non_default_instance.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_actor_request_queue.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_configuration.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/actor/test_request_list.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/conftest.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/extensions/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/extensions/test_httpcache.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/middlewares/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/middlewares/test_apify_proxy.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/pipelines/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/pipelines/test_actor_dataset_push.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/requests/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/requests/test_to_apify_request.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/requests/test_to_scrapy_request.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/utils/__init__.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/utils/test_apply_apify_settings.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/scrapy/utils/test_get_basic_auth_header.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/test_crypto.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/test_platform_event_manager.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/tests/unit/test_proxy_configuration.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/.eslintrc.json +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/babel.config.js +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/build_api_reference.sh +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/generate_module_shortcuts.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/sidebars.js +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/components/ApiLink.jsx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/components/Gradients.jsx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/components/Highlights.jsx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/components/Highlights.module.css +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/components/RunnableCodeBlock.jsx +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/components/RunnableCodeBlock.module.css +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/css/custom.css +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/pages/home_page_example.py +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/pages/index.js +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/src/pages/index.module.css +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/static/.nojekyll +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/static/img/docs-og.png +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/static/img/guides/redirected_logs_example.webp +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/tools/docs-prettier.config.js +0 -0
- {apify-2.7.1b2 → apify-2.7.1b4}/website/tools/utils/externalLink.js +0 -0
|
@@ -20,13 +20,13 @@ jobs:
|
|
|
20
20
|
version_number: ${{ steps.release_metadata.outputs.version_number }}
|
|
21
21
|
tag_name: ${{ steps.release_metadata.outputs.tag_name }}
|
|
22
22
|
changelog: ${{ steps.release_metadata.outputs.changelog }}
|
|
23
|
-
existing_changelog_path: CHANGELOG.md
|
|
24
23
|
steps:
|
|
25
24
|
- uses: apify/workflows/git-cliff-release@main
|
|
26
25
|
id: release_metadata
|
|
27
26
|
name: Prepare release metadata
|
|
28
27
|
with:
|
|
29
28
|
release_type: prerelease
|
|
29
|
+
existing_changelog_path: CHANGELOG.md
|
|
30
30
|
|
|
31
31
|
lint_check:
|
|
32
32
|
name: Lint check
|
|
@@ -6,6 +6,16 @@ on:
|
|
|
6
6
|
# step required for PRs from forks. This prevents their potential exposure.
|
|
7
7
|
pull_request:
|
|
8
8
|
|
|
9
|
+
# Pushing to the master branch triggers code checks
|
|
10
|
+
push:
|
|
11
|
+
branches:
|
|
12
|
+
- master
|
|
13
|
+
tags-ignore:
|
|
14
|
+
- "**" # Ignore all tags to prevent duplicate checks when tags are pushed.
|
|
15
|
+
|
|
16
|
+
# It should also be possible to trigger checks manually
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
9
19
|
jobs:
|
|
10
20
|
lint_check:
|
|
11
21
|
name: Lint check
|
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
<!-- git-cliff-unreleased-start -->
|
|
6
|
+
## 2.7.1 - **not yet released**
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
- 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)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<!-- git-cliff-unreleased-end -->
|
|
5
14
|
## [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14)
|
|
6
15
|
|
|
7
16
|
### 🚀 Features
|
|
8
17
|
|
|
9
|
-
- 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)
|
|
10
18
|
- **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)
|
|
11
19
|
|
|
12
20
|
### 🐛 Bug Fixes
|
|
@@ -15,6 +23,21 @@ All notable changes to this project will be documented in this file.
|
|
|
15
23
|
- 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)
|
|
16
24
|
|
|
17
25
|
|
|
26
|
+
## [2.7.1](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.1) (2025-07-24)
|
|
27
|
+
|
|
28
|
+
### 🐛 Bug Fixes
|
|
29
|
+
|
|
30
|
+
- Add back support for Python 3.9.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [2.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.7.0) (2025-07-14)
|
|
34
|
+
|
|
35
|
+
### 🚀 Features
|
|
36
|
+
|
|
37
|
+
- 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)
|
|
38
|
+
- **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)
|
|
39
|
+
|
|
40
|
+
|
|
18
41
|
## [2.6.0](https://github.com/apify/apify-sdk-python/releases/tag/v2.6.0) (2025-06-09)
|
|
19
42
|
|
|
20
43
|
### 🚀 Features
|
|
@@ -143,33 +166,210 @@ All notable changes to this project will be documented in this file.
|
|
|
143
166
|
|
|
144
167
|
- [**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)
|
|
145
168
|
|
|
169
|
+
### Chore
|
|
170
|
+
|
|
171
|
+
- [**breaking**] Drop support for Python 3.8
|
|
172
|
+
|
|
146
173
|
|
|
147
174
|
## [1.7.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.2) (2024-07-08)
|
|
148
175
|
|
|
176
|
+
- Add Actor Standby port
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
## [1.7.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.1) (2024-05-23)
|
|
180
|
+
|
|
181
|
+
### 🐛 Bug Fixes
|
|
182
|
+
|
|
183
|
+
- Set a timeout for Actor cleanup
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## [1.7.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.7.0) (2024-03-12)
|
|
187
|
+
|
|
149
188
|
### 🚀 Features
|
|
150
189
|
|
|
151
|
-
- Add
|
|
190
|
+
- Add a new way of generating the `uniqueKey` field of the request, aligning it with the Crawlee.
|
|
152
191
|
|
|
192
|
+
### 🐛 Bug Fixes
|
|
153
193
|
|
|
154
|
-
|
|
194
|
+
- Improve error handling for `to_apify_request` serialization failures
|
|
195
|
+
- Scrapy's `Request.dont_filter` works.
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## [1.6.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.6.0) (2024-02-23)
|
|
155
199
|
|
|
156
200
|
### 🐛 Bug Fixes
|
|
157
201
|
|
|
158
|
-
-
|
|
202
|
+
- Update of Scrapy integration, fixes in `ApifyScheduler`, `to_apify_request` and `apply_apify_settings`.
|
|
159
203
|
|
|
204
|
+
### Chore
|
|
160
205
|
|
|
161
|
-
|
|
206
|
+
- Remove `ApifyRetryMiddleware` and stay with the Scrapy's default one
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
## [1.5.5](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.5) (2024-02-01)
|
|
210
|
+
|
|
211
|
+
### 🐛 Bug Fixes
|
|
212
|
+
|
|
213
|
+
- Fix conversion of `headers` fields in Apify <--> Scrapy request translation
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
## [1.5.4](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.4) (2024-01-24)
|
|
217
|
+
|
|
218
|
+
### 🐛 Bug Fixes
|
|
219
|
+
|
|
220
|
+
- Fix conversion of `userData` and `headers` fields in Apify <--> Scrapy request translation
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
## [1.5.3](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.3) (2024-01-23)
|
|
224
|
+
|
|
225
|
+
### 🚀 Features
|
|
226
|
+
|
|
227
|
+
- Add `apply_apify_settings` function to Scrapy subpackage
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
## [1.5.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.2) (2024-01-19)
|
|
231
|
+
|
|
232
|
+
### 🐛 Bug Fixes
|
|
233
|
+
|
|
234
|
+
- Add missing import check to `ApifyHttpProxyMiddleware`
|
|
235
|
+
|
|
236
|
+
### Chore
|
|
237
|
+
|
|
238
|
+
- Create a new subpackage for Scrapy pipelines
|
|
239
|
+
- Remove some noqas thanks to the new Ruff release
|
|
240
|
+
- Replace relative imports with absolute imports
|
|
241
|
+
- Replace asserts with custom checks in Scrapy subpackage
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
## [1.5.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.1) (2024-01-10)
|
|
245
|
+
|
|
246
|
+
### Chore
|
|
247
|
+
|
|
248
|
+
- Allowed running integration tests from PRs from forks, after maintainer approval
|
|
249
|
+
- Do not close `nested_event_loop` in the `Scheduler.__del__`
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
## [1.5.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.5.0) (2024-01-03)
|
|
162
253
|
|
|
163
254
|
### 🚀 Features
|
|
164
255
|
|
|
165
|
-
-
|
|
256
|
+
- Add `ApifyHttpProxyMiddleware`
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
## [1.4.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.4.1) (2023-12-21)
|
|
260
|
+
|
|
261
|
+
### 🐛 Bug Fixes
|
|
262
|
+
|
|
263
|
+
- Resolve issue in `ApifyRetryMiddleware.process_exception()`, where requests were getting stuck in the request queue
|
|
264
|
+
|
|
265
|
+
### Chore
|
|
266
|
+
|
|
267
|
+
- Fix type hint problems for resource clients
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
## [1.4.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.4.0) (2023-12-05)
|
|
271
|
+
|
|
272
|
+
### Chore
|
|
273
|
+
|
|
274
|
+
- Migrate from Autopep8 and Flake8 to Ruff
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
## [1.3.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.3.0) (2023-11-15)
|
|
278
|
+
|
|
279
|
+
### 🚀 Features
|
|
280
|
+
|
|
281
|
+
- Add `scrapy` extra
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
## [1.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.2.0) (2023-10-23)
|
|
285
|
+
|
|
286
|
+
### 🚀 Features
|
|
287
|
+
|
|
288
|
+
- Add support for Python 3.12
|
|
289
|
+
|
|
290
|
+
### Chore
|
|
291
|
+
|
|
292
|
+
- Fix lint error (E721) in unit tests (for instance checks use `isinstance()`)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
## [1.1.5](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.5) (2023-10-03)
|
|
296
|
+
|
|
297
|
+
### 🚀 Features
|
|
298
|
+
|
|
299
|
+
- Update the Apify log formatter to contain an option for adding the logger name
|
|
300
|
+
|
|
301
|
+
### Chore
|
|
302
|
+
|
|
303
|
+
- Rewrite documentation publication to use Docusaurus
|
|
304
|
+
- Remove PR Toolkit workflow
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
## [1.1.4](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.4) (2023-09-06)
|
|
308
|
+
|
|
309
|
+
### 🐛 Bug Fixes
|
|
310
|
+
|
|
311
|
+
- Resolve issue with querying request queue head multiple times in parallel
|
|
312
|
+
|
|
313
|
+
### Chore
|
|
314
|
+
|
|
315
|
+
- Fix integration tests for Actor logger
|
|
316
|
+
- Remove `pytest-randomly` Pytest plugin
|
|
317
|
+
- Unpin `apify-client` and `apify-shared` to improve compatibility with their newer versions
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
## [1.1.3](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.3) (2023-08-25)
|
|
321
|
+
|
|
322
|
+
### Chore
|
|
323
|
+
|
|
324
|
+
- Unify indentation in configuration files
|
|
325
|
+
- Update the `Actor.reboot` method to use the new reboot endpoint
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
## [1.1.2](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.2) (2023-08-02)
|
|
329
|
+
|
|
330
|
+
### Chore
|
|
331
|
+
|
|
332
|
+
- Start importing general constants and utilities from the `apify-shared` library
|
|
333
|
+
- Simplify code via `flake8-simplify`
|
|
334
|
+
- Start using environment variables with prefix `ACTOR_` instead of some with prefix `APIFY_`
|
|
335
|
+
- Pin `apify-client` and `apify-shared` to prevent their implicit updates from breaking SDK
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
## [1.1.1](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.1) (2023-05-23)
|
|
339
|
+
|
|
340
|
+
### 🐛 Bug Fixes
|
|
341
|
+
|
|
342
|
+
- Relax dependency requirements to improve compatibility with other libraries
|
|
166
343
|
|
|
167
344
|
|
|
168
345
|
## [1.1.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.1.0) (2023-05-23)
|
|
169
346
|
|
|
170
347
|
### 🚀 Features
|
|
171
348
|
|
|
172
|
-
-
|
|
349
|
+
- Add option to add event handlers which accept no arguments
|
|
350
|
+
- Add support for `is_terminal` flag in status message update
|
|
351
|
+
- Add option to set status message along with `Actor.exit()`
|
|
352
|
+
|
|
353
|
+
### 🐛 Bug Fixes
|
|
354
|
+
|
|
355
|
+
- Start enforcing local storage to always use the UTF-8 encoding
|
|
356
|
+
- Fix saving key-value store values to local storage with the right extension for a given content type
|
|
357
|
+
|
|
358
|
+
### Chore
|
|
359
|
+
|
|
360
|
+
- Switch from `setup.py` to `pyproject.toml` for specifying project setup
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
## [1.0.0](https://github.com/apify/apify-sdk-python/releases/tag/v1.0.0) (2023-03-13)
|
|
364
|
+
|
|
365
|
+
### 🐛 Bug Fixes
|
|
366
|
+
|
|
367
|
+
- Fix `RequestQueue` not loading requests from an existing queue properly
|
|
368
|
+
|
|
369
|
+
### Chore
|
|
370
|
+
|
|
371
|
+
- Update to `apify-client` 1.0.0
|
|
372
|
+
- Start triggering base Docker image builds when releasing a new version
|
|
173
373
|
|
|
174
374
|
|
|
175
375
|
## [0.2.0](https://github.com/apify/apify-sdk-python/releases/tag/v0.2.0) (2023-03-06)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apify
|
|
3
|
-
Version: 2.7.
|
|
3
|
+
Version: 2.7.1b4
|
|
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,8 +225,8 @@ 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
|
|
229
|
-
Requires-Dist: apify-shared
|
|
228
|
+
Requires-Dist: apify-client<2.0.0
|
|
229
|
+
Requires-Dist: apify-shared<2.0.0
|
|
230
230
|
Requires-Dist: crawlee~=0.6.0
|
|
231
231
|
Requires-Dist: cryptography>=42.0.0
|
|
232
232
|
Requires-Dist: httpx>=0.27.0
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "apify"
|
|
7
|
-
version = "2.7.
|
|
7
|
+
version = "2.7.1b4"
|
|
8
8
|
description = "Apify SDK for Python"
|
|
9
9
|
authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -34,8 +34,8 @@ keywords = [
|
|
|
34
34
|
"scraping",
|
|
35
35
|
]
|
|
36
36
|
dependencies = [
|
|
37
|
-
"apify-client
|
|
38
|
-
"apify-shared
|
|
37
|
+
"apify-client<2.0.0",
|
|
38
|
+
"apify-shared<2.0.0",
|
|
39
39
|
"crawlee~=0.6.0",
|
|
40
40
|
"cryptography>=42.0.0",
|
|
41
41
|
"httpx>=0.27.0",
|
|
@@ -64,7 +64,7 @@ scrapy = ["scrapy>=2.11.0"]
|
|
|
64
64
|
dev = [
|
|
65
65
|
"build~=1.2.0",
|
|
66
66
|
"dycw-pytest-only>=2.1.1",
|
|
67
|
-
"griffe~=1.
|
|
67
|
+
"griffe~=1.9.0",
|
|
68
68
|
"mypy~=1.17.0",
|
|
69
69
|
"pre-commit~=4.2.0",
|
|
70
70
|
"pydoc-markdown~=4.8.0",
|
|
@@ -13,7 +13,7 @@ from pydantic import AliasChoices
|
|
|
13
13
|
|
|
14
14
|
from apify_client import ApifyClientAsync
|
|
15
15
|
from apify_shared.consts import ActorEnvVars, ActorExitCodes, ApifyEnvVars
|
|
16
|
-
from apify_shared.utils import
|
|
16
|
+
from apify_shared.utils import maybe_extract_enum_member_value
|
|
17
17
|
from crawlee import service_locator
|
|
18
18
|
from crawlee.events import (
|
|
19
19
|
Event,
|
|
@@ -54,9 +54,46 @@ MainReturnType = TypeVar('MainReturnType')
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
@docs_name('Actor')
|
|
57
|
-
@docs_group('
|
|
57
|
+
@docs_group('Actor')
|
|
58
58
|
class _ActorType:
|
|
59
|
-
"""The class
|
|
59
|
+
"""The core class for building Actors on the Apify platform.
|
|
60
|
+
|
|
61
|
+
Actors are serverless programs running in the cloud that can perform anything from simple actions
|
|
62
|
+
(such as filling out a web form or sending an email) to complex operations (such as crawling an
|
|
63
|
+
entire website or removing duplicates from a large dataset). They are packaged as Docker containers
|
|
64
|
+
which accept well-defined JSON input, perform an action, and optionally produce well-defined output.
|
|
65
|
+
|
|
66
|
+
### References
|
|
67
|
+
|
|
68
|
+
- Apify platform documentation: https://docs.apify.com/platform/actors
|
|
69
|
+
- Actor whitepaper: https://whitepaper.actor/
|
|
70
|
+
|
|
71
|
+
### Usage
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
import asyncio
|
|
75
|
+
|
|
76
|
+
import httpx
|
|
77
|
+
from apify import Actor
|
|
78
|
+
from bs4 import BeautifulSoup
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
async def main() -> None:
|
|
82
|
+
async with Actor:
|
|
83
|
+
actor_input = await Actor.get_input()
|
|
84
|
+
async with httpx.AsyncClient() as client:
|
|
85
|
+
response = await client.get(actor_input['url'])
|
|
86
|
+
soup = BeautifulSoup(response.content, 'html.parser')
|
|
87
|
+
data = {
|
|
88
|
+
'url': actor_input['url'],
|
|
89
|
+
'title': soup.title.string if soup.title else None,
|
|
90
|
+
}
|
|
91
|
+
await Actor.push_data(data)
|
|
92
|
+
|
|
93
|
+
if __name__ == '__main__':
|
|
94
|
+
asyncio.run(main())
|
|
95
|
+
```
|
|
96
|
+
"""
|
|
60
97
|
|
|
61
98
|
_is_rebooting = False
|
|
62
99
|
_is_any_instance_initialized = False
|
|
@@ -108,7 +145,6 @@ class _ActorType:
|
|
|
108
145
|
|
|
109
146
|
self._is_initialized = False
|
|
110
147
|
|
|
111
|
-
@ignore_docs
|
|
112
148
|
async def __aenter__(self) -> Self:
|
|
113
149
|
"""Initialize the Actor.
|
|
114
150
|
|
|
@@ -120,7 +156,6 @@ class _ActorType:
|
|
|
120
156
|
await self.init()
|
|
121
157
|
return self
|
|
122
158
|
|
|
123
|
-
@ignore_docs
|
|
124
159
|
async def __aexit__(
|
|
125
160
|
self,
|
|
126
161
|
_exc_type: type[BaseException] | None,
|
|
@@ -8,7 +8,6 @@ from typing import TYPE_CHECKING, Protocol
|
|
|
8
8
|
|
|
9
9
|
from pydantic import TypeAdapter
|
|
10
10
|
|
|
11
|
-
from apify_shared.utils import ignore_docs
|
|
12
11
|
from crawlee._utils.context import ensure_context
|
|
13
12
|
|
|
14
13
|
from apify._models import ActorRun, PricingModel
|
|
@@ -26,9 +25,18 @@ if TYPE_CHECKING:
|
|
|
26
25
|
run_validator = TypeAdapter[ActorRun | None](ActorRun | None)
|
|
27
26
|
|
|
28
27
|
|
|
29
|
-
@docs_group('
|
|
28
|
+
@docs_group('Charging')
|
|
30
29
|
class ChargingManager(Protocol):
|
|
31
|
-
"""Provides fine-grained access to pay-per-event functionality.
|
|
30
|
+
"""Provides fine-grained access to pay-per-event functionality.
|
|
31
|
+
|
|
32
|
+
The ChargingManager allows you to charge for specific events in your Actor when using
|
|
33
|
+
the pay-per-event pricing model. This enables precise cost control and transparent
|
|
34
|
+
billing for different operations within your Actor.
|
|
35
|
+
|
|
36
|
+
### References
|
|
37
|
+
|
|
38
|
+
- Apify platform documentation: https://docs.apify.com/platform/actors/publishing/monetize
|
|
39
|
+
"""
|
|
32
40
|
|
|
33
41
|
async def charge(self, event_name: str, count: int = 1) -> ChargeResult:
|
|
34
42
|
"""Charge for a specified number of events - sub-operations of the Actor.
|
|
@@ -57,7 +65,7 @@ class ChargingManager(Protocol):
|
|
|
57
65
|
"""
|
|
58
66
|
|
|
59
67
|
|
|
60
|
-
@docs_group('
|
|
68
|
+
@docs_group('Charging')
|
|
61
69
|
@dataclass(frozen=True)
|
|
62
70
|
class ChargeResult:
|
|
63
71
|
"""Result of the `ChargingManager.charge` method."""
|
|
@@ -72,7 +80,7 @@ class ChargeResult:
|
|
|
72
80
|
"""How many events of each known type can still be charged within the limit."""
|
|
73
81
|
|
|
74
82
|
|
|
75
|
-
@docs_group('
|
|
83
|
+
@docs_group('Charging')
|
|
76
84
|
@dataclass
|
|
77
85
|
class ActorPricingInfo:
|
|
78
86
|
"""Result of the `ChargingManager.get_pricing_info` method."""
|
|
@@ -90,7 +98,6 @@ class ActorPricingInfo:
|
|
|
90
98
|
"""Price of every known event type."""
|
|
91
99
|
|
|
92
100
|
|
|
93
|
-
@ignore_docs
|
|
94
101
|
class ChargingManagerImplementation(ChargingManager):
|
|
95
102
|
"""Implementation of the `ChargingManager` Protocol - this is only meant to be instantiated internally."""
|
|
96
103
|
|
|
@@ -25,7 +25,7 @@ def _transform_to_list(value: Any) -> list[str] | None:
|
|
|
25
25
|
return value if isinstance(value, list) else str(value).split(',')
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
@docs_group('
|
|
28
|
+
@docs_group('Configuration')
|
|
29
29
|
class Configuration(CrawleeConfiguration):
|
|
30
30
|
"""A class for specifying the configuration of an Actor.
|
|
31
31
|
|
|
@@ -12,7 +12,6 @@ from cryptography.hazmat.primitives import hashes, serialization
|
|
|
12
12
|
from cryptography.hazmat.primitives.asymmetric import padding, rsa
|
|
13
13
|
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
|
14
14
|
|
|
15
|
-
from apify_shared.utils import ignore_docs
|
|
16
15
|
from crawlee._utils.crypto import crypto_random_object_id
|
|
17
16
|
|
|
18
17
|
from apify._consts import ENCRYPTED_INPUT_VALUE_REGEXP, ENCRYPTED_JSON_VALUE_PREFIX, ENCRYPTED_STRING_VALUE_PREFIX
|
|
@@ -22,7 +21,6 @@ ENCRYPTION_IV_LENGTH = 16
|
|
|
22
21
|
ENCRYPTION_AUTH_TAG_LENGTH = 16
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
@ignore_docs
|
|
26
24
|
def public_encrypt(value: str, *, public_key: rsa.RSAPublicKey) -> dict:
|
|
27
25
|
"""Encrypts the given value using AES cipher and the password for encryption using the public key.
|
|
28
26
|
|
|
@@ -66,7 +64,6 @@ def public_encrypt(value: str, *, public_key: rsa.RSAPublicKey) -> dict:
|
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
|
|
69
|
-
@ignore_docs
|
|
70
67
|
def private_decrypt(
|
|
71
68
|
encrypted_password: str,
|
|
72
69
|
encrypted_value: str,
|
|
@@ -118,7 +115,6 @@ def private_decrypt(
|
|
|
118
115
|
return decipher_bytes.decode('utf-8')
|
|
119
116
|
|
|
120
117
|
|
|
121
|
-
@ignore_docs
|
|
122
118
|
def load_private_key(private_key_file_base64: str, private_key_password: str) -> rsa.RSAPrivateKey:
|
|
123
119
|
private_key = serialization.load_pem_private_key(
|
|
124
120
|
base64.b64decode(private_key_file_base64.encode('utf-8')),
|
|
@@ -138,7 +134,6 @@ def _load_public_key(public_key_file_base64: str) -> rsa.RSAPublicKey:
|
|
|
138
134
|
return public_key
|
|
139
135
|
|
|
140
136
|
|
|
141
|
-
@ignore_docs
|
|
142
137
|
def decrypt_input_secrets(private_key: rsa.RSAPrivateKey, input_data: Any) -> Any:
|
|
143
138
|
"""Decrypt input secrets."""
|
|
144
139
|
if not isinstance(input_data, dict):
|
|
@@ -180,7 +175,6 @@ def encode_base62(num: int) -> str:
|
|
|
180
175
|
return res
|
|
181
176
|
|
|
182
177
|
|
|
183
|
-
@ignore_docs
|
|
184
178
|
def create_hmac_signature(secret_key: str, message: str) -> str:
|
|
185
179
|
"""Generate an HMAC signature and encodes it using Base62. Base62 encoding reduces the signature length.
|
|
186
180
|
|
|
@@ -16,7 +16,7 @@ if TYPE_CHECKING:
|
|
|
16
16
|
from typing import TypeAlias
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
@docs_group('
|
|
19
|
+
@docs_group('Actor')
|
|
20
20
|
class Webhook(BaseModel):
|
|
21
21
|
__model_config__ = ConfigDict(populate_by_name=True)
|
|
22
22
|
|
|
@@ -35,14 +35,14 @@ class Webhook(BaseModel):
|
|
|
35
35
|
] = None
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
@docs_group('
|
|
38
|
+
@docs_group('Actor')
|
|
39
39
|
class ActorRunMeta(BaseModel):
|
|
40
40
|
__model_config__ = ConfigDict(populate_by_name=True)
|
|
41
41
|
|
|
42
42
|
origin: Annotated[MetaOrigin, Field()]
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
@docs_group('
|
|
45
|
+
@docs_group('Actor')
|
|
46
46
|
class ActorRunStats(BaseModel):
|
|
47
47
|
__model_config__ = ConfigDict(populate_by_name=True)
|
|
48
48
|
|
|
@@ -63,7 +63,7 @@ class ActorRunStats(BaseModel):
|
|
|
63
63
|
compute_units: Annotated[float, Field(alias='computeUnits')]
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
@docs_group('
|
|
66
|
+
@docs_group('Actor')
|
|
67
67
|
class ActorRunOptions(BaseModel):
|
|
68
68
|
__model_config__ = ConfigDict(populate_by_name=True)
|
|
69
69
|
|
|
@@ -74,7 +74,7 @@ class ActorRunOptions(BaseModel):
|
|
|
74
74
|
max_total_charge_usd: Annotated[Decimal | None, Field(alias='maxTotalChargeUsd')] = None
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
@docs_group('
|
|
77
|
+
@docs_group('Actor')
|
|
78
78
|
class ActorRunUsage(BaseModel):
|
|
79
79
|
__model_config__ = ConfigDict(populate_by_name=True)
|
|
80
80
|
|
|
@@ -92,7 +92,7 @@ class ActorRunUsage(BaseModel):
|
|
|
92
92
|
proxy_serps: Annotated[float | None, Field(alias='PROXY_SERPS')] = None
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
@docs_group('
|
|
95
|
+
@docs_group('Actor')
|
|
96
96
|
class ActorRun(BaseModel):
|
|
97
97
|
__model_config__ = ConfigDict(populate_by_name=True)
|
|
98
98
|
|
|
@@ -27,17 +27,10 @@ if TYPE_CHECKING:
|
|
|
27
27
|
|
|
28
28
|
from apify._configuration import Configuration
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
__all__ = ['EventManager', 'LocalEventManager', 'PlatformEventManager']
|
|
32
31
|
|
|
33
32
|
|
|
34
|
-
@docs_group('
|
|
35
|
-
class PersistStateEvent(BaseModel):
|
|
36
|
-
name: Literal[Event.PERSIST_STATE]
|
|
37
|
-
data: Annotated[EventPersistStateData, Field(default_factory=lambda: EventPersistStateData(is_migrating=False))]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@docs_group('Data structures')
|
|
33
|
+
@docs_group('Event data')
|
|
41
34
|
class SystemInfoEventData(BaseModel):
|
|
42
35
|
mem_avg_bytes: Annotated[float, Field(alias='memAvgBytes')]
|
|
43
36
|
mem_current_bytes: Annotated[float, Field(alias='memCurrentBytes')]
|
|
@@ -64,31 +57,37 @@ class SystemInfoEventData(BaseModel):
|
|
|
64
57
|
)
|
|
65
58
|
|
|
66
59
|
|
|
67
|
-
@docs_group('
|
|
60
|
+
@docs_group('Events')
|
|
61
|
+
class PersistStateEvent(BaseModel):
|
|
62
|
+
name: Literal[Event.PERSIST_STATE]
|
|
63
|
+
data: Annotated[EventPersistStateData, Field(default_factory=lambda: EventPersistStateData(is_migrating=False))]
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@docs_group('Events')
|
|
68
67
|
class SystemInfoEvent(BaseModel):
|
|
69
68
|
name: Literal[Event.SYSTEM_INFO]
|
|
70
69
|
data: SystemInfoEventData
|
|
71
70
|
|
|
72
71
|
|
|
73
|
-
@docs_group('
|
|
72
|
+
@docs_group('Events')
|
|
74
73
|
class MigratingEvent(BaseModel):
|
|
75
74
|
name: Literal[Event.MIGRATING]
|
|
76
75
|
data: Annotated[EventMigratingData, Field(default_factory=EventMigratingData)]
|
|
77
76
|
|
|
78
77
|
|
|
79
|
-
@docs_group('
|
|
78
|
+
@docs_group('Events')
|
|
80
79
|
class AbortingEvent(BaseModel):
|
|
81
80
|
name: Literal[Event.ABORTING]
|
|
82
81
|
data: Annotated[EventAbortingData, Field(default_factory=EventAbortingData)]
|
|
83
82
|
|
|
84
83
|
|
|
85
|
-
@docs_group('
|
|
84
|
+
@docs_group('Events')
|
|
86
85
|
class ExitEvent(BaseModel):
|
|
87
86
|
name: Literal[Event.EXIT]
|
|
88
87
|
data: Annotated[EventExitData, Field(default_factory=EventExitData)]
|
|
89
88
|
|
|
90
89
|
|
|
91
|
-
@docs_group('
|
|
90
|
+
@docs_group('Events')
|
|
92
91
|
class EventWithoutData(BaseModel):
|
|
93
92
|
name: Literal[
|
|
94
93
|
Event.SESSION_RETIRED,
|
|
@@ -101,13 +100,13 @@ class EventWithoutData(BaseModel):
|
|
|
101
100
|
data: Any = None
|
|
102
101
|
|
|
103
102
|
|
|
104
|
-
@docs_group('
|
|
103
|
+
@docs_group('Events')
|
|
105
104
|
class DeprecatedEvent(BaseModel):
|
|
106
105
|
name: Literal['cpuInfo']
|
|
107
106
|
data: Annotated[dict[str, Any], Field(default_factory=dict)]
|
|
108
107
|
|
|
109
108
|
|
|
110
|
-
@docs_group('
|
|
109
|
+
@docs_group('Events')
|
|
111
110
|
class UnknownEvent(BaseModel):
|
|
112
111
|
name: str
|
|
113
112
|
data: Annotated[dict[str, Any], Field(default_factory=dict)]
|
|
@@ -120,7 +119,7 @@ event_data_adapter = TypeAdapter[EventMessage | DeprecatedEvent | UnknownEvent](
|
|
|
120
119
|
)
|
|
121
120
|
|
|
122
121
|
|
|
123
|
-
@docs_group('
|
|
122
|
+
@docs_group('Event managers')
|
|
124
123
|
class PlatformEventManager(EventManager):
|
|
125
124
|
"""A class for managing Actor events.
|
|
126
125
|
|