Im2 Python SDK (Upgraded): Clean client with auth, error handling, supports file/url/bytes/base64, includes examples and CLI, easy installation.
Project description
OCR.Space Python SDK (Upgraded)
Mô tả
SDK nâng cấp cho Im2 info:
- Client sạch với xác thực, xử lý lỗi
- Hỗ trợ input: file, url, bytes, base64
- Có ví dụ và CLI đơn giản
- Cài đặt dễ dàng:
pip install -e .
Hướng dẫn sử dụng
1. Cài đặt package
Nếu đã upload lên PyPI:
pip install img2info==0.2.1
Hoặc cài từ source:
pip install -e .
2. Cài đặt dependencies
pip install requests
3. Thiết lập API key
Windows CMD:
set OCRSPACE_API_KEY=your_key
PowerShell:
$env:OCRSPACE_API_KEY="your_key"
Linux/macOS:
export OCRSPACE_API_KEY=your_key
4. Sử dụng trong code Python
from img2info import OCRSpaceClient
client = OCRSpaceClient(api_key="your_key")
result = client.from_file("invoice.png")
print(result.text)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
img2_info-0.2.3.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file img2_info-0.2.3.tar.gz.
File metadata
- Download URL: img2_info-0.2.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
125dfcc0afc88eb8d05270a9427b1ebc6bb762bbc5a52b77a8289680f7d90de8
|
|
| MD5 |
c360c18da208b1af5d6817cad197082b
|
|
| BLAKE2b-256 |
5c5f532016d936ee10fcb2bba52bb5be757b326dc3ab5464ac5e4529beed917f
|
File details
Details for the file img2_info-0.2.3-py3-none-any.whl.
File metadata
- Download URL: img2_info-0.2.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46cecb25ea5894b5491683a3e01250454675ca3c0fb28cd33771f1e673146b9b
|
|
| MD5 |
188abbbf2f675f710e6cdb78fa0afaf9
|
|
| BLAKE2b-256 |
4a2ed60952515e271fa25361cf893da0115c0ea3a0a0be23e6a37ef540244609
|