rnet 2.4.2__cp313-cp313t-musllinux_1_2_i686.whl → 3.0.0rc10__cp313-cp313t-musllinux_1_2_i686.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/exceptions.pyi DELETED
@@ -1,64 +0,0 @@
1
- class DNSResolverError(RuntimeError):
2
- r"""
3
- An error occurred while resolving a DNS name.
4
- """
5
-
6
- class BodyError(Exception):
7
- r"""
8
- An error occurred while processing the body of a request or response.
9
- """
10
-
11
- class BuilderError(Exception):
12
- r"""
13
- An error occurred while building a request or response.
14
- """
15
-
16
- class ConnectionError(Exception):
17
- r"""
18
- An error occurred while establishing a connection.
19
- """
20
-
21
- class ConnectionResetError(Exception):
22
- r"""
23
- The connection was reset.
24
- """
25
-
26
- class DecodingError(Exception):
27
- r"""
28
- An error occurred while decoding a response.
29
- """
30
-
31
- class RedirectError(Exception):
32
- r"""
33
- An error occurred while following a redirect.
34
- """
35
-
36
- class TimeoutError(Exception):
37
- r"""
38
- A timeout occurred while waiting for a response.
39
- """
40
-
41
- class StatusError(Exception):
42
- r"""
43
- An error occurred while processing the status code of a response.
44
- """
45
-
46
- class RequestError(Exception):
47
- r"""
48
- An error occurred while making a request.
49
- """
50
-
51
- class UpgradeError(Exception):
52
- r"""
53
- An error occurred while upgrading a connection.
54
- """
55
-
56
- class URLParseError(Exception):
57
- r"""
58
- An error occurred while parsing a URL.
59
- """
60
-
61
- class MIMEParseError(Exception):
62
- r"""
63
- An error occurred while parsing a MIME type.
64
- """
rnet/header.pyi DELETED
@@ -1,103 +0,0 @@
1
- from typing import Optional, Tuple
2
-
3
- class HeaderMap:
4
- r"""
5
- A HTTP header map.
6
- """
7
-
8
- def __getitem__(self, key: str) -> Optional[bytes]: ...
9
- def __setitem__(self, key: str, value: str) -> None: ...
10
- def __delitem__(self, key: str) -> None: ...
11
- def __contains__(self, key: str) -> bool: ...
12
- def __len__(self) -> int: ...
13
- def __iter__(self) -> HeaderMapKeysIter: ...
14
- def __str__(self) -> str: ...
15
- def __repr__(self) -> str: ...
16
- def __new__(
17
- cls, init: Optional[dict] = None, capacity: Optional[int] = None
18
- ) -> HeaderMap: ...
19
- def contains_key(self, key: str) -> bool:
20
- r"""
21
- Returns true if the header map contains the given key.
22
- """
23
-
24
- def insert(self, key: str, value: str) -> None:
25
- r"""
26
- Insert a key-value pair into the header map.
27
- """
28
-
29
- def append(self, key: str, value: str) -> None:
30
- r"""
31
- Append a key-value pair to the header map.
32
- """
33
-
34
- def remove(self, key: str) -> None:
35
- r"""
36
- Remove a key-value pair from the header map.
37
- """
38
-
39
- def get(self, key: str, default: Optional[bytes] = None) -> Optional[bytes]:
40
- r"""
41
- Returns a reference to the value associated with the key.
42
-
43
- If there are multiple values associated with the key, then the first one
44
- is returned. Use `get_all` to get all values associated with a given
45
- key. Returns `None` if there are no values associated with the key.
46
- """
47
-
48
- def get_all(self, key: str) -> HeaderMapValuesIter:
49
- r"""
50
- Returns a view of all values associated with a key.
51
- """
52
-
53
- def len(self) -> int:
54
- """
55
- Returns the number of values stored in the map.
56
- This number can be greater than or equal to the number of keys.
57
- """
58
-
59
- def keys_len(self) -> int:
60
- """
61
- Returns the number of unique keys stored in the map.
62
- """
63
-
64
- def is_empty(self) -> bool:
65
- """
66
- Returns True if the map contains no elements.
67
- """
68
-
69
- def clear(self) -> None:
70
- """
71
- Clears the map, removing all key-value pairs.
72
- """
73
-
74
- def items(self) -> HeaderMapItemsIter:
75
- r"""
76
- Returns key-value pairs in the order they were added.
77
- """
78
-
79
- class HeaderMapItemsIter:
80
- r"""
81
- An iterator over the items in a HeaderMap.
82
- """
83
-
84
- def __iter__(self) -> HeaderMapItemsIter: ...
85
- def __next__(
86
- self,
87
- ) -> Optional[Tuple[bytes, Optional[bytes]]]: ...
88
-
89
- class HeaderMapKeysIter:
90
- r"""
91
- An iterator over the keys in a HeaderMap.
92
- """
93
-
94
- def __iter__(self) -> HeaderMapKeysIter: ...
95
- def __next__(self) -> Optional[bytes]: ...
96
-
97
- class HeaderMapValuesIter:
98
- r"""
99
- An iterator over the values in a HeaderMap.
100
- """
101
-
102
- def __iter__(self) -> HeaderMapValuesIter: ...
103
- def __next__(self) -> Optional[bytes]: ...
rnet/impersonate.py DELETED
@@ -1 +0,0 @@
1
- # type: ignore
rnet/impersonate.pyi DELETED
@@ -1,147 +0,0 @@
1
- from enum import Enum, auto
2
- from typing import Optional
3
-
4
- class Impersonate(Enum):
5
- r"""
6
- An impersonate.
7
- """
8
-
9
- Chrome100 = auto()
10
- Chrome101 = auto()
11
- Chrome104 = auto()
12
- Chrome105 = auto()
13
- Chrome106 = auto()
14
- Chrome107 = auto()
15
- Chrome108 = auto()
16
- Chrome109 = auto()
17
- Chrome110 = auto()
18
- Chrome114 = auto()
19
- Chrome116 = auto()
20
- Chrome117 = auto()
21
- Chrome118 = auto()
22
- Chrome119 = auto()
23
- Chrome120 = auto()
24
- Chrome123 = auto()
25
- Chrome124 = auto()
26
- Chrome126 = auto()
27
- Chrome127 = auto()
28
- Chrome128 = auto()
29
- Chrome129 = auto()
30
- Chrome130 = auto()
31
- Chrome131 = auto()
32
- Chrome132 = auto()
33
- Chrome133 = auto()
34
- Chrome134 = auto()
35
- Chrome135 = auto()
36
- Chrome136 = auto()
37
- Chrome137 = auto()
38
- Edge101 = auto()
39
- Edge122 = auto()
40
- Edge127 = auto()
41
- Edge131 = auto()
42
- Edge134 = auto()
43
- Firefox109 = auto()
44
- Firefox117 = auto()
45
- Firefox128 = auto()
46
- Firefox133 = auto()
47
- Firefox135 = auto()
48
- FirefoxPrivate135 = auto()
49
- FirefoxAndroid135 = auto()
50
- Firefox136 = auto()
51
- FirefoxPrivate136 = auto()
52
- Firefox139 = auto()
53
- SafariIos17_2 = auto()
54
- SafariIos17_4_1 = auto()
55
- SafariIos16_5 = auto()
56
- Safari15_3 = auto()
57
- Safari15_5 = auto()
58
- Safari15_6_1 = auto()
59
- Safari16 = auto()
60
- Safari16_5 = auto()
61
- Safari17_0 = auto()
62
- Safari17_2_1 = auto()
63
- Safari17_4_1 = auto()
64
- Safari17_5 = auto()
65
- Safari18 = auto()
66
- SafariIPad18 = auto()
67
- Safari18_2 = auto()
68
- Safari18_3 = auto()
69
- Safari18_3_1 = auto()
70
- SafariIos18_1_1 = auto()
71
- Safari18_5 = auto()
72
- OkHttp3_9 = auto()
73
- OkHttp3_11 = auto()
74
- OkHttp3_13 = auto()
75
- OkHttp3_14 = auto()
76
- OkHttp4_9 = auto()
77
- OkHttp4_10 = auto()
78
- OkHttp4_12 = auto()
79
- OkHttp5 = auto()
80
- Opera116 = auto()
81
- Opera117 = auto()
82
- Opera118 = auto()
83
- Opera119 = auto()
84
-
85
- class ImpersonateOS(Enum):
86
- r"""
87
- An impersonate operating system.
88
- """
89
-
90
- Windows = auto()
91
- MacOS = auto()
92
- Linux = auto()
93
- Android = auto()
94
- IOS = auto()
95
-
96
- class ImpersonateOption:
97
- r"""
98
- A struct to represent the `ImpersonateOption` class.
99
- """
100
-
101
- def __new__(
102
- cls,
103
- impersonate: Impersonate,
104
- impersonate_os: Optional[ImpersonateOS] = None,
105
- skip_http2: Optional[bool] = None,
106
- skip_headers: Optional[bool] = None,
107
- ) -> ImpersonateOption:
108
- r"""
109
- Create a new impersonation option instance.
110
-
111
- This class allows you to configure browser/client impersonation settings
112
- including the browser type, operating system, and HTTP protocol options.
113
-
114
- Args:
115
- impersonate (Impersonate): The browser/client type to impersonate
116
- impersonate_os (Optional[ImpersonateOS]): The operating system to impersonate, defaults to None
117
- skip_http2 (Optional[bool]): Whether to disable HTTP/2 support, defaults to False
118
- skip_headers (Optional[bool]): Whether to skip default request headers, defaults to False
119
-
120
- Returns:
121
- ImpersonateOption: A new impersonation option instance
122
-
123
- Examples:
124
- ```python
125
- from rnet import ImpersonateOption, Impersonate, ImpersonateOS
126
-
127
- # Basic Chrome 120 impersonation
128
- option = ImpersonateOption(Impersonate.Chrome120)
129
-
130
- # Firefox 136 on Windows with custom options
131
- option = ImpersonateOption(
132
- impersonate=Impersonate.Firefox136,
133
- impersonate_os=ImpersonateOS.Windows,
134
- skip_http2=False,
135
- skip_headers=True
136
- )
137
- ```
138
- """
139
-
140
- @staticmethod
141
- def random() -> ImpersonateOption:
142
- r"""
143
- Creates a new random impersonation option instance.
144
-
145
- This method generates a random browser/client impersonation option
146
- with random settings for browser type and operating system options.
147
- """
@@ -1,186 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: rnet
3
- Version: 2.4.2
4
- Classifier: Programming Language :: Rust
5
- Classifier: Programming Language :: Python :: Implementation :: CPython
6
- Classifier: Programming Language :: Python :: Implementation :: PyPy
7
- Classifier: Programming Language :: Python :: 3.7
8
- Classifier: Programming Language :: Python :: 3.8
9
- Classifier: Programming Language :: Python :: 3.9
10
- Classifier: Programming Language :: Python :: 3.10
11
- Classifier: Programming Language :: Python :: 3.11
12
- Classifier: Programming Language :: Python :: 3.12
13
- Classifier: Programming Language :: Python :: 3.13
14
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
- Classifier: Development Status :: 5 - Production/Stable
16
- Classifier: Intended Audience :: Developers
17
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
- Classifier: Operating System :: Microsoft :: Windows
19
- Classifier: Operating System :: POSIX
20
- Classifier: Operating System :: Unix
21
- Classifier: Operating System :: MacOS
22
- License-File: LICENSE
23
- Summary: A blazing-fast Python HTTP client with TLS fingerprint
24
- Keywords: http,client,websocket,ja3,ja4
25
- Author-email: 0x676e67 <gngppz@gmail.com>
26
- License: GPL-3.0
27
- Requires-Python: >=3.7
28
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
29
- Project-URL: Documentation, https://github.com/0x676e67/rnet/blob/main/rnet.pyi
30
- Project-URL: Homepage, https://github.com/0x676e67/rnet
31
- Project-URL: Repository, https://github.com/0x676e67/rnet
32
-
33
- # rnet
34
-
35
- [![CI](https://github.com/0x676e67/rnet/actions/workflows/ci.yml/badge.svg)](https://github.com/0x676e67/rnet/actions/workflows/ci.yml)
36
- [![PyPI - License](https://img.shields.io/pypi/l/rnet)](https://github.com/0x676e67/rnet/blob/main/LICENSE)
37
- ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2F0x676e67%2Frnet%2Fmain%2Fpyproject.toml&logo=python)
38
- [![PyPI](https://img.shields.io/pypi/v/rnet?logo=python)](https://pypi.org/project/rnet/)
39
- [![PyPI Downloads](https://static.pepy.tech/badge/rnet)](https://pepy.tech/projects/rnet)
40
-
41
- > 🚀 Help me work seamlessly with open source sharing by [sponsoring me on GitHub](https://github.com/0x676e67/0x676e67/blob/main/SPONSOR.md)
42
-
43
- A blazing-fast Python HTTP client with advanced browser fingerprinting that accurately emulates **Chrome**, **Firefox**, **Safari**, **Opera**, and **OkHttp**, with precise **TLS/HTTP2** signatures, and powered by [wreq](https://github.com/0x676e67/wreq) for high performance, outperforming `requests`, `httpx`, and `curl_cffi` (see [benchmark](https://github.com/0x676e67/rnet/tree/main/benchmark)).
44
-
45
- ## Features
46
-
47
- - Async and Blocking `Client`s
48
- - Plain bodies, JSON, urlencoded, multipart
49
- - Cookie Store
50
- - Header Order
51
- - Redirect Policy
52
- - Rotating Proxies
53
- - Connection Pooling
54
- - Streaming Transfers
55
- - Zero-Copy Transfers
56
- - WebSocket Upgrade
57
- - Async DNS Resolver
58
- - HTTPS via BoringSSL
59
- - Free-Threaded Safety
60
- - Automatic Decompression
61
-
62
- ## Example
63
-
64
- This asynchronous example demonstrates how to make a simple GET request using the `rnet` library. So you need install `rnet` and run the following code:
65
-
66
- ```bash
67
- pip install asyncio rnet
68
- ```
69
-
70
- And then the code:
71
-
72
- ```python
73
- import asyncio
74
- from rnet import Impersonate, Client
75
-
76
-
77
- async def main():
78
- # Build a client
79
- client = Client(impersonate=Impersonate.Firefox139)
80
-
81
- # Use the API you're already familiar with
82
- resp = await client.get("https://tls.peet.ws/api/all")
83
-
84
- # Print the response
85
- print(await resp.text())
86
-
87
-
88
- if __name__ == "__main__":
89
- asyncio.run(main())
90
-
91
- ```
92
-
93
- Additional learning resources include:
94
-
95
- - [DeepWiki](https://deepwiki.com/0x676e67/rnet)
96
- - [API Documentation](https://github.com/0x676e67/rnet/blob/main/python/rnet)
97
- - [Repository Tests](https://github.com/0x676e67/rnet/tree/main/tests)
98
- - [Repository Examples](https://github.com/0x676e67/rnet/tree/main/python/examples)
99
-
100
- ## Platforms
101
-
102
- 1. Linux
103
-
104
- - **glibc >= 2.34**: `x86_64`, `aarch64`, `armv7`, `i686`
105
- - **musl**: `x86_64`, `aarch64`, `armv7`, `i686`
106
-
107
- 2. macOS: `x86_64`,`aarch64`
108
-
109
- 3. Windows: `x86_64`,`i686`,`aarch64`
110
-
111
- ## Building
112
-
113
- 1. Install environment
114
-
115
- ```bash
116
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
117
- pip install maturin
118
- pip install uv
119
-
120
- uv venv
121
- source .venv/bin/activate
122
- ```
123
-
124
- 2. Development
125
-
126
- ```bash
127
- maturin develop --uv
128
- python3 examples/client.py
129
- ```
130
-
131
- 3. Compile wheels
132
-
133
- - Local Compilation
134
-
135
- Install the BoringSSL build environment by referring to [boring](https://github.com/cloudflare/boring/blob/master/.github/workflows/ci.yml) and [boringssl](https://github.com/google/boringssl/blob/master/BUILDING.md#build-prerequisites).
136
-
137
- ```bash
138
- maturin build --release
139
- ```
140
-
141
- - Musllinux
142
-
143
- Make sure the Docker environment is installed. The provided image may be outdated, so you might need to build it yourself. Refer to [rust-cross-musl](https://github.com/0x676e67/toolchain/blob/master/rust-musl-cross/Dockerfile) and the upstream [rust-cross/rust-musl-cross](https://github.com/rust-cross/rust-musl-cross). Note that the upstream image lacks certain platform-specific linker environment variables, which you’ll need to add manually.
144
-
145
- ```bash
146
- bash .github/musl_build.sh x86_64-unknown-linux-musl
147
- bash .github/musl_build.sh aarch64-unknown-linux-musl
148
- bash .github/musl_build.sh armv7-unknown-linux-musleabihf
149
- bash .github/musl_build.sh i686-unknown-linux-musl
150
- ```
151
-
152
- - Manylinux
153
-
154
- For Manylinux compilation, refer to [manylinux](https://github.com/PyO3/maturin?tab=readme-ov-file#manylinux-and-auditwheel).
155
-
156
- ## Impersonate
157
-
158
- In fact, most device models share the same `TLS`/`HTTP2` configuration, with the main difference being the `User-Agent`.
159
-
160
- | **Browser** | **Versions** |
161
- |---------------|--------------------------------------------------------------------------------------------------|
162
- | **Chrome** | `Chrome100`, `Chrome101`, `Chrome104`, `Chrome105`, `Chrome106`, `Chrome107`, `Chrome108`, `Chrome109`, `Chrome110`, `Chrome114`, `Chrome116`, `Chrome117`, `Chrome118`, `Chrome119`, `Chrome120`, `Chrome123`, `Chrome124`, `Chrome126`, `Chrome127`, `Chrome128`, `Chrome129`, `Chrome130`, `Chrome131`, `Chrome132`, `Chrome133`, `Chrome134`, `Chrome135`, `Chrome136`, `Chrome137`|
163
- | **Safari** | `SafariIos17_2`, `SafariIos17_4_1`, `SafariIos16_5`, `Safari15_3`, `Safari15_5`, `Safari15_6_1`, `Safari16`, `Safari16_5`, `Safari17_0`, `Safari17_2_1`, `Safari17_4_1`, `Safari17_5`, `Safari18`, `SafariIPad18`, `Safari18_2`, `SafariIos18_1_1`, `Safari18_3`, `Safari18_3_1`, `Safari18_5` |
164
- | **Firefox** | `Firefox109`, `Firefox117`, `Firefox128`, `Firefox133`, `Firefox135`, `FirefoxPrivate135`, `FirefoxAndroid135`, `Firefox136`, `FirefoxPrivate136`, `Firefox139`|
165
- | **OkHttp** | `OkHttp3_9`, `OkHttp3_11`, `OkHttp3_13`, `OkHttp3_14`, `OkHttp4_9`, `OkHttp4_10`, `OkHttp4_12`, `OkHttp5` |
166
- | **Edge** | `Edge101`, `Edge122`, `Edge127`, `Edge131`, `Edge134` |
167
- | **Opera** | `Opera116`, `Opera117`, `Opera118`, `Opera119` |
168
-
169
- ## Documentation
170
-
171
- For a comprehensive introduction to this library, refer to the [DeepWiki](https://deepwiki.com/0x676e67/rnet) documentation. This AI-generated guide, created by a third party, offers a solid overview and allows interaction with the AI to explore specific APIs.
172
-
173
- ## Contributing
174
-
175
- If you would like to submit your contribution, please open a [Pull Request](https://github.com/0x676e67/rnet/pulls).
176
-
177
- ## Sponsors
178
-
179
- <a href="https://dashboard.capsolver.com/passport/register?inviteCode=y7CtB_a-3X6d" target="_blank"><img src="https://raw.githubusercontent.com/0x676e67/rnet/main/.github/assets/capsolver.jpg" height="47" width="149"></a>
180
-
181
- [CapSolver](https://www.capsolver.com/?utm_source=github&utm_medium=banner_repo&utm_campaign=rnet) leverages AI-powered Auto Web Unblock to bypass Captchas effortlessly, providing fast, reliable, and cost-effective data access with seamless integration into Colly, Puppeteer, and Playwright—use code **`RNET`** for a 6% bonus!
182
-
183
- ## License
184
-
185
- **rnet** © [0x676e67](https://github.com/0x676e67), Released under the [GPL-3.0](https://github.com/0x676e67/rnet/blob/main/LICENSE) License.
186
-
@@ -1,19 +0,0 @@
1
- rnet-2.4.2.dist-info/METADATA,sha256=S89KxNfYlG7B9sRcRVDG7nfEDHugx26cUtMDAHsBroM,8306
2
- rnet-2.4.2.dist-info/WHEEL,sha256=3vd6JCJYQOoHM6wrIJ_UePOKFab_x8U17gZ0TAoKw-U,106
3
- rnet-2.4.2.dist-info/licenses/LICENSE,sha256=ryRV02Zq6zAIr1heqDUkcGlpP7gVCDF6AqR4wRa82kI,35153
4
- rnet.libs/libgcc_s-a3dd717e.so.1,sha256=xVhnZXVeZWq9ZSPexxYOZ-oXxtOSKhaeDv6R58MzQSg,453841
5
- rnet/__init__.py,sha256=lhI2OJ7jXT98IHzhStJumoHAW4eCfROYiRkW1FycxCY,292
6
- rnet/__init__.pyi,sha256=81wvUDx0zqydo7zx06BhFVkYQPT06-AO1b1Q7nMfyDg,32583
7
- rnet/blocking.py,sha256=ND4qNqtA7PAI6AroCi31S1_JEcwx2GOF0ThevQhbJPw,15
8
- rnet/blocking.pyi,sha256=m7g0RCuuoM44X4ChtjkT9ilTrXB0ttlS8WFy7QeSGq4,16362
9
- rnet/cookie.py,sha256=ND4qNqtA7PAI6AroCi31S1_JEcwx2GOF0ThevQhbJPw,15
10
- rnet/cookie.pyi,sha256=xwBIlfMTJH78_dBeqEh6fiwPuQnT5e8thVHu5n4qHe4,1622
11
- rnet/exceptions.py,sha256=ND4qNqtA7PAI6AroCi31S1_JEcwx2GOF0ThevQhbJPw,15
12
- rnet/exceptions.pyi,sha256=Ao4IIgfCpbHyve-NB3KgHOPIEv9tSNcWW5hrsKY1daw,1336
13
- rnet/header.py,sha256=ND4qNqtA7PAI6AroCi31S1_JEcwx2GOF0ThevQhbJPw,15
14
- rnet/header.pyi,sha256=qAp_-HXJEaTmpJf7-UdqMt5CEvFqBZkc3m-30hvbqlk,2895
15
- rnet/impersonate.py,sha256=ND4qNqtA7PAI6AroCi31S1_JEcwx2GOF0ThevQhbJPw,15
16
- rnet/impersonate.pyi,sha256=dMjfbiQfB9UaAKDQMQWC5lX5G-vQ1LMY9sZZfGkcZoU,3966
17
- rnet/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- rnet/rnet.cpython-313t-i386-linux-musl.so,sha256=SLw0-FkmuP0rhf6DAqmd9duNQ11_vU-RcXgKWv7jXjA,8327737
19
- rnet-2.4.2.dist-info/RECORD,,