structocr 1.0.0__tar.gz → 1.1.1__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,26 +1,20 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: structocr
3
- Version: 1.0.0
4
- Summary: The official Python SDK for StructOCR API - Passport, ID, and Driver License OCR.
5
- Home-page: https://github.com/structocr/structocr-python
3
+ Version: 1.1.1
4
+ Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, and Invoice.
5
+ Home-page: https://structocr.com
6
6
  Author: StructOCR Team
7
7
  Author-email: support@structocr.com
8
+ Project-URL: Homepage, https://structocr.com
9
+ Project-URL: Documentation, https://www.structocr.com/developers
10
+ Project-URL: Source, https://github.com/structocr/structocr-python
11
+ Project-URL: Tracker, https://github.com/structocr/structocr-python/issues
8
12
  Classifier: Programming Language :: Python :: 3
9
13
  Classifier: License :: OSI Approved :: MIT License
10
14
  Classifier: Operating System :: OS Independent
11
15
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
12
16
  Requires-Python: >=3.6
13
17
  Description-Content-Type: text/markdown
14
- Requires-Dist: requests>=2.25.0
15
- Dynamic: author
16
- Dynamic: author-email
17
- Dynamic: classifier
18
- Dynamic: description
19
- Dynamic: description-content-type
20
- Dynamic: home-page
21
- Dynamic: requires-dist
22
- Dynamic: requires-python
23
- Dynamic: summary
24
18
 
25
19
  # StructOCR Python SDK
26
20
 
@@ -95,5 +89,3 @@ For full API documentation, response examples, and error codes, please visit the
95
89
  ## License
96
90
 
97
91
  MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.
98
-
99
- ```
@@ -70,6 +70,4 @@ For full API documentation, response examples, and error codes, please visit the
70
70
 
71
71
  ## License
72
72
 
73
- MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.
74
-
75
- ```
73
+ MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.
@@ -0,0 +1,35 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="structocr",
5
+ version="1.1.1",
6
+ description="The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, and Invoice.",
7
+ long_description=open("README.md").read(),
8
+ long_description_content_type="text/markdown",
9
+
10
+ author="StructOCR Team",
11
+ author_email="support@structocr.com",
12
+
13
+ # 1. 这里通常放主页或者 GitHub 地址 (PyPI 标题下的链接)
14
+ url="https://structocr.com",
15
+
16
+ # 2. 这里定义侧边栏的具体链接 (Homepage, Documentation, Source 等)
17
+ project_urls={
18
+ "Homepage": "https://structocr.com",
19
+ "Documentation": "https://www.structocr.com/developers", # 假设你的文档在这里
20
+ "Source": "https://github.com/structocr/structocr-python",
21
+ "Tracker": "https://github.com/structocr/structocr-python/issues", # 问题追踪
22
+ },
23
+
24
+ packages=find_packages(),
25
+ install_requires=[
26
+ "requests>=2.25.0",
27
+ ],
28
+ classifiers=[
29
+ "Programming Language :: Python :: 3",
30
+ "License :: OSI Approved :: MIT License",
31
+ "Operating System :: OS Independent",
32
+ "Topic :: Scientific/Engineering :: Image Recognition",
33
+ ],
34
+ python_requires='>=3.6',
35
+ )
@@ -70,7 +70,7 @@ class StructOCR:
70
70
  path: Path to the ID card image file.
71
71
  Returns: Structured JSON data.
72
72
  """
73
- # Endpoint: /v1/national-id (Assuming this is your endpoint naming)
73
+ # Endpoint: /v1/national-id
74
74
  return self._post_image('national-id', file_path)
75
75
 
76
76
  def scan_driver_license(self, file_path):
@@ -79,5 +79,14 @@ class StructOCR:
79
79
  path: Path to the driver license image file.
80
80
  Returns: Structured JSON data.
81
81
  """
82
- # Endpoint: /v1/driver-license (Assuming this is your endpoint naming)
83
- return self._post_image('driver-license', file_path)
82
+ # Endpoint: /v1/driver-license
83
+ return self._post_image('driver-license', file_path)
84
+
85
+ def scan_driver_license(self, file_path):
86
+ """
87
+ Scan a Invoice.
88
+ path: Path to the invoice image file.
89
+ Returns: Structured JSON data.
90
+ """
91
+ # Endpoint: /v1/invoice
92
+ return self._post_image('invoice', file_path)
@@ -1,26 +1,20 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: structocr
3
- Version: 1.0.0
4
- Summary: The official Python SDK for StructOCR API - Passport, ID, and Driver License OCR.
5
- Home-page: https://github.com/structocr/structocr-python
3
+ Version: 1.1.1
4
+ Summary: The official Python SDK for StructOCR API - Passport, ID card, Driver License OCR, and Invoice.
5
+ Home-page: https://structocr.com
6
6
  Author: StructOCR Team
7
7
  Author-email: support@structocr.com
8
+ Project-URL: Homepage, https://structocr.com
9
+ Project-URL: Documentation, https://www.structocr.com/developers
10
+ Project-URL: Source, https://github.com/structocr/structocr-python
11
+ Project-URL: Tracker, https://github.com/structocr/structocr-python/issues
8
12
  Classifier: Programming Language :: Python :: 3
9
13
  Classifier: License :: OSI Approved :: MIT License
10
14
  Classifier: Operating System :: OS Independent
11
15
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
12
16
  Requires-Python: >=3.6
13
17
  Description-Content-Type: text/markdown
14
- Requires-Dist: requests>=2.25.0
15
- Dynamic: author
16
- Dynamic: author-email
17
- Dynamic: classifier
18
- Dynamic: description
19
- Dynamic: description-content-type
20
- Dynamic: home-page
21
- Dynamic: requires-dist
22
- Dynamic: requires-python
23
- Dynamic: summary
24
18
 
25
19
  # StructOCR Python SDK
26
20
 
@@ -95,5 +89,3 @@ For full API documentation, response examples, and error codes, please visit the
95
89
  ## License
96
90
 
97
91
  MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.
98
-
99
- ```
structocr-1.0.0/setup.py DELETED
@@ -1,23 +0,0 @@
1
- from setuptools import setup, find_packages
2
-
3
- setup(
4
- name="structocr",
5
- version="1.0.0",
6
- description="The official Python SDK for StructOCR API - Passport, ID, and Driver License OCR.",
7
- long_description=open("README.md").read(),
8
- long_description_content_type="text/markdown",
9
- author="StructOCR Team",
10
- author_email="support@structocr.com",
11
- url="https://github.com/structocr/structocr-python", # 记得换成你未来的 github 地址
12
- packages=find_packages(),
13
- install_requires=[
14
- "requests>=2.25.0",
15
- ],
16
- classifiers=[
17
- "Programming Language :: Python :: 3",
18
- "License :: OSI Approved :: MIT License",
19
- "Operating System :: OS Independent",
20
- "Topic :: Scientific/Engineering :: Image Recognition", # 这是一个很好的分类标签
21
- ],
22
- python_requires='>=3.6',
23
- )
File without changes