structocr 1.1.4__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.4
4
- Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, Invoice and VIN OCR.
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**, **Invoice OCR** and **VIN 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
 
@@ -34,6 +46,7 @@ StructOCR is a powerful API tailored for developers to extract structured data f
34
46
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
35
47
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
36
48
  - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
49
+ - **Container OCR**: Extract shipping container numbers accurately from images.
37
50
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
38
51
 
39
52
  ## Installation
@@ -42,7 +55,6 @@ Install the package via pip:
42
55
 
43
56
  ```bash
44
57
  pip install structocr
45
-
46
58
  ```
47
59
 
48
60
  ## Quick Start
@@ -54,7 +66,6 @@ from structocr import StructOCR
54
66
 
55
67
  # Initialize with your API Key
56
68
  client = StructOCR(api_key="sk_live_xxxxxxxx")
57
-
58
69
  ```
59
70
 
60
71
  ### 2. Scan a Passport (Passport OCR)
@@ -65,10 +76,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
65
76
 
66
77
  print(f"Name: {result['data']['name']}")
67
78
  print(f"Passport Number: {result['data']['document_number']}")
68
-
69
79
  ```
70
80
 
71
- ### 3. Scan a National ID, Driver License, Invoice or VIN
81
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
72
82
 
73
83
  ```python
74
84
  # National ID OCR
@@ -83,6 +93,8 @@ invoice_data = client.scan_invoice('./docs/invoice.jpg')
83
93
  # VIN OCR
84
94
  vin_data = client.scan_vin('./docs/vin.jpg')
85
95
 
96
+ # Container OCR
97
+ container_data = client.scan_container('./docs/container.jpg')
86
98
  ```
87
99
 
88
100
  ## Documentation
@@ -96,4 +108,4 @@ For full API documentation, response examples, and error codes, please visit the
96
108
 
97
109
  ## License
98
110
 
99
- 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**, **Invoice OCR** and **VIN 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
 
@@ -16,6 +17,7 @@ StructOCR is a powerful API tailored for developers to extract structured data f
16
17
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
17
18
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
18
19
  - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
20
+ - **Container OCR**: Extract shipping container numbers accurately from images.
19
21
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
20
22
 
21
23
  ## Installation
@@ -24,7 +26,6 @@ Install the package via pip:
24
26
 
25
27
  ```bash
26
28
  pip install structocr
27
-
28
29
  ```
29
30
 
30
31
  ## Quick Start
@@ -36,7 +37,6 @@ from structocr import StructOCR
36
37
 
37
38
  # Initialize with your API Key
38
39
  client = StructOCR(api_key="sk_live_xxxxxxxx")
39
-
40
40
  ```
41
41
 
42
42
  ### 2. Scan a Passport (Passport OCR)
@@ -47,10 +47,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
47
47
 
48
48
  print(f"Name: {result['data']['name']}")
49
49
  print(f"Passport Number: {result['data']['document_number']}")
50
-
51
50
  ```
52
51
 
53
- ### 3. Scan a National ID, Driver License, Invoice or VIN
52
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
54
53
 
55
54
  ```python
56
55
  # National ID OCR
@@ -65,6 +64,8 @@ invoice_data = client.scan_invoice('./docs/invoice.jpg')
65
64
  # VIN OCR
66
65
  vin_data = client.scan_vin('./docs/vin.jpg')
67
66
 
67
+ # Container OCR
68
+ container_data = client.scan_container('./docs/container.jpg')
68
69
  ```
69
70
 
70
71
  ## Documentation
@@ -78,4 +79,4 @@ For full API documentation, response examples, and error codes, please visit the
78
79
 
79
80
  ## License
80
81
 
81
- 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.4",
6
- description="The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, Invoice and VIN OCR.",
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):
@@ -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.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**, **Invoice OCR** and **VIN 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
 
@@ -34,6 +46,7 @@ StructOCR is a powerful API tailored for developers to extract structured data f
34
46
  - **Driver License OCR**: Extract vehicle class, license number, and personal details.
35
47
  - **Invoice OCR**: Extract invoice number, currency, merchant, customer.
36
48
  - **VIN OCR**: Extract VIN (Vehicle Identification Number) from windshield or engine bay images.
49
+ - **Container OCR**: Extract shipping container numbers accurately from images.
37
50
  - **Secure & Fast**: Enterprise-grade encryption and sub-second response times.
38
51
 
39
52
  ## Installation
@@ -42,7 +55,6 @@ Install the package via pip:
42
55
 
43
56
  ```bash
44
57
  pip install structocr
45
-
46
58
  ```
47
59
 
48
60
  ## Quick Start
@@ -54,7 +66,6 @@ from structocr import StructOCR
54
66
 
55
67
  # Initialize with your API Key
56
68
  client = StructOCR(api_key="sk_live_xxxxxxxx")
57
-
58
69
  ```
59
70
 
60
71
  ### 2. Scan a Passport (Passport OCR)
@@ -65,10 +76,9 @@ result = client.scan_passport('./docs/passport_sample.jpg')
65
76
 
66
77
  print(f"Name: {result['data']['name']}")
67
78
  print(f"Passport Number: {result['data']['document_number']}")
68
-
69
79
  ```
70
80
 
71
- ### 3. Scan a National ID, Driver License, Invoice or VIN
81
+ ### 3. Scan a National ID, Driver License, Invoice, VIN, or Container
72
82
 
73
83
  ```python
74
84
  # National ID OCR
@@ -83,6 +93,8 @@ invoice_data = client.scan_invoice('./docs/invoice.jpg')
83
93
  # VIN OCR
84
94
  vin_data = client.scan_vin('./docs/vin.jpg')
85
95
 
96
+ # Container OCR
97
+ container_data = client.scan_container('./docs/container.jpg')
86
98
  ```
87
99
 
88
100
  ## Documentation
@@ -96,4 +108,4 @@ For full API documentation, response examples, and error codes, please visit the
96
108
 
97
109
  ## License
98
110
 
99
- 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