structocr 1.1.4__tar.gz → 1.1.6__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.4
4
- Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, Invoice and VIN OCR.
3
+ Version: 1.1.6
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,17 @@ 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
18
29
 
19
30
  # StructOCR Python SDK
20
31
 
@@ -23,10 +34,22 @@ Description-Content-Type: text/markdown
23
34
 
24
35
  **The official Python client for [StructOCR](https://structocr.com).**
25
36
 
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**, **Invoice OCR** and **VIN OCR** into your Python applications in minutes.
37
+ 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
38
 
28
39
  👉 **[Get your Free API Key here](https://structocr.com)**
29
40
 
41
+ ---
42
+
43
+ ## 🚀 What's New in 1.1.6
44
+ We've massively expanded our logistics and finance capabilities! The SDK now natively supports:
45
+ * **Container OCR**: Accurately parse shipping container numbers from images.
46
+ * **VIN OCR**: Read Vehicle Identification Numbers from windshields or chassis.
47
+ * **Invoice OCR**: Automatically extract invoice numbers, currencies, merchants, and customers.
48
+
49
+ Check out the [Quick Start](#3-scan-a-national-id-driver-license-invoice-vin-or-container) below to see how easy it is to use them!
50
+
51
+ ---
52
+
30
53
  ## Features
31
54
 
32
55
  - **Passport OCR API**: Instantly extract MRZ, name, DOB, and expiry date from passports of 200+ countries.
@@ -34,6 +57,7 @@ StructOCR is a powerful API tailored for developers to extract structured data f
34
57
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
35
58
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
36
59
  - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
60
+ - **Container OCR**: Extract shipping container numbers accurately from images.
37
61
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
38
62
 
39
63
  ## Installation
@@ -42,7 +66,6 @@ Install the package via pip:
42
66
 
43
67
  ```bash
44
68
  pip install structocr
45
-
46
69
  ```
47
70
 
48
71
  ## Quick Start
@@ -54,7 +77,6 @@ from structocr import StructOCR
54
77
 
55
78
  # Initialize with your API Key
56
79
  client = StructOCR(api_key="sk_live_xxxxxxxx")
57
-
58
80
  ```
59
81
 
60
82
  ### 2. Scan a Passport (Passport OCR)
@@ -65,10 +87,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
65
87
 
66
88
  print(f"Name: {result['data']['name']}")
67
89
  print(f"Passport Number: {result['data']['document_number']}")
68
-
69
90
  ```
70
91
 
71
- ### 3. Scan a National ID, Driver License, Invoice or VIN
92
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
72
93
 
73
94
  ```python
74
95
  # National ID OCR
@@ -83,6 +104,8 @@ invoice_data = client.scan_invoice('./docs/invoice.jpg')
83
104
  # VIN OCR
84
105
  vin_data = client.scan_vin('./docs/vin.jpg')
85
106
 
107
+ # Container OCR
108
+ container_data = client.scan_container('./docs/container.jpg')
86
109
  ```
87
110
 
88
111
  ## Documentation
@@ -96,4 +119,4 @@ For full API documentation, response examples, and error codes, please visit the
96
119
 
97
120
  ## License
98
121
 
99
- MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.cd
122
+ MIT License. See [LICENSE](https://opensource.org/licenses/MIT) for details.
@@ -5,10 +5,22 @@
5
5
 
6
6
  **The official Python client for [StructOCR](https://structocr.com).**
7
7
 
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**, **Invoice OCR** and **VIN OCR** into your Python applications in minutes.
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**, **Invoice OCR**, **VIN OCR**, and **Container OCR** into your Python applications in minutes.
9
9
 
10
10
  👉 **[Get your Free API Key here](https://structocr.com)**
11
11
 
12
+ ---
13
+
14
+ ## 🚀 What's New in 1.1.6
15
+ We've massively expanded our logistics and finance capabilities! The SDK now natively supports:
16
+ * **Container OCR**: Accurately parse shipping container numbers from images.
17
+ * **VIN OCR**: Read Vehicle Identification Numbers from windshields or chassis.
18
+ * **Invoice OCR**: Automatically extract invoice numbers, currencies, merchants, and customers.
19
+
20
+ Check out the [Quick Start](#3-scan-a-national-id-driver-license-invoice-vin-or-container) below to see how easy it is to use them!
21
+
22
+ ---
23
+
12
24
  ## Features
13
25
 
14
26
  - **Passport OCR API**: Instantly extract MRZ, name, DOB, and expiry date from passports of 200+ countries.
@@ -16,6 +28,7 @@ StructOCR is a powerful API tailored for developers to extract structured data f
16
28
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
17
29
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
18
30
  - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
31
+ - **Container OCR**: Extract shipping container numbers accurately from images.
19
32
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
20
33
 
21
34
  ## Installation
@@ -24,7 +37,6 @@ Install the package via pip:
24
37
 
25
38
  ```bash
26
39
  pip install structocr
27
-
28
40
  ```
29
41
 
30
42
  ## Quick Start
@@ -36,7 +48,6 @@ from structocr import StructOCR
36
48
 
37
49
  # Initialize with your API Key
38
50
  client = StructOCR(api_key="sk_live_xxxxxxxx")
39
-
40
51
  ```
41
52
 
42
53
  ### 2. Scan a Passport (Passport OCR)
@@ -47,10 +58,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
47
58
 
48
59
  print(f"Name: {result['data']['name']}")
49
60
  print(f"Passport Number: {result['data']['document_number']}")
50
-
51
61
  ```
52
62
 
53
- ### 3. Scan a National ID, Driver License, Invoice or VIN
63
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
54
64
 
55
65
  ```python
56
66
  # National ID OCR
@@ -65,6 +75,8 @@ invoice_data = client.scan_invoice('./docs/invoice.jpg')
65
75
  # VIN OCR
66
76
  vin_data = client.scan_vin('./docs/vin.jpg')
67
77
 
78
+ # Container OCR
79
+ container_data = client.scan_container('./docs/container.jpg')
68
80
  ```
69
81
 
70
82
  ## Documentation
@@ -78,4 +90,4 @@ For full API documentation, response examples, and error codes, please visit the
78
90
 
79
91
  ## License
80
92
 
81
- MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.cd
93
+ 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.4",
6
- description="The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, Invoice and VIN OCR.",
5
+ version="1.1.6",
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.6"
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.6"
25
25
  })
26
26
 
27
27
  def _post_image(self, endpoint, file_path):
@@ -98,4 +98,13 @@ class StructOCR:
98
98
  Returns: Structured JSON data.
99
99
  """
100
100
  # Endpoint: /v1/vin
101
- return self._post_image('vin', file_path)
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.4
4
- Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, Invoice and VIN OCR.
3
+ Version: 1.1.6
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,17 @@ 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
18
29
 
19
30
  # StructOCR Python SDK
20
31
 
@@ -23,10 +34,22 @@ Description-Content-Type: text/markdown
23
34
 
24
35
  **The official Python client for [StructOCR](https://structocr.com).**
25
36
 
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**, **Invoice OCR** and **VIN OCR** into your Python applications in minutes.
37
+ 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
38
 
28
39
  👉 **[Get your Free API Key here](https://structocr.com)**
29
40
 
41
+ ---
42
+
43
+ ## 🚀 What's New in 1.1.6
44
+ We've massively expanded our logistics and finance capabilities! The SDK now natively supports:
45
+ * **Container OCR**: Accurately parse shipping container numbers from images.
46
+ * **VIN OCR**: Read Vehicle Identification Numbers from windshields or chassis.
47
+ * **Invoice OCR**: Automatically extract invoice numbers, currencies, merchants, and customers.
48
+
49
+ Check out the [Quick Start](#3-scan-a-national-id-driver-license-invoice-vin-or-container) below to see how easy it is to use them!
50
+
51
+ ---
52
+
30
53
  ## Features
31
54
 
32
55
  - **Passport OCR API**: Instantly extract MRZ, name, DOB, and expiry date from passports of 200+ countries.
@@ -34,6 +57,7 @@ StructOCR is a powerful API tailored for developers to extract structured data f
34
57
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
35
58
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
36
59
  - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
60
+ - **Container OCR**: Extract shipping container numbers accurately from images.
37
61
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
38
62
 
39
63
  ## Installation
@@ -42,7 +66,6 @@ Install the package via pip:
42
66
 
43
67
  ```bash
44
68
  pip install structocr
45
-
46
69
  ```
47
70
 
48
71
  ## Quick Start
@@ -54,7 +77,6 @@ from structocr import StructOCR
54
77
 
55
78
  # Initialize with your API Key
56
79
  client = StructOCR(api_key="sk_live_xxxxxxxx")
57
-
58
80
  ```
59
81
 
60
82
  ### 2. Scan a Passport (Passport OCR)
@@ -65,10 +87,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
65
87
 
66
88
  print(f"Name: {result['data']['name']}")
67
89
  print(f"Passport Number: {result['data']['document_number']}")
68
-
69
90
  ```
70
91
 
71
- ### 3. Scan a National ID, Driver License, Invoice or VIN
92
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
72
93
 
73
94
  ```python
74
95
  # National ID OCR
@@ -83,6 +104,8 @@ invoice_data = client.scan_invoice('./docs/invoice.jpg')
83
104
  # VIN OCR
84
105
  vin_data = client.scan_vin('./docs/vin.jpg')
85
106
 
107
+ # Container OCR
108
+ container_data = client.scan_container('./docs/container.jpg')
86
109
  ```
87
110
 
88
111
  ## Documentation
@@ -96,4 +119,4 @@ For full API documentation, response examples, and error codes, please visit the
96
119
 
97
120
  ## License
98
121
 
99
- MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.cd
122
+ 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