rowsncolumns-spreadsheet 0.1.0__py3-none-any.whl
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.
- rowsncolumns_spreadsheet/__init__.py +106 -0
- rowsncolumns_spreadsheet/datatype.py +760 -0
- rowsncolumns_spreadsheet/efficient_interface.py +423 -0
- rowsncolumns_spreadsheet/efficient_patches.py +434 -0
- rowsncolumns_spreadsheet/immer_interface.py +449 -0
- rowsncolumns_spreadsheet/immer_like_patches.py +364 -0
- rowsncolumns_spreadsheet/interface.py +376 -0
- rowsncolumns_spreadsheet/operations.py +373 -0
- rowsncolumns_spreadsheet/patches.py +305 -0
- rowsncolumns_spreadsheet/sheet_cell.py +1922 -0
- rowsncolumns_spreadsheet/sheet_cell_helpers.py +255 -0
- rowsncolumns_spreadsheet/spreadsheet.py +309 -0
- rowsncolumns_spreadsheet/types.py +191 -0
- rowsncolumns_spreadsheet/utils.py +180 -0
- rowsncolumns_spreadsheet-0.1.0.dist-info/METADATA +196 -0
- rowsncolumns_spreadsheet-0.1.0.dist-info/RECORD +21 -0
- rowsncolumns_spreadsheet-0.1.0.dist-info/WHEEL +5 -0
- rowsncolumns_spreadsheet-0.1.0.dist-info/top_level.txt +2 -0
- tests/__init__.py +1 -0
- tests/test_insert_row.py +258 -0
- tests/test_sheet_cell.py +591 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Rows & Columns Spreadsheet - Python Implementation
|
|
3
|
+
|
|
4
|
+
A Python library for spreadsheet operations, providing data manipulation
|
|
5
|
+
capabilities similar to the TypeScript version.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .types import (
|
|
9
|
+
CellData,
|
|
10
|
+
GridRange,
|
|
11
|
+
SelectionArea,
|
|
12
|
+
Sheet,
|
|
13
|
+
CellInterface,
|
|
14
|
+
Direction,
|
|
15
|
+
SpreadsheetState,
|
|
16
|
+
ExtendedValue,
|
|
17
|
+
ErrorValue,
|
|
18
|
+
)
|
|
19
|
+
from .spreadsheet import Spreadsheet
|
|
20
|
+
from .operations import insert_row, delete_row, insert_column, delete_column
|
|
21
|
+
from .interface import SpreadsheetInterface
|
|
22
|
+
from .immer_interface import ImmerSpreadsheetInterface, produce_with_patches, apply_patches
|
|
23
|
+
from .patches import SpreadsheetPatch, JSONPatch, PatchGenerator
|
|
24
|
+
from .sheet_cell import SheetCell, DEFAULT_SHEET_ID, DEFAULT_CELL_COORDS
|
|
25
|
+
from .sheet_cell_helpers import (
|
|
26
|
+
create_row_data_from_array,
|
|
27
|
+
is_cell_range,
|
|
28
|
+
combine_map_iterators,
|
|
29
|
+
get_next_table_column_name,
|
|
30
|
+
get_conflicting_table,
|
|
31
|
+
hash_object,
|
|
32
|
+
AWAITING_CALCULATION,
|
|
33
|
+
)
|
|
34
|
+
from .datatype import (
|
|
35
|
+
detect_value_type_and_pattern,
|
|
36
|
+
detect_value_type,
|
|
37
|
+
detect_number_format_type,
|
|
38
|
+
detect_number_format_pattern,
|
|
39
|
+
detect_decimal_pattern,
|
|
40
|
+
is_currency,
|
|
41
|
+
is_boolean,
|
|
42
|
+
is_percentage,
|
|
43
|
+
is_number,
|
|
44
|
+
is_formula,
|
|
45
|
+
is_valid_url_or_email,
|
|
46
|
+
is_multiline,
|
|
47
|
+
convert_to_number,
|
|
48
|
+
create_formatted_value,
|
|
49
|
+
PATTERN_NUMBER,
|
|
50
|
+
PATTERN_NUMBER_THOUSANDS,
|
|
51
|
+
PATTERN_PERCENT,
|
|
52
|
+
PATTERN_CURRENCY,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
__version__ = "0.1.0"
|
|
56
|
+
__all__ = [
|
|
57
|
+
"CellData",
|
|
58
|
+
"GridRange",
|
|
59
|
+
"SelectionArea",
|
|
60
|
+
"Sheet",
|
|
61
|
+
"CellInterface",
|
|
62
|
+
"Direction",
|
|
63
|
+
"SpreadsheetState",
|
|
64
|
+
"ExtendedValue",
|
|
65
|
+
"ErrorValue",
|
|
66
|
+
"Spreadsheet",
|
|
67
|
+
"SpreadsheetInterface",
|
|
68
|
+
"ImmerSpreadsheetInterface",
|
|
69
|
+
"produce_with_patches",
|
|
70
|
+
"apply_patches",
|
|
71
|
+
"SpreadsheetPatch",
|
|
72
|
+
"JSONPatch",
|
|
73
|
+
"PatchGenerator",
|
|
74
|
+
"insert_row",
|
|
75
|
+
"delete_row",
|
|
76
|
+
"insert_column",
|
|
77
|
+
"delete_column",
|
|
78
|
+
"SheetCell",
|
|
79
|
+
"DEFAULT_SHEET_ID",
|
|
80
|
+
"DEFAULT_CELL_COORDS",
|
|
81
|
+
"create_row_data_from_array",
|
|
82
|
+
"is_cell_range",
|
|
83
|
+
"combine_map_iterators",
|
|
84
|
+
"get_next_table_column_name",
|
|
85
|
+
"get_conflicting_table",
|
|
86
|
+
"hash_object",
|
|
87
|
+
"AWAITING_CALCULATION",
|
|
88
|
+
"detect_value_type_and_pattern",
|
|
89
|
+
"detect_value_type",
|
|
90
|
+
"detect_number_format_type",
|
|
91
|
+
"detect_number_format_pattern",
|
|
92
|
+
"detect_decimal_pattern",
|
|
93
|
+
"is_currency",
|
|
94
|
+
"is_boolean",
|
|
95
|
+
"is_percentage",
|
|
96
|
+
"is_number",
|
|
97
|
+
"is_formula",
|
|
98
|
+
"is_valid_url_or_email",
|
|
99
|
+
"is_multiline",
|
|
100
|
+
"convert_to_number",
|
|
101
|
+
"create_formatted_value",
|
|
102
|
+
"PATTERN_NUMBER",
|
|
103
|
+
"PATTERN_NUMBER_THOUSANDS",
|
|
104
|
+
"PATTERN_PERCENT",
|
|
105
|
+
"PATTERN_CURRENCY",
|
|
106
|
+
]
|