apify 2.0.1b4__py3-none-any.whl → 2.0.1b6__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.
- apify/_crypto.py +2 -0
- apify/_platform_event_manager.py +0 -2
- apify/_proxy_configuration.py +1 -0
- apify/log.py +2 -0
- apify/scrapy/requests.py +4 -0
- apify/scrapy/utils.py +4 -0
- {apify-2.0.1b4.dist-info → apify-2.0.1b6.dist-info}/METADATA +1 -1
- {apify-2.0.1b4.dist-info → apify-2.0.1b6.dist-info}/RECORD +10 -10
- {apify-2.0.1b4.dist-info → apify-2.0.1b6.dist-info}/LICENSE +0 -0
- {apify-2.0.1b4.dist-info → apify-2.0.1b6.dist-info}/WHEEL +0 -0
apify/_crypto.py
CHANGED
|
@@ -114,6 +114,7 @@ def private_decrypt(
|
|
|
114
114
|
return decipher_bytes.decode('utf-8')
|
|
115
115
|
|
|
116
116
|
|
|
117
|
+
@ignore_docs
|
|
117
118
|
def load_private_key(private_key_file_base64: str, private_key_password: str) -> rsa.RSAPrivateKey:
|
|
118
119
|
private_key = serialization.load_pem_private_key(
|
|
119
120
|
base64.b64decode(private_key_file_base64.encode('utf-8')),
|
|
@@ -133,6 +134,7 @@ def _load_public_key(public_key_file_base64: str) -> rsa.RSAPublicKey:
|
|
|
133
134
|
return public_key
|
|
134
135
|
|
|
135
136
|
|
|
137
|
+
@ignore_docs
|
|
136
138
|
def decrypt_input_secrets(private_key: rsa.RSAPrivateKey, input_data: Any) -> Any:
|
|
137
139
|
"""Decrypt input secrets."""
|
|
138
140
|
if not isinstance(input_data, dict):
|
apify/_platform_event_manager.py
CHANGED
|
@@ -8,7 +8,6 @@ import websockets.client
|
|
|
8
8
|
from pydantic import BaseModel, Discriminator, Field, TypeAdapter
|
|
9
9
|
from typing_extensions import Self, Unpack, override
|
|
10
10
|
|
|
11
|
-
from apify_shared.utils import ignore_docs
|
|
12
11
|
from crawlee.events._event_manager import EventManager, EventManagerOptions
|
|
13
12
|
from crawlee.events._local_event_manager import LocalEventManager
|
|
14
13
|
from crawlee.events._types import (
|
|
@@ -126,7 +125,6 @@ event_data_adapter: TypeAdapter[EventMessage | DeprecatedEvent | UnknownEvent] =
|
|
|
126
125
|
)
|
|
127
126
|
|
|
128
127
|
|
|
129
|
-
@ignore_docs
|
|
130
128
|
class PlatformEventManager(EventManager):
|
|
131
129
|
"""A class for managing Actor events.
|
|
132
130
|
|
apify/_proxy_configuration.py
CHANGED
apify/log.py
CHANGED
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import TYPE_CHECKING
|
|
5
5
|
|
|
6
|
+
from apify_shared.utils import ignore_docs
|
|
6
7
|
from crawlee._log_config import CrawleeLogFormatter, configure_logger, get_configured_log_level
|
|
7
8
|
|
|
8
9
|
if TYPE_CHECKING:
|
|
@@ -15,6 +16,7 @@ logger_name = __name__.split('.')[0]
|
|
|
15
16
|
logger = logging.getLogger(logger_name)
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
@ignore_docs
|
|
18
20
|
class ActorLogFormatter(CrawleeLogFormatter): # noqa: D101 Inherited from parent class
|
|
19
21
|
pass
|
|
20
22
|
|
apify/scrapy/requests.py
CHANGED
|
@@ -4,6 +4,8 @@ import codecs
|
|
|
4
4
|
import pickle
|
|
5
5
|
from typing import Any, cast
|
|
6
6
|
|
|
7
|
+
from apify_shared.utils import ignore_docs
|
|
8
|
+
|
|
7
9
|
try:
|
|
8
10
|
from scrapy import Request, Spider
|
|
9
11
|
from scrapy.http.headers import Headers
|
|
@@ -28,6 +30,7 @@ def _is_request_produced_by_middleware(scrapy_request: Request) -> bool:
|
|
|
28
30
|
return bool(scrapy_request.meta.get('redirect_times')) or bool(scrapy_request.meta.get('retry_times'))
|
|
29
31
|
|
|
30
32
|
|
|
33
|
+
@ignore_docs
|
|
31
34
|
def to_apify_request(scrapy_request: Request, spider: Spider) -> CrawleeRequest | None:
|
|
32
35
|
"""Convert a Scrapy request to an Apify request.
|
|
33
36
|
|
|
@@ -98,6 +101,7 @@ def to_apify_request(scrapy_request: Request, spider: Spider) -> CrawleeRequest
|
|
|
98
101
|
return apify_request
|
|
99
102
|
|
|
100
103
|
|
|
104
|
+
@ignore_docs
|
|
101
105
|
def to_scrapy_request(apify_request: CrawleeRequest, spider: Spider) -> Request:
|
|
102
106
|
"""Convert an Apify request to a Scrapy request.
|
|
103
107
|
|
apify/scrapy/utils.py
CHANGED
|
@@ -4,6 +4,8 @@ import asyncio
|
|
|
4
4
|
from base64 import b64encode
|
|
5
5
|
from urllib.parse import unquote
|
|
6
6
|
|
|
7
|
+
from apify_shared.utils import ignore_docs
|
|
8
|
+
|
|
7
9
|
try:
|
|
8
10
|
from scrapy.settings import Settings # noqa: TCH002
|
|
9
11
|
from scrapy.utils.project import get_project_settings
|
|
@@ -18,6 +20,7 @@ except ImportError as exc:
|
|
|
18
20
|
nested_event_loop: asyncio.AbstractEventLoop = asyncio.new_event_loop()
|
|
19
21
|
|
|
20
22
|
|
|
23
|
+
@ignore_docs
|
|
21
24
|
def get_basic_auth_header(username: str, password: str, auth_encoding: str = 'latin-1') -> bytes:
|
|
22
25
|
"""Generate a basic authentication header for the given username and password."""
|
|
23
26
|
string = f'{unquote(username)}:{unquote(password)}'
|
|
@@ -25,6 +28,7 @@ def get_basic_auth_header(username: str, password: str, auth_encoding: str = 'la
|
|
|
25
28
|
return b'Basic ' + b64encode(user_pass)
|
|
26
29
|
|
|
27
30
|
|
|
31
|
+
@ignore_docs
|
|
28
32
|
def get_running_event_loop_id() -> int:
|
|
29
33
|
"""Get the ID of the currently running event loop.
|
|
30
34
|
|
|
@@ -2,10 +2,10 @@ apify/__init__.py,sha256=ikoi2EpDYl6y-XSVtlU8UsdQdMEyOiIJCRRAaZFDOP8,550
|
|
|
2
2
|
apify/_actor.py,sha256=oPgQ3rxxIEzVcZ9XtI3lf1a_6gwIMgxihNuYGjJpGww,41816
|
|
3
3
|
apify/_configuration.py,sha256=gf7YOun32Whc9DamhoWDLmcUeNwtWVmmBPrl4oq6s4I,8997
|
|
4
4
|
apify/_consts.py,sha256=_Xq4hOfOA1iZ3n1P967YWdyncKivpbX6RTlp_qanUoE,330
|
|
5
|
-
apify/_crypto.py,sha256=
|
|
5
|
+
apify/_crypto.py,sha256=e0_aM3l9_5Osk-jszYOOjrAKK60OggSHbiw5c30QnsU,5638
|
|
6
6
|
apify/_models.py,sha256=oYlTEr-DyQAE-V2rrYD5PhUxTXVPdAig7QV-u6CJw3E,5571
|
|
7
|
-
apify/_platform_event_manager.py,sha256=
|
|
8
|
-
apify/_proxy_configuration.py,sha256=
|
|
7
|
+
apify/_platform_event_manager.py,sha256=K4cHabbQ7_ex7vkX-c-VhAOp8Efw3HDn5Wp4lfA-qAU,7571
|
|
8
|
+
apify/_proxy_configuration.py,sha256=2z4VV_NrnIp6pDpgQKlKpcHM2pPyXiOpFedpPWje48A,13087
|
|
9
9
|
apify/_utils.py,sha256=x4lnR9RNulySiEQTft-GeQqUcJsRr0k8p0Sv9NTeWFg,638
|
|
10
10
|
apify/apify_storage_client/__init__.py,sha256=-UbR68bFsDR6ln8OFs4t50eqcnY36hujO-SeOt-KmcA,114
|
|
11
11
|
apify/apify_storage_client/_apify_storage_client.py,sha256=xi4OFchxhe-1-sykanH6Zcya4OcBhn2uf7OQ1pV4Ins,2338
|
|
@@ -16,7 +16,7 @@ apify/apify_storage_client/_key_value_store_collection_client.py,sha256=vCtMTI-j
|
|
|
16
16
|
apify/apify_storage_client/_request_queue_client.py,sha256=jAiFkaJ38_myHFGTw-Rk21wmpbN0UCR2w2SFoimFGFc,5826
|
|
17
17
|
apify/apify_storage_client/_request_queue_collection_client.py,sha256=NnO73UJ9ZrjV8xoudo30wfaM-SojRkG0guhxDyB-K1g,1527
|
|
18
18
|
apify/apify_storage_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
apify/log.py,sha256=
|
|
19
|
+
apify/log.py,sha256=zIVjrqQ1DNWNQQOAmdmR9oAbf4nJH7CSMB6u4OOUf6I,1448
|
|
20
20
|
apify/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
apify/scrapy/__init__.py,sha256=qDPV_zTRFaUqoFOyS5g4uBfz-UCkmWYJ82VXQ_3Cw6k,348
|
|
22
22
|
apify/scrapy/middlewares/__init__.py,sha256=tfW-d3WFWLeNEjL8fTmon6NwgD-OXx1Bw2fBdU-wPy4,114
|
|
@@ -26,12 +26,12 @@ apify/scrapy/pipelines/__init__.py,sha256=GWPeLN_Zwj8vRBWtXW6DaxdB7mvyQ7Jw5Tz1cc
|
|
|
26
26
|
apify/scrapy/pipelines/actor_dataset_push.py,sha256=QERmmExQOGIKQ70-p-lCj5qyE-c-fnYplEqd4mgaB1Q,953
|
|
27
27
|
apify/scrapy/pipelines/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
apify/scrapy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
apify/scrapy/requests.py,sha256=
|
|
29
|
+
apify/scrapy/requests.py,sha256=MwJJQXEai6GWNpPO7O4HNdnx3GYbD-cxh0QwXP93jPc,7707
|
|
30
30
|
apify/scrapy/scheduler.py,sha256=AAIKY5i1QxkC1mtmix6n3M2eQaOw-d1T56Noue9xToc,6013
|
|
31
|
-
apify/scrapy/utils.py,sha256=
|
|
31
|
+
apify/scrapy/utils.py,sha256=0XdFxi1qlUa6gHXG96e1FU9gW0N5Rsu0sVZklFYfC2U,2884
|
|
32
32
|
apify/storages/__init__.py,sha256=-9tEYJVabVs_eRVhUehxN58GH0UG8OfuGjGwuDieP2M,122
|
|
33
33
|
apify/storages/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
|
-
apify-2.0.
|
|
35
|
-
apify-2.0.
|
|
36
|
-
apify-2.0.
|
|
37
|
-
apify-2.0.
|
|
34
|
+
apify-2.0.1b6.dist-info/LICENSE,sha256=AsFjHssKjj4LGd2ZCqXn6FBzMqcWdjQre1byPPSypVw,11355
|
|
35
|
+
apify-2.0.1b6.dist-info/METADATA,sha256=MXzdwEwn73c_slrfPQZpnXNYHfbWfspDuJWXQI13NiE,8606
|
|
36
|
+
apify-2.0.1b6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
37
|
+
apify-2.0.1b6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|