bella-openapi 1.0.3__tar.gz → 1.0.3.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.
Files changed (30) hide show
  1. {bella_openapi-1.0.3/src/bella_openapi.egg-info → bella_openapi-1.0.3.1}/PKG-INFO +2 -1
  2. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/setup.py +2 -1
  3. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/entity/standard_domtree.py +15 -18
  4. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1/src/bella_openapi.egg-info}/PKG-INFO +2 -1
  5. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi.egg-info/requires.txt +1 -0
  6. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/LICENSE +0 -0
  7. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/README.md +0 -0
  8. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/setup.cfg +0 -0
  9. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/__init__.py +0 -0
  10. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/auth_billing.py +0 -0
  11. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/authorize.py +0 -0
  12. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/bella_trace/__init__.py +0 -0
  13. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/bella_trace/_context.py +0 -0
  14. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/bella_trace/fastapi_interceptor.py +0 -0
  15. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/bella_trace/record_log.py +0 -0
  16. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/bella_trace/trace_requests.py +0 -0
  17. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/config.py +0 -0
  18. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/console/__init__.py +0 -0
  19. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/console/models.py +0 -0
  20. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/entity/__init__.py +0 -0
  21. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/exception.py +0 -0
  22. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/log.py +0 -0
  23. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/middleware/__init__.py +0 -0
  24. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/middleware/context_middleware.py +0 -0
  25. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/openapi_contexvar.py +0 -0
  26. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi/schema.py +0 -0
  27. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi.egg-info/SOURCES.txt +0 -0
  28. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi.egg-info/dependency_links.txt +0 -0
  29. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi.egg-info/not-zip-safe +0 -0
  30. {bella_openapi-1.0.3 → bella_openapi-1.0.3.1}/src/bella_openapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bella-openapi
3
- Version: 1.0.3
3
+ Version: 1.0.3.1
4
4
  Summary: client for openapi service.
5
5
  Home-page:
6
6
  Author: ['tangxiaolong', 'fanqiangwei', 'zhangxiaojia', 'liumin', 'wangyukun']
@@ -12,6 +12,7 @@ License-File: LICENSE
12
12
  Requires-Dist: httpx<=0.26.0,>=0.10.0
13
13
  Requires-Dist: Werkzeug==3.0.1
14
14
  Requires-Dist: tiktoken>=0.5.0
15
+ Requires-Dist: pydantic==2.11.7
15
16
  Dynamic: author
16
17
  Dynamic: classifier
17
18
  Dynamic: description
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
3
3
 
4
4
  SHORT = "client for openapi service."
5
5
 
6
- __version__ = "1.0.3"
6
+ __version__ = "1.0.3.1"
7
7
  __author__ = ["tangxiaolong", "fanqiangwei", "zhangxiaojia", 'liumin', 'wangyukun']
8
8
  __email__ = ''
9
9
  readme_path = 'README.md'
@@ -17,6 +17,7 @@ setup(
17
17
  'httpx>=0.10.0,<=0.26.0',
18
18
  'Werkzeug==3.0.1',
19
19
  'tiktoken>=0.5.0',
20
+ 'pydantic==2.11.7'
20
21
  ],
21
22
  url='',
22
23
  author=__author__,
@@ -129,7 +129,7 @@ class StandardDomTree(BaseModel):
129
129
  # 添加表格名称
130
130
  if node.element.name:
131
131
  markdown_res += f"**{node.element.name}**\n\n"
132
- table_md = self._list_to_html_table(node.element.rows)
132
+ table_md = self._list_to_markdown_table(node.element.rows)
133
133
  markdown_res += f"{table_md}\n\n"
134
134
  # 添加表格描述
135
135
  if node.element.description:
@@ -168,28 +168,25 @@ class StandardDomTree(BaseModel):
168
168
  quoted_lines = ['> ' + line for line in lines]
169
169
  return '\n'.join(quoted_lines)
170
170
 
171
- def _list_to_html_table(self, rows: List[StandardRow]) -> str:
172
- """将表格行转换为HTML表格"""
171
+ def _list_to_markdown_table(self, rows: List[StandardRow]) -> str:
172
+ """将表格行转换为 markdown 表格格式"""
173
173
  if not rows:
174
174
  return ""
175
175
 
176
- html_text = "<table>"
176
+ markdown_table = ""
177
+
178
+ # 添加表头
179
+ if rows:
180
+ header_cells = [cell.text or "" for cell in rows[0].cells]
181
+ markdown_table += "| " + " | ".join(header_cells) + " |\n"
182
+ markdown_table += "| " + " | ".join(["---"] * len(header_cells)) + " |\n"
183
+
184
+ # 添加数据行
177
185
  for row in rows:
178
- html_text += "<tr>"
179
- for cell in row.cells:
180
- # 从path中提取rowspan和colspan信息
181
- if len(cell.path) >= 4:
182
- start_row, end_row, start_col, end_col = cell.path[:4]
183
- rowspan = end_row - start_row + 1
184
- colspan = end_col - start_col + 1
185
- else:
186
- rowspan = colspan = 1
186
+ cells = [cell.text or "" for cell in row.cells]
187
+ markdown_table += "| " + " | ".join(cells) + " |\n"
187
188
 
188
- cell_text = cell.text or ""
189
- html_text += f"<td rowspan='{rowspan}' colspan='{colspan}'>{cell_text}</td>"
190
- html_text += "</tr>"
191
- html_text += "</table>"
192
- return html_text
189
+ return markdown_table
193
190
 
194
191
  @classmethod
195
192
  def from_domtree_dict(cls, domtree: dict, file_info):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bella-openapi
3
- Version: 1.0.3
3
+ Version: 1.0.3.1
4
4
  Summary: client for openapi service.
5
5
  Home-page:
6
6
  Author: ['tangxiaolong', 'fanqiangwei', 'zhangxiaojia', 'liumin', 'wangyukun']
@@ -12,6 +12,7 @@ License-File: LICENSE
12
12
  Requires-Dist: httpx<=0.26.0,>=0.10.0
13
13
  Requires-Dist: Werkzeug==3.0.1
14
14
  Requires-Dist: tiktoken>=0.5.0
15
+ Requires-Dist: pydantic==2.11.7
15
16
  Dynamic: author
16
17
  Dynamic: classifier
17
18
  Dynamic: description
@@ -1,3 +1,4 @@
1
1
  httpx<=0.26.0,>=0.10.0
2
2
  Werkzeug==3.0.1
3
3
  tiktoken>=0.5.0
4
+ pydantic==2.11.7
File without changes
File without changes
File without changes