knify 1.8.55__tar.gz → 1.8.56__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: knify
3
- Version: 1.8.55
3
+ Version: 1.8.56
4
4
  Summary: Development tools for python
5
5
  Home-page: https://github.com/qicongsheng/knify
6
6
  Author: qicongsheng
@@ -50,7 +50,7 @@ def read_excel(file_path: str, sheet: str | int | None = 0, headers: list[Header
50
50
  results = []
51
51
  workbook = load_workbook(filename=file_path)
52
52
  sheet_ = workbook[sheet] if isinstance(sheet, str) else workbook[workbook.sheetnames[sheet]]
53
- headers_ = [cell.value for cell in sheet_[1]]
53
+ headers_ = [cell.value for cell in sheet_[start_row]]
54
54
  for row_idx, row in enumerate(sheet_.rows):
55
55
  if row_idx < start_row:
56
56
  continue
@@ -72,3 +72,9 @@ def read_excel(file_path: str, sheet: str | int | None = 0, headers: list[Header
72
72
  if objutil.has_keys(result):
73
73
  results.append(result)
74
74
  return results
75
+
76
+
77
+ def read_headers(file_path: str, sheet: str | int | None = 0, header_row: int = 0):
78
+ workbook = load_workbook(filename=file_path)
79
+ sheet_ = workbook[sheet] if isinstance(sheet, str) else workbook[workbook.sheetnames[sheet]]
80
+ return [cell.value for cell in sheet_[header_row + 1]]
@@ -8,7 +8,7 @@ def get_pip_name():
8
8
 
9
9
 
10
10
  def get_version():
11
- return '1.8.55'
11
+ return '1.8.56'
12
12
 
13
13
 
14
14
  def print_version():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: knify
3
- Version: 1.8.55
3
+ Version: 1.8.56
4
4
  Summary: Development tools for python
5
5
  Home-page: https://github.com/qicongsheng/knify
6
6
  Author: qicongsheng
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes