rnet 3.0.0rc5__cp311-abi3-win_arm64.whl → 3.0.0rc6__cp311-abi3-win_arm64.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 rnet might be problematic. Click here for more details.

rnet/__init__.py CHANGED
@@ -1,6 +1,7 @@
1
1
  # rnet/__init__.py
2
2
 
3
3
  from .rnet import *
4
+ from .rnet import __all__
4
5
 
5
6
  from .cookie import *
6
7
  from .exceptions import *
rnet/__init__.pyi CHANGED
@@ -19,7 +19,7 @@ from enum import Enum, auto
19
19
  from .cookie import Cookie, Jar
20
20
  from .header import HeaderMap, OrigHeaderMap
21
21
  from .emulation import Emulation, EmulationOption
22
- from .tls import TlsVersion, Identity, KeyLogPolicy, CertStore
22
+ from .tls import TlsVersion, Identity, KeyLog, CertStore
23
23
 
24
24
  class Method(Enum):
25
25
  r"""
@@ -465,6 +465,16 @@ class Response:
465
465
  Get the DER encoded leaf certificate of the response.
466
466
  """
467
467
 
468
+ def raise_for_status(self) -> None:
469
+ r"""
470
+ Turn a response into an error if the server returned an error.
471
+ """
472
+
473
+ def stream(self) -> Streamer:
474
+ r"""
475
+ Get the response into a `Streamer` of `bytes` from the body.
476
+ """
477
+
468
478
  async def text(self) -> str:
469
479
  r"""
470
480
  Get the text content of the response.
@@ -485,11 +495,6 @@ class Response:
485
495
  Get the bytes content of the response.
486
496
  """
487
497
 
488
- def stream(self) -> Streamer:
489
- r"""
490
- Get the response into a `Stream` of `Bytes` from the body.
491
- """
492
-
493
498
  async def close(self) -> None:
494
499
  r"""
495
500
  Close the response connection.
@@ -662,7 +667,7 @@ class ClientParams(TypedDict):
662
667
  identity: NotRequired[Identity]
663
668
  """Represents a private key and X509 cert as a client certificate."""
664
669
 
665
- keylog: NotRequired[KeyLogPolicy]
670
+ keylog: NotRequired[KeyLog]
666
671
  """Key logging policy (environment or file)."""
667
672
 
668
673
  tls_info: NotRequired[bool]
rnet/blocking.py CHANGED
@@ -77,6 +77,17 @@ class Response:
77
77
  Get the DER encoded leaf certificate of the response.
78
78
  """
79
79
 
80
+ def raise_for_status(self) -> None:
81
+ r"""
82
+ Turn a response into an error if the server returned an error.
83
+ """
84
+
85
+ def stream(self) -> Streamer:
86
+ r"""
87
+ Get the response into a `Streamer` of `bytes` from the body.
88
+ """
89
+ ...
90
+
80
91
  def text(self) -> str:
81
92
  r"""
82
93
  Get the text content of the response.
@@ -100,12 +111,6 @@ class Response:
100
111
  """
101
112
  ...
102
113
 
103
- def stream(self) -> Streamer:
104
- r"""
105
- Get the response into a `Stream` of `Bytes` from the body.
106
- """
107
- ...
108
-
109
114
  def close(self) -> None:
110
115
  r"""
111
116
  Close the response connection.
rnet/exceptions.py CHANGED
@@ -28,6 +28,12 @@ __all__ = [
28
28
  # ========================================
29
29
 
30
30
 
31
+ class RustPanic(Exception):
32
+ r"""
33
+ A panic occurred in the underlying Rust code.
34
+ """
35
+
36
+
31
37
  class DNSResolverError(RuntimeError):
32
38
  r"""
33
39
  An error occurred while resolving a DNS name.
rnet/rnet.pyd CHANGED
Binary file
rnet/tls.py CHANGED
@@ -10,7 +10,7 @@ from enum import Enum, auto
10
10
  from pathlib import Path
11
11
  from typing import List
12
12
 
13
- __all__ = ["TlsVersion", "Identity", "CertStore", "KeyLogPolicy"]
13
+ __all__ = ["TlsVersion", "Identity", "CertStore", "KeyLog"]
14
14
 
15
15
 
16
16
  class TlsVersion(Enum):
@@ -111,7 +111,7 @@ class CertStore:
111
111
  ...
112
112
 
113
113
 
114
- class KeyLogPolicy:
114
+ class KeyLog:
115
115
  """
116
116
  Specifies the intent for a (TLS) keylogger to be used in a client or server configuration.
117
117
 
@@ -121,9 +121,9 @@ class KeyLogPolicy:
121
121
  with the correct session keys.
122
122
 
123
123
  Static Methods:
124
- environment() -> KeyLogPolicy
124
+ environment() -> KeyLog
125
125
  Use the SSLKEYLOGFILE environment variable for key logging.
126
- file(path: Path) -> KeyLogPolicy
126
+ file(path: Path) -> KeyLog
127
127
  Log keys to the specified file path.
128
128
 
129
129
  Methods:
@@ -134,14 +134,14 @@ class KeyLogPolicy:
134
134
  """
135
135
 
136
136
  @staticmethod
137
- def environment() -> "KeyLogPolicy":
137
+ def environment() -> "KeyLog":
138
138
  """
139
139
  Use the SSLKEYLOGFILE environment variable for key logging.
140
140
  """
141
141
  ...
142
142
 
143
143
  @staticmethod
144
- def file(path: Path) -> "KeyLogPolicy":
144
+ def file(path: Path) -> "KeyLog":
145
145
  """
146
146
  Log keys to the specified file path.
147
147
 
@@ -149,15 +149,3 @@ class KeyLogPolicy:
149
149
  path: The file path to log TLS keys to.
150
150
  """
151
151
  ...
152
-
153
- def is_environment(self) -> bool:
154
- """
155
- Returns True if this policy uses the environment variable.
156
- """
157
- ...
158
-
159
- def is_file(self) -> bool:
160
- """
161
- Returns True if this policy logs to a specific file.
162
- """
163
- ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rnet
3
- Version: 3.0.0rc5
3
+ Version: 3.0.0rc6
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -44,13 +44,12 @@ A blazing-fast Python HTTP client with advanced browser fingerprinting that accu
44
44
  - Plain bodies, JSON, urlencoded, multipart
45
45
  - Cookie Store
46
46
  - Redirect Policy
47
- - Original Header
47
+ - Original Headers
48
48
  - Rotating Proxies
49
+ - WebSocket Upgrade
49
50
  - Connection Pooling
50
51
  - Streaming Transfers
51
52
  - Zero-Copy Transfers
52
- - WebSocket Upgrade
53
- - Async DNS Resolver
54
53
  - HTTPS via BoringSSL
55
54
  - Free-Threaded Safety
56
55
  - Automatic Decompression
@@ -60,14 +59,14 @@ A blazing-fast Python HTTP client with advanced browser fingerprinting that accu
60
59
  The following example uses the `asyncio` runtime with `rnet` installed via pip:
61
60
 
62
61
  ```bash
63
- pip install asyncio rnet==3.0.0rc5
62
+ pip install asyncio rnet==3.0.0rc6
64
63
  ```
65
64
 
66
65
  And then the code:
67
66
 
68
67
  ```python
69
68
  import asyncio
70
- from rnet import Emulation, Client
69
+ from rnet import Client, Emulation
71
70
 
72
71
 
73
72
  async def main():
@@ -0,0 +1,14 @@
1
+ rnet-3.0.0rc6.dist-info/METADATA,sha256=rotnbIscis2R7zn-LfrR-dK92B8ikJEU2o9-mn14Kxo,10305
2
+ rnet-3.0.0rc6.dist-info/WHEEL,sha256=860eeFsMw4O2kbT6KMesEvy2mk35xuzbuSMVrgrvIME,95
3
+ rnet-3.0.0rc6.dist-info/licenses/LICENSE,sha256=OgFMgRC_5WSQ1t5oy1xTzIRPejYh83apCq2Hf6M74rw,11558
4
+ rnet/__init__.py,sha256=lZZNkVo5E9CfiY92HdvhOiakhLSREdq8hjurLSR3ZaA,321
5
+ rnet/__init__.pyi,sha256=Vv1W8PmGS6yONtiAY-2lAE22gyj0prAsw3wbbngU410,33950
6
+ rnet/blocking.py,sha256=SBG07JFKRVBKjLCsPwhQqguhYB8FR-5afZcVkXRnAeQ,9181
7
+ rnet/cookie.py,sha256=l0P_3CWQItvBF70egPTMVWXEP5GW0J3WPm0c66q4o1U,3163
8
+ rnet/emulation.py,sha256=aah7urtGIHouc4SqPbmZQ1FxqJZekeqa1MimOA-KsR0,5252
9
+ rnet/exceptions.py,sha256=FPWpnieeYJHb2z4o2LgFhMlaVJ7IJPgxf0JvM6O2Vqo,6175
10
+ rnet/header.py,sha256=vVLquV5IG8tivo_MbEzcZTV48vWIbSZjHgFGVj46flY,10068
11
+ rnet/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ rnet/rnet.pyd,sha256=EYzWrbOlsZzQYVZF9JeTKCr85ALS3OqUx_Aw4tSD6sA,7952896
13
+ rnet/tls.py,sha256=ubxulI3wtK1fEV2POHjm-8X9zMVaZQiWwgkwJQa3udw,4697
14
+ rnet-3.0.0rc6.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- rnet-3.0.0rc5.dist-info/METADATA,sha256=jP4VGtR_jp7DFPOdQpIvzUrl65QUXTig34VsU66wb9M,10326
2
- rnet-3.0.0rc5.dist-info/WHEEL,sha256=860eeFsMw4O2kbT6KMesEvy2mk35xuzbuSMVrgrvIME,95
3
- rnet-3.0.0rc5.dist-info/licenses/LICENSE,sha256=OgFMgRC_5WSQ1t5oy1xTzIRPejYh83apCq2Hf6M74rw,11558
4
- rnet/__init__.py,sha256=JPNS7ILBkwReCW_CquzHy2TD-cDauG-mGKhatIWOdPE,294
5
- rnet/__init__.pyi,sha256=dCDzGTQ51RXk2bAgYlHvBPa1cQjS16WvpuBUFGPuJjA,33818
6
- rnet/blocking.py,sha256=nRJ1C0NawHlPrQQkiZNarNa0tgMgjCD9Tw9tsEGysZs,9037
7
- rnet/cookie.py,sha256=l0P_3CWQItvBF70egPTMVWXEP5GW0J3WPm0c66q4o1U,3163
8
- rnet/emulation.py,sha256=aah7urtGIHouc4SqPbmZQ1FxqJZekeqa1MimOA-KsR0,5252
9
- rnet/exceptions.py,sha256=FSgQr-fHU_KY93ks6Y5rGF-nctDRQJCvwyBo_24qSR4,6072
10
- rnet/header.py,sha256=vVLquV5IG8tivo_MbEzcZTV48vWIbSZjHgFGVj46flY,10068
11
- rnet/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- rnet/rnet.pyd,sha256=rd2uKRsi2F07uDa0MhdBasZDIspDhu3f4y52JgqPqyQ,7991296
13
- rnet/tls.py,sha256=rm8q73tNPr-n26rFp8qDGYPP82tiqNfC7GMB9mDXpXQ,5016
14
- rnet-3.0.0rc5.dist-info/RECORD,,