structocr 1.1.3__tar.gz → 1.1.5__tar.gz

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,7 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: structocr
3
- Version: 1.1.3
4
- Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, and Invoice.
3
+ Version: 1.1.5
4
+ Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, Invoice, VIN and Container OCR.
5
5
  Home-page: https://structocr.com
6
6
  Author: StructOCR Team
7
7
  Author-email: support@structocr.com
@@ -15,6 +15,18 @@ Classifier: Operating System :: OS Independent
15
15
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
16
16
  Requires-Python: >=3.6
17
17
  Description-Content-Type: text/markdown
18
+ Requires-Dist: requests>=2.25.0
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: project-url
26
+ Dynamic: requires-dist
27
+ Dynamic: requires-python
28
+ Dynamic: summary
29
+
18
30
 
19
31
  # StructOCR Python SDK
20
32
 
@@ -23,7 +35,7 @@ Description-Content-Type: text/markdown
23
35
 
24
36
  **The official Python client for [StructOCR](https://structocr.com).**
25
37
 
26
- StructOCR is a powerful API tailored for developers to extract structured data from identity documents with high accuracy. This SDK helps you integrate **Passport OCR**, **National ID OCR**, **Driver License OCR** and **Invoice OCR** into your Python applications in minutes.
38
+ StructOCR is a powerful API tailored for developers to extract structured data from identity documents with high accuracy. This SDK helps you integrate **Passport OCR**, **National ID OCR**, **Driver License OCR**, **Invoice OCR**, **VIN OCR**, and **Container OCR** into your Python applications in minutes.
27
39
 
28
40
  👉 **[Get your Free API Key here](https://structocr.com)**
29
41
 
@@ -33,6 +45,8 @@ StructOCR is a powerful API tailored for developers to extract structured data f
33
45
  - **National ID OCR**: Support for ID cards with automatic field mapping.
34
46
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
35
47
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
48
+ - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
49
+ - **Container OCR**: Extract shipping container numbers accurately from images.
36
50
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
37
51
 
38
52
  ## Installation
@@ -41,7 +55,6 @@ Install the package via pip:
41
55
 
42
56
  ```bash
43
57
  pip install structocr
44
-
45
58
  ```
46
59
 
47
60
  ## Quick Start
@@ -53,7 +66,6 @@ from structocr import StructOCR
53
66
 
54
67
  # Initialize with your API Key
55
68
  client = StructOCR(api_key="sk_live_xxxxxxxx")
56
-
57
69
  ```
58
70
 
59
71
  ### 2. Scan a Passport (Passport OCR)
@@ -64,10 +76,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
64
76
 
65
77
  print(f"Name: {result['data']['name']}")
66
78
  print(f"Passport Number: {result['data']['document_number']}")
67
-
68
79
  ```
69
80
 
70
- ### 3. Scan a National ID or Driver License or Invoice
81
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
71
82
 
72
83
  ```python
73
84
  # National ID OCR
@@ -77,8 +88,13 @@ id_data = client.scan_national_id('./docs/id_card.png')
77
88
  license_data = client.scan_driver_license('./docs/license.jpg')
78
89
 
79
90
  # Invoice OCR
80
- license_data = client.scan_invoice('./docs/invoice.jpg')
91
+ invoice_data = client.scan_invoice('./docs/invoice.jpg')
92
+
93
+ # VIN OCR
94
+ vin_data = client.scan_vin('./docs/vin.jpg')
81
95
 
96
+ # Container OCR
97
+ container_data = client.scan_container('./docs/container.jpg')
82
98
  ```
83
99
 
84
100
  ## Documentation
@@ -92,4 +108,4 @@ For full API documentation, response examples, and error codes, please visit the
92
108
 
93
109
  ## License
94
110
 
95
- MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.cd
111
+ MIT License. See [LICENSE](https://opensource.org/licenses/MIT) for details.
@@ -1,3 +1,4 @@
1
+
1
2
  # StructOCR Python SDK
2
3
 
3
4
  [![PyPI version](https://badge.fury.io/py/structocr.svg)](https://badge.fury.io/py/structocr)
@@ -5,7 +6,7 @@
5
6
 
6
7
  **The official Python client for [StructOCR](https://structocr.com).**
7
8
 
8
- StructOCR is a powerful API tailored for developers to extract structured data from identity documents with high accuracy. This SDK helps you integrate **Passport OCR**, **National ID OCR**, **Driver License OCR** and **Invoice OCR** into your Python applications in minutes.
9
+ StructOCR is a powerful API tailored for developers to extract structured data from identity documents with high accuracy. This SDK helps you integrate **Passport OCR**, **National ID OCR**, **Driver License OCR**, **Invoice OCR**, **VIN OCR**, and **Container OCR** into your Python applications in minutes.
9
10
 
10
11
  👉 **[Get your Free API Key here](https://structocr.com)**
11
12
 
@@ -15,6 +16,8 @@ StructOCR is a powerful API tailored for developers to extract structured data f
15
16
  - **National ID OCR**: Support for ID cards with automatic field mapping.
16
17
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
17
18
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
19
+ - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
20
+ - **Container OCR**: Extract shipping container numbers accurately from images.
18
21
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
19
22
 
20
23
  ## Installation
@@ -23,7 +26,6 @@ Install the package via pip:
23
26
 
24
27
  ```bash
25
28
  pip install structocr
26
-
27
29
  ```
28
30
 
29
31
  ## Quick Start
@@ -35,7 +37,6 @@ from structocr import StructOCR
35
37
 
36
38
  # Initialize with your API Key
37
39
  client = StructOCR(api_key="sk_live_xxxxxxxx")
38
-
39
40
  ```
40
41
 
41
42
  ### 2. Scan a Passport (Passport OCR)
@@ -46,10 +47,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
46
47
 
47
48
  print(f"Name: {result['data']['name']}")
48
49
  print(f"Passport Number: {result['data']['document_number']}")
49
-
50
50
  ```
51
51
 
52
- ### 3. Scan a National ID or Driver License or Invoice
52
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
53
53
 
54
54
  ```python
55
55
  # National ID OCR
@@ -59,8 +59,13 @@ id_data = client.scan_national_id('./docs/id_card.png')
59
59
  license_data = client.scan_driver_license('./docs/license.jpg')
60
60
 
61
61
  # Invoice OCR
62
- license_data = client.scan_invoice('./docs/invoice.jpg')
62
+ invoice_data = client.scan_invoice('./docs/invoice.jpg')
63
+
64
+ # VIN OCR
65
+ vin_data = client.scan_vin('./docs/vin.jpg')
63
66
 
67
+ # Container OCR
68
+ container_data = client.scan_container('./docs/container.jpg')
64
69
  ```
65
70
 
66
71
  ## Documentation
@@ -74,4 +79,4 @@ For full API documentation, response examples, and error codes, please visit the
74
79
 
75
80
  ## License
76
81
 
77
- MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.cd
82
+ MIT License. See [LICENSE](https://opensource.org/licenses/MIT) for details.
@@ -2,8 +2,8 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="structocr",
5
- version="1.1.3",
6
- description="The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, and Invoice.",
5
+ version="1.1.5",
6
+ description="The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, Invoice, VIN and Container OCR.",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",
9
9
 
@@ -0,0 +1,5 @@
1
+ __version__ = "1.1.5"
2
+
3
+ from .client import StructOCR
4
+
5
+ __all__ = ['StructOCR']
@@ -21,7 +21,7 @@ class StructOCR:
21
21
  self.session.headers.update({
22
22
  "x-api-key": self.api_key,
23
23
  "Content-Type": "application/json",
24
- "User-Agent": "StructOCR-Python/1.0.0"
24
+ "User-Agent": "StructOCR-Python/1.1.5"
25
25
  })
26
26
 
27
27
  def _post_image(self, endpoint, file_path):
@@ -89,4 +89,22 @@ class StructOCR:
89
89
  Returns: Structured JSON data.
90
90
  """
91
91
  # Endpoint: /v1/invoice
92
- return self._post_image('invoice', file_path)
92
+ return self._post_image('invoice', file_path)
93
+
94
+ def scan_vin(self, file_path):
95
+ """
96
+ Scan a VIN (Vehicle Identification Number).
97
+ path: Path to the VIN image file.
98
+ Returns: Structured JSON data.
99
+ """
100
+ # Endpoint: /v1/vin
101
+ return self._post_image('vin', file_path)
102
+
103
+ def scan_container(self, file_path):
104
+ """
105
+ Scan a shipping container number (集装箱号).
106
+ path: Path to the container image file.
107
+ Returns: Structured JSON data.
108
+ """
109
+ # Endpoint: /v1/container (这里假设你的后端路由是 container,如果不同请替换)
110
+ return self._post_image('container', file_path)
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: structocr
3
- Version: 1.1.3
4
- Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, and Invoice.
3
+ Version: 1.1.5
4
+ Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, Invoice, VIN and Container OCR.
5
5
  Home-page: https://structocr.com
6
6
  Author: StructOCR Team
7
7
  Author-email: support@structocr.com
@@ -15,6 +15,18 @@ Classifier: Operating System :: OS Independent
15
15
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
16
16
  Requires-Python: >=3.6
17
17
  Description-Content-Type: text/markdown
18
+ Requires-Dist: requests>=2.25.0
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: project-url
26
+ Dynamic: requires-dist
27
+ Dynamic: requires-python
28
+ Dynamic: summary
29
+
18
30
 
19
31
  # StructOCR Python SDK
20
32
 
@@ -23,7 +35,7 @@ Description-Content-Type: text/markdown
23
35
 
24
36
  **The official Python client for [StructOCR](https://structocr.com).**
25
37
 
26
- StructOCR is a powerful API tailored for developers to extract structured data from identity documents with high accuracy. This SDK helps you integrate **Passport OCR**, **National ID OCR**, **Driver License OCR** and **Invoice OCR** into your Python applications in minutes.
38
+ StructOCR is a powerful API tailored for developers to extract structured data from identity documents with high accuracy. This SDK helps you integrate **Passport OCR**, **National ID OCR**, **Driver License OCR**, **Invoice OCR**, **VIN OCR**, and **Container OCR** into your Python applications in minutes.
27
39
 
28
40
  👉 **[Get your Free API Key here](https://structocr.com)**
29
41
 
@@ -33,6 +45,8 @@ StructOCR is a powerful API tailored for developers to extract structured data f
33
45
  - **National ID OCR**: Support for ID cards with automatic field mapping.
34
46
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
35
47
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
48
+ - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
49
+ - **Container OCR**: Extract shipping container numbers accurately from images.
36
50
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
37
51
 
38
52
  ## Installation
@@ -41,7 +55,6 @@ Install the package via pip:
41
55
 
42
56
  ```bash
43
57
  pip install structocr
44
-
45
58
  ```
46
59
 
47
60
  ## Quick Start
@@ -53,7 +66,6 @@ from structocr import StructOCR
53
66
 
54
67
  # Initialize with your API Key
55
68
  client = StructOCR(api_key="sk_live_xxxxxxxx")
56
-
57
69
  ```
58
70
 
59
71
  ### 2. Scan a Passport (Passport OCR)
@@ -64,10 +76,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
64
76
 
65
77
  print(f"Name: {result['data']['name']}")
66
78
  print(f"Passport Number: {result['data']['document_number']}")
67
-
68
79
  ```
69
80
 
70
- ### 3. Scan a National ID or Driver License or Invoice
81
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
71
82
 
72
83
  ```python
73
84
  # National ID OCR
@@ -77,8 +88,13 @@ id_data = client.scan_national_id('./docs/id_card.png')
77
88
  license_data = client.scan_driver_license('./docs/license.jpg')
78
89
 
79
90
  # Invoice OCR
80
- license_data = client.scan_invoice('./docs/invoice.jpg')
91
+ invoice_data = client.scan_invoice('./docs/invoice.jpg')
92
+
93
+ # VIN OCR
94
+ vin_data = client.scan_vin('./docs/vin.jpg')
81
95
 
96
+ # Container OCR
97
+ container_data = client.scan_container('./docs/container.jpg')
82
98
  ```
83
99
 
84
100
  ## Documentation
@@ -92,4 +108,4 @@ For full API documentation, response examples, and error codes, please visit the
92
108
 
93
109
  ## License
94
110
 
95
- MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.cd
111
+ MIT License. See [LICENSE](https://opensource.org/licenses/MIT) for details.
@@ -1,3 +0,0 @@
1
- from .client import StructOCR
2
-
3
- __all__ = ['StructOCR']
File without changes