Metadata-Version: 2.1
Name: captcha_solve_adapter
Version: 1.0
Author: IMCorp
Author-email: imartemy1524@gmail.com
License: MIT
Keywords: solver,captcha,adapter,solve,AI,onnx
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Description-Content-Type: text/markdown

<h1 align="center">
- AI captcha solver adapter
</h1>

## Requirements
> Python3.3 - python3.10

~~Python 3.10 is not supported yet because 
[onnxruntime](https://pypi.org/project/onnxruntime/) 
is not supporting **python3.10**~~

#### UPDATE: Python3.10 is supported

## Installation

```
pip install captcha-solve-adapter   
```

```python
from captcha_solve_adapter import CaptchaSolver

solver = CaptchaSolver(
    logging=False, # if need to print the log
    img_width=300, # img_width
    img_height=40, # img height
    max_length=10, # max captcha length
    characters=['a','b','c','d'], # captcha characters used in training model
    model_fname='Path/to/the/model.onnx'    
)  # this login will create captcha
def solve_captcha(url: str):
    result, accur = solver.solve(url=url)
    return accur
def solve_from_bytes(b: bytes):
    result, accur = solver.solve(bytes_data=b)
    return accur
def solve_frmo_file(file: str):
    with open(file, 'rb') as f:
        b = f.read()
    return solve_from_bytes(b)
```
