python3-capsolver 1.2.0__py3-none-any.whl → 1.2.2__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.
@@ -1 +1 @@
1
- __version__ = "1.2.0"
1
+ __version__ = "1.2.2"
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
2
+
1
3
  import asyncio
2
4
  import logging
3
- from typing import Optional
5
+ from typing import TYPE_CHECKING
4
6
  from urllib import parse
5
7
 
6
8
  import aiohttp
@@ -11,6 +13,9 @@ from .utils import attempts_generator
11
13
  from .serializer import CaptchaResponseSer
12
14
  from .captcha_instrument import CaptchaInstrumentBase
13
15
 
16
+ if TYPE_CHECKING:
17
+ from .base import CaptchaParams
18
+
14
19
  __all__ = ("AIOCaptchaInstrument",)
15
20
 
16
21
 
@@ -19,7 +24,7 @@ class AIOCaptchaInstrument(CaptchaInstrumentBase):
19
24
  Instrument for working with async captcha
20
25
  """
21
26
 
22
- def __init__(self, captcha_params: "CaptchaParams"):
27
+ def __init__(self, captcha_params: CaptchaParams):
23
28
  super().__init__()
24
29
  self.captcha_params = captcha_params
25
30
  self.created_task_data = CaptchaResponseSer
@@ -99,7 +104,7 @@ class AIOCaptchaInstrument(CaptchaInstrumentBase):
99
104
 
100
105
  @staticmethod
101
106
  async def send_post_request(
102
- payload: Optional[dict] = None,
107
+ payload: dict | None = None,
103
108
  url_postfix: EndpointPostfixEnm = EndpointPostfixEnm.GET_BALANCE,
104
109
  ) -> dict:
105
110
  """
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
2
+
1
3
  import time
2
4
  import logging
3
- from typing import Optional
5
+ from typing import TYPE_CHECKING
4
6
  from urllib import parse
5
7
 
6
8
  import requests
@@ -12,6 +14,9 @@ from .utils import attempts_generator
12
14
  from .serializer import CaptchaResponseSer
13
15
  from .captcha_instrument import CaptchaInstrumentBase
14
16
 
17
+ if TYPE_CHECKING:
18
+ from .base import CaptchaParams
19
+
15
20
  __all__ = ("SIOCaptchaInstrument",)
16
21
 
17
22
 
@@ -20,7 +25,7 @@ class SIOCaptchaInstrument(CaptchaInstrumentBase):
20
25
  Instrument for working with sync captcha
21
26
  """
22
27
 
23
- def __init__(self, captcha_params: "CaptchaParams"):
28
+ def __init__(self, captcha_params: CaptchaParams):
24
29
  super().__init__()
25
30
  self.captcha_params = captcha_params
26
31
  self.created_task_data = CaptchaResponseSer
@@ -106,7 +111,7 @@ class SIOCaptchaInstrument(CaptchaInstrumentBase):
106
111
 
107
112
  @staticmethod
108
113
  def send_post_request(
109
- payload: Optional[dict] = None,
114
+ payload: dict | None = None,
110
115
  session: requests.Session = requests.Session(),
111
116
  url_postfix: EndpointPostfixEnm = EndpointPostfixEnm.GET_BALANCE,
112
117
  ) -> dict:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python3-capsolver
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Python 3.8+ Capsolver library with AIO module.
5
5
  Author-email: AndreiDrang <python-captcha@pm.me>
6
6
  License: MIT License
@@ -21,6 +21,8 @@ Classifier: Programming Language :: Python :: 3.9
21
21
  Classifier: Programming Language :: Python :: 3.10
22
22
  Classifier: Programming Language :: Python :: 3.11
23
23
  Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
24
26
  Classifier: Framework :: AsyncIO
25
27
  Classifier: Operating System :: Unix
26
28
  Classifier: Operating System :: Microsoft :: Windows
@@ -30,7 +32,7 @@ Description-Content-Type: text/markdown
30
32
  License-File: LICENSE
31
33
  Requires-Dist: requests>=2.21.0
32
34
  Requires-Dist: aiohttp>=3.9.2
33
- Requires-Dist: msgspec<=0.21,>=0.18
35
+ Requires-Dist: msgspec>=0.18
34
36
  Requires-Dist: tenacity<10,>=8
35
37
  Dynamic: license-file
36
38
 
@@ -62,6 +64,7 @@ Tested on UNIX based OS.
62
64
  The library is intended for software developers and is used to work with the [Capsolver](https://dashboard.capsolver.com/passport/register?inviteCode=kQTn-tG07Jb1) service API.
63
65
 
64
66
  ## Features
67
+ - **Modern Tooling**: Uses `uv` for fast, reliable dependency management and environment isolation.
65
68
  - **Sync & Async Support**: Full support for both synchronous (`requests`) and asynchronous (`aiohttp`) operations.
66
69
  - **Type Safety**: Enums for captcha types and response statuses.
67
70
  - **Resilience**: Built-in retries using `tenacity`.
@@ -70,9 +73,21 @@ The library is intended for software developers and is used to work with the [Ca
70
73
 
71
74
  ## How to install?
72
75
 
73
- We recommend using the latest version of Python. `python3-capsolver` supports Python 3.7+.
76
+ We recommend using the latest version of Python. `python3-capsolver` supports Python 3.8+.
74
77
 
75
- ### pip
78
+ ### Development (using uv)
79
+
80
+ This project uses [uv](https://github.com/astral-sh/uv) for fast, reliable dependency management.
81
+
82
+ ```bash
83
+ # Install uv (if not already installed)
84
+ curl -LsSf https://astral.sh/uv/install.sh | sh
85
+
86
+ # Install project dependencies
87
+ uv sync --all-groups
88
+ ```
89
+
90
+ ### Production (pip)
76
91
 
77
92
  ```bash
78
93
  pip install python3-capsolver
@@ -151,13 +166,28 @@ if __name__ == "__main__":
151
166
 
152
167
  ## How to test?
153
168
 
154
- 1. You need set ``API_KEY`` in your environment(get this value from you account).
155
- 2. Run command ``make tests``, from root directory.
169
+ The project uses `uv` for testing and development tasks.
170
+
171
+ ```bash
172
+ # 1. Set API_KEY in your environment (get this value from your account)
173
+ export API_KEY="your_api_key_here"
174
+
175
+ # 2. Run tests (uses uv internally)
176
+ make tests
177
+
178
+ # Other useful make targets:
179
+ # make install # Install dependencies with uv sync
180
+ # make lint # Run linting checks
181
+ # make build # Build the package
182
+ # make doc # Generate documentation
183
+ ```
184
+
185
+ All `make` commands automatically use `uv` to run commands in the isolated environment.
156
186
 
157
187
 
158
188
  ### Changelog
159
189
 
160
- Check [releases page](https://github.com/AndreiDrang/python3-capsolver/releases).
190
+ See [CHANGELOG.md](https://github.com/AndreiDrang/python3-capsolver/blob/main/CHANGELOG.md) for version history and detailed changes.
161
191
 
162
192
  ### How to get API Key to work with the library
163
193
  1. On the page - https://dashboard.capsolver.com/overview/user-center
@@ -1,5 +1,5 @@
1
1
  python3_capsolver/__init__.py,sha256=141uoiYvgRblIWZAy7AhQJz6iVqzY4b5cLxExIaKUlg,62
2
- python3_capsolver/__version__.py,sha256=MpAT5hgNoHnTtG1XRD_GV_A7QrHVU6vJjGSw_8qMGA4,22
2
+ python3_capsolver/__version__.py,sha256=uuf4VNtTNA93fMhoAur9YafzaKJFnczY-H1SSCSuRVQ,22
3
3
  python3_capsolver/aws_waf.py,sha256=wwNjW2bkS-EdxEkTDxW9zwUGCnW_bbEhtruSgw_R94I,5677
4
4
  python3_capsolver/cloudflare.py,sha256=SCuC4femAkNWY9taGELuGiGI8mDI5N2ziWAewNhAQrI,5367
5
5
  python3_capsolver/control.py,sha256=TEhH2xGpJVX5QSiH3senhqoASnuJlDiFZfEZ1CLD1oA,16982
@@ -12,17 +12,17 @@ python3_capsolver/recaptcha.py,sha256=tiZPC_OGfhA30SH6lnqo2curVDLDwGwGLvx1zVn3gY
12
12
  python3_capsolver/vision_engine.py,sha256=h82S6NvRbQTQUPTsLKQ1xpGMzlqHXaDGRRtDOSa275Q,2918
13
13
  python3_capsolver/yandex.py,sha256=4NvopCD9pKVyUNLlQqj2Yra3n_YY0NG8Gqc5sVK9Yis,2770
14
14
  python3_capsolver/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- python3_capsolver/core/aio_captcha_instrument.py,sha256=9LYx51KodjbDUZ0pcNxlSEW5KCqHQAiPfhCwF2J0PYE,4811
15
+ python3_capsolver/core/aio_captcha_instrument.py,sha256=KYcGO8lhim-Gd1F0WVE2VPHAT8H9FpdFbYpO0em2e9k,4902
16
16
  python3_capsolver/core/base.py,sha256=WScd52oKm28EE-yxOibYwlJRlaZH_q5sFzs8ynQwau0,3110
17
17
  python3_capsolver/core/captcha_instrument.py,sha256=Lg2fe0mpIre6z5Mb1LDvjHmbi-16BJ5zDS3_sJbMvXE,9262
18
18
  python3_capsolver/core/const.py,sha256=AEU2IFQ6xbMRGdXzBNtZflxNFJ4VTshGx1skBtdrQ2w,613
19
19
  python3_capsolver/core/context_instr.py,sha256=x3JQNd1ydlNdhuGKX_5gc-5Duq2pZJME0fs2YMQyGv4,503
20
20
  python3_capsolver/core/enum.py,sha256=M4gfCzzkIMQ8JZd3qwFsA1iXW8cbfYFxJGTxiVvTUsE,2490
21
21
  python3_capsolver/core/serializer.py,sha256=048uf015XtPirdtdijDxpO8sg3xoDIFXucUwmHKLUMo,1363
22
- python3_capsolver/core/sio_captcha_instrument.py,sha256=LZlcftx_L8IjB0xhH2dFdbd7No_l8ZDSS9aX02feWn8,4681
22
+ python3_capsolver/core/sio_captcha_instrument.py,sha256=KEvOcwS7WygyQRPhaU6A_FITNrgOguxjFbiyikT-EIE,4772
23
23
  python3_capsolver/core/utils.py,sha256=5PMxryy22MIUmUXPIHqz38vg2C2bqa7uXHUNYRF8DlY,633
24
- python3_capsolver-1.2.0.dist-info/licenses/LICENSE,sha256=N_utAsqhTp1pXXp-PTE-CFMg5BfIIqTbF-phwwzOHeQ,1063
25
- python3_capsolver-1.2.0.dist-info/METADATA,sha256=7OfV6UwZU3MV3FQBKryNWmu5TAUqpPvg3Pli9_1piZM,7573
26
- python3_capsolver-1.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- python3_capsolver-1.2.0.dist-info/top_level.txt,sha256=yws7CqjoBfrn2ebCkAQmEaVlZ-zhbtflqpCDwAEX4kI,18
28
- python3_capsolver-1.2.0.dist-info/RECORD,,
24
+ python3_capsolver-1.2.2.dist-info/licenses/LICENSE,sha256=N_utAsqhTp1pXXp-PTE-CFMg5BfIIqTbF-phwwzOHeQ,1063
25
+ python3_capsolver-1.2.2.dist-info/METADATA,sha256=vtgyzOJHB1INZPP6NXdNQDHxH0EQi4bSz1-r6lqWYUw,8502
26
+ python3_capsolver-1.2.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
27
+ python3_capsolver-1.2.2.dist-info/top_level.txt,sha256=yws7CqjoBfrn2ebCkAQmEaVlZ-zhbtflqpCDwAEX4kI,18
28
+ python3_capsolver-1.2.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5