apify 1.7.1b1__py3-none-any.whl → 2.2.1b1__py3-none-any.whl

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.

Files changed (62) hide show
  1. apify/__init__.py +33 -4
  2. apify/_actor.py +1074 -0
  3. apify/_configuration.py +370 -0
  4. apify/_consts.py +10 -0
  5. apify/_crypto.py +31 -27
  6. apify/_models.py +117 -0
  7. apify/_platform_event_manager.py +231 -0
  8. apify/_proxy_configuration.py +320 -0
  9. apify/_utils.py +18 -484
  10. apify/apify_storage_client/__init__.py +3 -0
  11. apify/apify_storage_client/_apify_storage_client.py +68 -0
  12. apify/apify_storage_client/_dataset_client.py +190 -0
  13. apify/apify_storage_client/_dataset_collection_client.py +51 -0
  14. apify/apify_storage_client/_key_value_store_client.py +94 -0
  15. apify/apify_storage_client/_key_value_store_collection_client.py +51 -0
  16. apify/apify_storage_client/_request_queue_client.py +176 -0
  17. apify/apify_storage_client/_request_queue_collection_client.py +51 -0
  18. apify/apify_storage_client/py.typed +0 -0
  19. apify/log.py +22 -105
  20. apify/scrapy/__init__.py +11 -3
  21. apify/scrapy/middlewares/__init__.py +3 -1
  22. apify/scrapy/middlewares/apify_proxy.py +29 -27
  23. apify/scrapy/middlewares/py.typed +0 -0
  24. apify/scrapy/pipelines/__init__.py +3 -1
  25. apify/scrapy/pipelines/actor_dataset_push.py +6 -3
  26. apify/scrapy/pipelines/py.typed +0 -0
  27. apify/scrapy/py.typed +0 -0
  28. apify/scrapy/requests.py +60 -58
  29. apify/scrapy/scheduler.py +28 -19
  30. apify/scrapy/utils.py +10 -32
  31. apify/storages/__init__.py +4 -10
  32. apify/storages/_request_list.py +150 -0
  33. apify/storages/py.typed +0 -0
  34. apify-2.2.1b1.dist-info/METADATA +211 -0
  35. apify-2.2.1b1.dist-info/RECORD +38 -0
  36. {apify-1.7.1b1.dist-info → apify-2.2.1b1.dist-info}/WHEEL +1 -2
  37. apify/_memory_storage/__init__.py +0 -3
  38. apify/_memory_storage/file_storage_utils.py +0 -71
  39. apify/_memory_storage/memory_storage_client.py +0 -219
  40. apify/_memory_storage/resource_clients/__init__.py +0 -19
  41. apify/_memory_storage/resource_clients/base_resource_client.py +0 -141
  42. apify/_memory_storage/resource_clients/base_resource_collection_client.py +0 -114
  43. apify/_memory_storage/resource_clients/dataset.py +0 -452
  44. apify/_memory_storage/resource_clients/dataset_collection.py +0 -48
  45. apify/_memory_storage/resource_clients/key_value_store.py +0 -533
  46. apify/_memory_storage/resource_clients/key_value_store_collection.py +0 -48
  47. apify/_memory_storage/resource_clients/request_queue.py +0 -466
  48. apify/_memory_storage/resource_clients/request_queue_collection.py +0 -48
  49. apify/actor.py +0 -1351
  50. apify/config.py +0 -127
  51. apify/consts.py +0 -67
  52. apify/event_manager.py +0 -236
  53. apify/proxy_configuration.py +0 -365
  54. apify/storages/base_storage.py +0 -181
  55. apify/storages/dataset.py +0 -494
  56. apify/storages/key_value_store.py +0 -257
  57. apify/storages/request_queue.py +0 -602
  58. apify/storages/storage_client_manager.py +0 -72
  59. apify-1.7.1b1.dist-info/METADATA +0 -149
  60. apify-1.7.1b1.dist-info/RECORD +0 -41
  61. apify-1.7.1b1.dist-info/top_level.txt +0 -1
  62. {apify-1.7.1b1.dist-info → apify-2.2.1b1.dist-info}/LICENSE +0 -0
@@ -1,149 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: apify
3
- Version: 1.7.1b1
4
- Summary: Apify SDK for Python
5
- Author-email: "Apify Technologies s.r.o." <support@apify.com>
6
- License: Apache Software License
7
- Project-URL: Homepage, https://docs.apify.com/sdk/python/
8
- Project-URL: Documentation, https://docs.apify.com/sdk/python/
9
- Project-URL: Source, https://github.com/apify/apify-sdk-python
10
- Project-URL: Issue tracker, https://github.com/apify/apify-sdk-python/issues
11
- Project-URL: Changelog, https://github.com/apify/apify-sdk-python/blob/master/CHANGELOG.md
12
- Project-URL: Apify Homepage, https://apify.com
13
- Keywords: apify,sdk,actor,scraping,automation
14
- Classifier: Development Status :: 5 - Production/Stable
15
- Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: Apache Software License
17
- Classifier: Operating System :: OS Independent
18
- Classifier: Programming Language :: Python :: 3.8
19
- Classifier: Programming Language :: Python :: 3.9
20
- Classifier: Programming Language :: Python :: 3.10
21
- Classifier: Programming Language :: Python :: 3.11
22
- Classifier: Programming Language :: Python :: 3.12
23
- Classifier: Topic :: Software Development :: Libraries
24
- Requires-Python: >=3.8
25
- Description-Content-Type: text/markdown
26
- License-File: LICENSE
27
- Requires-Dist: apify-client ~=1.6.2
28
- Requires-Dist: apify-shared ~=1.1.1
29
- Requires-Dist: aiofiles >=22.1.0
30
- Requires-Dist: aioshutil >=1.0
31
- Requires-Dist: colorama >=0.4.6
32
- Requires-Dist: cryptography >=39.0.0
33
- Requires-Dist: httpx >=0.24.1
34
- Requires-Dist: psutil >=5.9.5
35
- Requires-Dist: pyee >=11.0.1
36
- Requires-Dist: sortedcollections >=2.0.1
37
- Requires-Dist: typing-extensions >=4.1.0
38
- Requires-Dist: websockets >=10.1
39
- Provides-Extra: dev
40
- Requires-Dist: build ~=1.0.3 ; extra == 'dev'
41
- Requires-Dist: filelock ~=3.12.4 ; extra == 'dev'
42
- Requires-Dist: mypy ~=1.7.1 ; extra == 'dev'
43
- Requires-Dist: pre-commit ~=3.4.0 ; extra == 'dev'
44
- Requires-Dist: pydoc-markdown ~=4.8.2 ; extra == 'dev'
45
- Requires-Dist: pytest ~=7.4.2 ; extra == 'dev'
46
- Requires-Dist: pytest-asyncio ~=0.21.0 ; extra == 'dev'
47
- Requires-Dist: pytest-cov ~=4.1.0 ; extra == 'dev'
48
- Requires-Dist: pytest-only ~=2.0.0 ; extra == 'dev'
49
- Requires-Dist: pytest-timeout ~=2.2.0 ; extra == 'dev'
50
- Requires-Dist: pytest-xdist ~=3.3.1 ; extra == 'dev'
51
- Requires-Dist: respx ~=0.20.1 ; extra == 'dev'
52
- Requires-Dist: ruff ~=0.1.13 ; extra == 'dev'
53
- Requires-Dist: twine ~=4.0.2 ; extra == 'dev'
54
- Requires-Dist: types-aiofiles ~=23.2.0.0 ; extra == 'dev'
55
- Requires-Dist: types-colorama ~=0.4.15.12 ; extra == 'dev'
56
- Requires-Dist: types-psutil ~=5.9.5.17 ; extra == 'dev'
57
- Provides-Extra: scrapy
58
- Requires-Dist: scrapy >=2.11.0 ; extra == 'scrapy'
59
-
60
- # Apify SDK for Python
61
-
62
- The Apify SDK for Python is the official library to create [Apify Actors](https://docs.apify.com/platform/actors)
63
- in Python. It provides useful features like Actor lifecycle management, local storage emulation, and Actor
64
- event handling.
65
-
66
- If you just need to access the [Apify API](https://docs.apify.com/api/v2) from your Python applications,
67
- check out the [Apify Client for Python](https://docs.apify.com/api/client/python) instead.
68
-
69
- ## Installation
70
-
71
- The Apify SDK for Python is available on PyPI as the `apify` package.
72
- For default installation, using Pip, run the following:
73
-
74
- ```bash
75
- pip install apify
76
- ```
77
-
78
- For users interested in integrating Apify with Scrapy, we provide a package extra called `scrapy`.
79
- To install Apify with the `scrapy` extra, use the following command:
80
-
81
- ```bash
82
- pip install apify[scrapy]
83
- ```
84
-
85
- ## Documentation
86
-
87
- For usage instructions, check the documentation on [Apify Docs](https://docs.apify.com/sdk/python/).
88
-
89
- ## Example
90
-
91
- ```python
92
- from apify import Actor
93
- from bs4 import BeautifulSoup
94
- from httpx import AsyncClient
95
-
96
- async def main() -> None:
97
- async with Actor:
98
- # Read the input parameters from the Actor input
99
- actor_input = await Actor.get_input()
100
- # Fetch the HTTP response from the specified URL
101
- async with AsyncClient() as client:
102
- response = await client.get(actor_input['url'])
103
- # Process the HTML content
104
- soup = BeautifulSoup(response.content, 'html.parser')
105
- # Push the extracted data
106
- await Actor.push_data({
107
- 'url': actor_input['url'],
108
- 'title': soup.title.string,
109
- })
110
- ```
111
-
112
- ## What are Actors?
113
-
114
- Actors are serverless cloud programs that can do almost anything a human can do in a web browser.
115
- They can do anything from small tasks such as filling in forms or unsubscribing from online services,
116
- all the way up to scraping and processing vast numbers of web pages.
117
-
118
- They can be run either locally, or on the [Apify platform](https://docs.apify.com/platform/),
119
- where you can run them at scale, monitor them, schedule them, or publish and monetize them.
120
-
121
- If you're new to Apify, learn [what is Apify](https://docs.apify.com/platform/about)
122
- in the Apify platform documentation.
123
-
124
- ## Creating Actors
125
-
126
- To create and run Actors through Apify Console,
127
- see the [Console documentation](https://docs.apify.com/academy/getting-started/creating-actors#choose-your-template).
128
-
129
- To create and run Python Actors locally, check the documentation for
130
- [how to create and run Python Actors locally](https://docs.apify.com/sdk/python/docs/overview/running-locally).
131
-
132
- ## Guides
133
-
134
- To see how you can use the Apify SDK with other popular libraries used for web scraping,
135
- check out our guides for using
136
- [Requests and HTTPX](https://docs.apify.com/sdk/python/docs/guides/requests-and-httpx),
137
- [Beautiful Soup](https://docs.apify.com/sdk/python/docs/guides/beautiful-soup),
138
- [Playwright](https://docs.apify.com/sdk/python/docs/guides/playwright),
139
- [Selenium](https://docs.apify.com/sdk/python/docs/guides/selenium),
140
- or [Scrapy](https://docs.apify.com/sdk/python/docs/guides/scrapy).
141
-
142
- ## Usage concepts
143
-
144
- To learn more about the features of the Apify SDK and how to use them,
145
- check out the Usage Concepts section in the sidebar,
146
- particularly the guides for the [Actor lifecycle](https://docs.apify.com/sdk/python/docs/concepts/actor-lifecycle),
147
- [working with storages](https://docs.apify.com/sdk/python/docs/concepts/storages),
148
- [handling Actor events](https://docs.apify.com/sdk/python/docs/concepts/actor-events)
149
- or [how to use proxies](https://docs.apify.com/sdk/python/docs/concepts/proxy-management).
@@ -1,41 +0,0 @@
1
- apify/__init__.py,sha256=aAjho-r0-XAqUjD9j55ueCo4lZJzyytOWjk0VCmkeeY,283
2
- apify/_crypto.py,sha256=mbqwfgVz7efAw6ko1PTtpaaRqlBvTi-oskiZmWufTrk,5822
3
- apify/_utils.py,sha256=7_iHGRw8AZA7ITStg5cN8k_ZmqMKdAQ_ev2ZRcO3X0M,16963
4
- apify/actor.py,sha256=v_hefwMXy2qCIBjcZvVHE9zdHg2jut0Xuf6IodX_vvo,59997
5
- apify/config.py,sha256=mPbTqKe09hJXXGqKLuNRXGdBNod9mn1ACujRSm80GRQ,8785
6
- apify/consts.py,sha256=eSD23HmwLKwWG8bRp5O1c7bmtlhvYE17Yw46BKs4vQQ,2263
7
- apify/event_manager.py,sha256=k4_f977esIOvgGshec4yUSulU10-UsEkoVEV4sZEjwg,10612
8
- apify/log.py,sha256=PObD-34j4GFUTLHHWDfgdd39ftfERBQBTc2DyvPJT3o,5005
9
- apify/proxy_configuration.py,sha256=ZMNZHj0EQDPuXKdjcVP3eXazCRYUkmYR6hUlVyonUhk,15735
10
- apify/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- apify/_memory_storage/__init__.py,sha256=frNb9kh6bfKtZNEMe2PA_QlT6DTUbhffcNfWhELiZNQ,90
12
- apify/_memory_storage/file_storage_utils.py,sha256=83gd8ruzY_vkrpHT1ZeG3r8qJJKCKLeuGrxsBQgXeAE,2266
13
- apify/_memory_storage/memory_storage_client.py,sha256=5v6tUjzFIW7Mpr4iK0tERysRwgTt5TeEDoyjqTXjf-o,10598
14
- apify/_memory_storage/resource_clients/__init__.py,sha256=afkbzv59lgBe_JCgJcTbAt-ayX0VjtO6u0ExI7JVkEk,705
15
- apify/_memory_storage/resource_clients/base_resource_client.py,sha256=YbjqNvRU34mBw3zVyGVN60k5Me4Koq1D2hFHF3oUBYA,5163
16
- apify/_memory_storage/resource_clients/base_resource_collection_client.py,sha256=et-ChUnuLPnk_dYXG9kyPsvY9seM-5WIjYfGC5cMDeo,3986
17
- apify/_memory_storage/resource_clients/dataset.py,sha256=ySPzEQXeopwKLNhlEGvYl9KvuGz5u86piHWT2xDns6w,20062
18
- apify/_memory_storage/resource_clients/dataset_collection.py,sha256=tk5GUb1azeHQwFuX106AhGt7I_1sHWSV2n952-p4rug,1614
19
- apify/_memory_storage/resource_clients/key_value_store.py,sha256=5LVTuSzsSS6uDmUXAKa1ShyFRsES3eDDpguVGDb-OkE,20581
20
- apify/_memory_storage/resource_clients/key_value_store_collection.py,sha256=CBTcgffPmxLdEWz3KfjNsrQO49NHwW3QOD-AYA_C5hU,1740
21
- apify/_memory_storage/resource_clients/request_queue.py,sha256=6skV2fGpDxrDtn43oQIiBxd4kA5wJ8ygw7_Yy1q7M_M,19700
22
- apify/_memory_storage/resource_clients/request_queue_collection.py,sha256=qW7kPLKRl5mukIGCT8iNCsXT82BUYSwCV_KH7MLj528,1713
23
- apify/scrapy/__init__.py,sha256=xrhyVgPvdB_kB6ugkhUM4YM3WkvBUu5ZiV_4bW11LwM,195
24
- apify/scrapy/requests.py,sha256=BBjXUametZNVgV-BzTLnrv3rOIxBnAtCkakkCf7ZFvs,7935
25
- apify/scrapy/scheduler.py,sha256=51GME-shm0-Yks2ERmIJRrCCJ6oCId5757obQmbCNTY,5789
26
- apify/scrapy/utils.py,sha256=A_BhU_yxPQ__SYsoz9dMiwJ2pbh-oZCuEwVMKaSXtwo,3899
27
- apify/scrapy/middlewares/__init__.py,sha256=gb3bCu__5wKO_ePhfFgGm-Chw384r8IbC3eoIsz0uG0,50
28
- apify/scrapy/middlewares/apify_proxy.py,sha256=pDNx31y7llSv3ZM1SSujEYZSWQTfNfAqKvsNph5zbbU,5919
29
- apify/scrapy/pipelines/__init__.py,sha256=KBUE3maOWrLfJRmWSsyW6YxxZY4lCGP2GZyMm9Z56VY,57
30
- apify/scrapy/pipelines/actor_dataset_push.py,sha256=SlddL0Cwu32lQ6jYPsXybsrjHlrh7N-ADaH4a8ni4Do,959
31
- apify/storages/__init__.py,sha256=rBdwhyZxUMG6m_7uAb4sl5eg_dxiLvYVas5aRcZ6PIE,268
32
- apify/storages/base_storage.py,sha256=exPzjyMkkUccvg2qPcjZtLJQLWhfrlQxQHV-8p_K8w0,7434
33
- apify/storages/dataset.py,sha256=gfMlJ6dSXDdjCykkStZCyp4u8xKCIZqflGS9-jLzK74,23339
34
- apify/storages/key_value_store.py,sha256=BUGYPI4MuRlOJ_aPzZr8bq7ay_K04qAZ7yKW7C8ItV4,10760
35
- apify/storages/request_queue.py,sha256=68pM2nJUYjkdpBTM315NnjRYE_yzeoslVtBQRB7bm74,28829
36
- apify/storages/storage_client_manager.py,sha256=fvXg3PRojATNamEN29BBZyZZ5GWN_s0r29A59aiL-wQ,2465
37
- apify-1.7.1b1.dist-info/LICENSE,sha256=AsFjHssKjj4LGd2ZCqXn6FBzMqcWdjQre1byPPSypVw,11355
38
- apify-1.7.1b1.dist-info/METADATA,sha256=Y55ixx0bj7gvQA-i6piqzgXHgLWvnxrK2KRAyXWTDWw,6236
39
- apify-1.7.1b1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
40
- apify-1.7.1b1.dist-info/top_level.txt,sha256=2oFNsHggn5m_rCaaP7xijQg_-Va2ByOSYuvKgACsS5w,6
41
- apify-1.7.1b1.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- apify