@v587d/capital-generation 2.29.0 → 2.30.1
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.
- package/CHANGELOG.md +58 -0
- package/README.md +3 -3
- package/THIRD_PARTY_NOTICES.md +16 -0
- package/automation/package.json +1 -1
- package/chart-ui/package.json +1 -1
- package/config/package.json +1 -1
- package/lib/collector-runtime.js +56 -1
- package/lib/data-collector/catalog-taxonomy.d.ts +1 -1
- package/lib/data-collector/catalog-taxonomy.js +33 -0
- package/lib/data-collector/dataset-tools.js +4 -2
- package/lib/data-collector/describe.d.ts +2 -0
- package/lib/data-collector/describe.js +2 -0
- package/lib/data-collector/store.d.ts +11 -0
- package/lib/data-collector/store.js +80 -1
- package/lib/data-collector/tools.d.ts +1 -1
- package/lib/data-collector/tools.js +10 -9
- package/lib/python-runtime/errors.d.ts +1 -1
- package/lib/python-runtime/errors.js +2 -0
- package/lib/python-runtime/manager.d.ts +28 -1
- package/lib/python-runtime/manager.js +141 -5
- package/lib/python-runtime/probe.d.ts +24 -0
- package/lib/python-runtime/probe.js +66 -50
- package/lib/sources/csindex-http.d.ts +4 -0
- package/lib/sources/csindex-http.js +233 -0
- package/lib/sources/eastmoney-http.js +1504 -1
- package/lib/sources/fuyao-rest.js +168 -8
- package/lib/sources/official-http.d.ts +4 -0
- package/lib/sources/official-http.js +477 -0
- package/lib/sources/python-remote.d.ts +25 -0
- package/lib/sources/python-remote.js +461 -0
- package/lib/sources/sina-http.d.ts +2 -0
- package/lib/sources/sina-http.js +484 -0
- package/lib/sources/tencent-http.js +23 -8
- package/lib/sources/ths-http.d.ts +2 -0
- package/lib/sources/ths-http.js +517 -0
- package/lib/time/tools.js +19 -0
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/sources.d.ts +7 -0
- package/lib/web-retriever/sources.js +46 -21
- package/lib/web-retriever/throttle.d.ts +8 -0
- package/lib/web-retriever/throttle.js +13 -0
- package/lib/web-retriever/tools.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +1 -1
- package/preset/capital-generation/agent.patch.yml +7 -5
- package/preset/capital-generation/skills/capital-data-protocol/SKILL.md +16 -16
- package/python/scripts/baostock_stock_basic.py +129 -0
- package/python/scripts/baostock_valuation_history.py +141 -0
- package/python/scripts/pbc_social_financing.py +291 -0
- package/python/vendor/baostock/LICENSE +19 -0
- package/python/vendor/baostock/__init__.py +42 -0
- package/python/vendor/baostock/common/__init__.py +0 -0
- package/python/vendor/baostock/common/contants.py +189 -0
- package/python/vendor/baostock/common/context.py +4 -0
- package/python/vendor/baostock/corpreport/__init__.py +0 -0
- package/python/vendor/baostock/corpreport/corp_performance.py +202 -0
- package/python/vendor/baostock/data/__init__.py +0 -0
- package/python/vendor/baostock/data/messageheader.py +17 -0
- package/python/vendor/baostock/data/msg.py +21 -0
- package/python/vendor/baostock/data/resultset.py +200 -0
- package/python/vendor/baostock/demo/__init__.py +0 -0
- package/python/vendor/baostock/demo/demo_A_stock_5mk-data.py +34 -0
- package/python/vendor/baostock/demo/demo_A_stock_k_data.py +36 -0
- package/python/vendor/baostock/demo/demo_AllStock.py +27 -0
- package/python/vendor/baostock/demo/demo_Balance_data.py +22 -0
- package/python/vendor/baostock/demo/demo_CashFlow_data.py +22 -0
- package/python/vendor/baostock/demo/demo_Dividend_data.py +35 -0
- package/python/vendor/baostock/demo/demo_Dupont_data.py +25 -0
- package/python/vendor/baostock/demo/demo_Forecast_report.py +24 -0
- package/python/vendor/baostock/demo/demo_Growth_data.py +22 -0
- package/python/vendor/baostock/demo/demo_Index_k_data.py +39 -0
- package/python/vendor/baostock/demo/demo_Operation_data.py +22 -0
- package/python/vendor/baostock/demo/demo_PerformanceExpress_report.py +25 -0
- package/python/vendor/baostock/demo/demo_Profit_data.py +22 -0
- package/python/vendor/baostock/demo/demo_TradeDates.py +27 -0
- package/python/vendor/baostock/demo/demo_adjust_factor_data.py +23 -0
- package/python/vendor/baostock/demo/demo_assignDayData.py +23 -0
- package/python/vendor/baostock/demo/demo_daily_adjust_factor_data.py +28 -0
- package/python/vendor/baostock/demo/demo_daily_k_4_AStock.py +28 -0
- package/python/vendor/baostock/demo/demo_daily_k_4_ETF.py +28 -0
- package/python/vendor/baostock/demo/demo_depositRate_data.py +26 -0
- package/python/vendor/baostock/demo/demo_hs300_stocks.py +26 -0
- package/python/vendor/baostock/demo/demo_loanRate_data.py +26 -0
- package/python/vendor/baostock/demo/demo_moneySupplyDataMonth_data.py +26 -0
- package/python/vendor/baostock/demo/demo_moneySupplyDataYear_data.py +26 -0
- package/python/vendor/baostock/demo/demo_requiredReserveRatio_data.py +26 -0
- package/python/vendor/baostock/demo/demo_set_API_key.py +37 -0
- package/python/vendor/baostock/demo/demo_stockBasic_data.py +27 -0
- package/python/vendor/baostock/demo/demo_stock_Valuation_indicator_data.py +34 -0
- package/python/vendor/baostock/demo/demo_stock_industry.py +26 -0
- package/python/vendor/baostock/demo/demo_sz50stocks.py +26 -0
- package/python/vendor/baostock/demo/demo_zz500_stock.py +26 -0
- package/python/vendor/baostock/evaluation/__init__.py +0 -0
- package/python/vendor/baostock/evaluation/season_index.py +758 -0
- package/python/vendor/baostock/login/__init__.py +0 -0
- package/python/vendor/baostock/login/loginout.py +230 -0
- package/python/vendor/baostock/macroscopic/__init__.py +0 -0
- package/python/vendor/baostock/macroscopic/economic_data.py +723 -0
- package/python/vendor/baostock/metadata/__init__.py +0 -0
- package/python/vendor/baostock/metadata/stock_metadata.py +207 -0
- package/python/vendor/baostock/security/__init__.py +0 -0
- package/python/vendor/baostock/security/history.py +265 -0
- package/python/vendor/baostock/security/sectorinfo.py +1024 -0
- package/python/vendor/baostock/util/__init__.py +0 -0
- package/python/vendor/baostock/util/socketutil.py +97 -0
- package/python/vendor/baostock/util/stringutil.py +83 -0
- package/python/vendor/et_xmlfile/LICENSE +23 -0
- package/python/vendor/et_xmlfile/LICENSE.python +298 -0
- package/python/vendor/et_xmlfile/__init__.py +8 -0
- package/python/vendor/et_xmlfile/incremental_tree.py +917 -0
- package/python/vendor/et_xmlfile/xmlfile.py +158 -0
- package/python/vendor/openpyxl/LICENSE +23 -0
- package/python/vendor/openpyxl/__init__.py +19 -0
- package/python/vendor/openpyxl/_constants.py +13 -0
- package/python/vendor/openpyxl/cell/__init__.py +4 -0
- package/python/vendor/openpyxl/cell/_writer.py +136 -0
- package/python/vendor/openpyxl/cell/cell.py +332 -0
- package/python/vendor/openpyxl/cell/read_only.py +136 -0
- package/python/vendor/openpyxl/cell/rich_text.py +202 -0
- package/python/vendor/openpyxl/cell/text.py +184 -0
- package/python/vendor/openpyxl/chart/_3d.py +105 -0
- package/python/vendor/openpyxl/chart/__init__.py +19 -0
- package/python/vendor/openpyxl/chart/_chart.py +199 -0
- package/python/vendor/openpyxl/chart/area_chart.py +106 -0
- package/python/vendor/openpyxl/chart/axis.py +401 -0
- package/python/vendor/openpyxl/chart/bar_chart.py +144 -0
- package/python/vendor/openpyxl/chart/bubble_chart.py +67 -0
- package/python/vendor/openpyxl/chart/chartspace.py +195 -0
- package/python/vendor/openpyxl/chart/data_source.py +246 -0
- package/python/vendor/openpyxl/chart/descriptors.py +43 -0
- package/python/vendor/openpyxl/chart/error_bar.py +62 -0
- package/python/vendor/openpyxl/chart/label.py +127 -0
- package/python/vendor/openpyxl/chart/layout.py +74 -0
- package/python/vendor/openpyxl/chart/legend.py +75 -0
- package/python/vendor/openpyxl/chart/line_chart.py +129 -0
- package/python/vendor/openpyxl/chart/marker.py +90 -0
- package/python/vendor/openpyxl/chart/picture.py +35 -0
- package/python/vendor/openpyxl/chart/pie_chart.py +177 -0
- package/python/vendor/openpyxl/chart/pivot.py +65 -0
- package/python/vendor/openpyxl/chart/plotarea.py +162 -0
- package/python/vendor/openpyxl/chart/print_settings.py +57 -0
- package/python/vendor/openpyxl/chart/radar_chart.py +55 -0
- package/python/vendor/openpyxl/chart/reader.py +32 -0
- package/python/vendor/openpyxl/chart/reference.py +124 -0
- package/python/vendor/openpyxl/chart/scatter_chart.py +53 -0
- package/python/vendor/openpyxl/chart/series.py +197 -0
- package/python/vendor/openpyxl/chart/series_factory.py +41 -0
- package/python/vendor/openpyxl/chart/shapes.py +89 -0
- package/python/vendor/openpyxl/chart/stock_chart.py +54 -0
- package/python/vendor/openpyxl/chart/surface_chart.py +119 -0
- package/python/vendor/openpyxl/chart/text.py +78 -0
- package/python/vendor/openpyxl/chart/title.py +76 -0
- package/python/vendor/openpyxl/chart/trendline.py +98 -0
- package/python/vendor/openpyxl/chart/updown_bars.py +31 -0
- package/python/vendor/openpyxl/chartsheet/__init__.py +3 -0
- package/python/vendor/openpyxl/chartsheet/chartsheet.py +107 -0
- package/python/vendor/openpyxl/chartsheet/custom.py +61 -0
- package/python/vendor/openpyxl/chartsheet/properties.py +28 -0
- package/python/vendor/openpyxl/chartsheet/protection.py +41 -0
- package/python/vendor/openpyxl/chartsheet/publish.py +58 -0
- package/python/vendor/openpyxl/chartsheet/relation.py +97 -0
- package/python/vendor/openpyxl/chartsheet/views.py +51 -0
- package/python/vendor/openpyxl/comments/__init__.py +4 -0
- package/python/vendor/openpyxl/comments/author.py +21 -0
- package/python/vendor/openpyxl/comments/comment_sheet.py +211 -0
- package/python/vendor/openpyxl/comments/comments.py +62 -0
- package/python/vendor/openpyxl/comments/shape_writer.py +112 -0
- package/python/vendor/openpyxl/compat/__init__.py +54 -0
- package/python/vendor/openpyxl/compat/abc.py +8 -0
- package/python/vendor/openpyxl/compat/numbers.py +43 -0
- package/python/vendor/openpyxl/compat/product.py +17 -0
- package/python/vendor/openpyxl/compat/singleton.py +40 -0
- package/python/vendor/openpyxl/compat/strings.py +25 -0
- package/python/vendor/openpyxl/descriptors/__init__.py +58 -0
- package/python/vendor/openpyxl/descriptors/base.py +272 -0
- package/python/vendor/openpyxl/descriptors/container.py +41 -0
- package/python/vendor/openpyxl/descriptors/excel.py +112 -0
- package/python/vendor/openpyxl/descriptors/namespace.py +12 -0
- package/python/vendor/openpyxl/descriptors/nested.py +129 -0
- package/python/vendor/openpyxl/descriptors/sequence.py +136 -0
- package/python/vendor/openpyxl/descriptors/serialisable.py +240 -0
- package/python/vendor/openpyxl/descriptors/slots.py +18 -0
- package/python/vendor/openpyxl/drawing/__init__.py +4 -0
- package/python/vendor/openpyxl/drawing/colors.py +435 -0
- package/python/vendor/openpyxl/drawing/connector.py +144 -0
- package/python/vendor/openpyxl/drawing/drawing.py +92 -0
- package/python/vendor/openpyxl/drawing/effect.py +407 -0
- package/python/vendor/openpyxl/drawing/fill.py +425 -0
- package/python/vendor/openpyxl/drawing/geometry.py +584 -0
- package/python/vendor/openpyxl/drawing/graphic.py +177 -0
- package/python/vendor/openpyxl/drawing/image.py +65 -0
- package/python/vendor/openpyxl/drawing/line.py +144 -0
- package/python/vendor/openpyxl/drawing/picture.py +144 -0
- package/python/vendor/openpyxl/drawing/properties.py +174 -0
- package/python/vendor/openpyxl/drawing/relation.py +17 -0
- package/python/vendor/openpyxl/drawing/spreadsheet_drawing.py +382 -0
- package/python/vendor/openpyxl/drawing/text.py +717 -0
- package/python/vendor/openpyxl/drawing/xdr.py +33 -0
- package/python/vendor/openpyxl/formatting/__init__.py +3 -0
- package/python/vendor/openpyxl/formatting/formatting.py +114 -0
- package/python/vendor/openpyxl/formatting/rule.py +291 -0
- package/python/vendor/openpyxl/formula/__init__.py +3 -0
- package/python/vendor/openpyxl/formula/tokenizer.py +446 -0
- package/python/vendor/openpyxl/formula/translate.py +166 -0
- package/python/vendor/openpyxl/packaging/__init__.py +3 -0
- package/python/vendor/openpyxl/packaging/core.py +115 -0
- package/python/vendor/openpyxl/packaging/custom.py +289 -0
- package/python/vendor/openpyxl/packaging/extended.py +137 -0
- package/python/vendor/openpyxl/packaging/interface.py +56 -0
- package/python/vendor/openpyxl/packaging/manifest.py +194 -0
- package/python/vendor/openpyxl/packaging/relationship.py +158 -0
- package/python/vendor/openpyxl/packaging/workbook.py +185 -0
- package/python/vendor/openpyxl/pivot/__init__.py +1 -0
- package/python/vendor/openpyxl/pivot/cache.py +965 -0
- package/python/vendor/openpyxl/pivot/fields.py +326 -0
- package/python/vendor/openpyxl/pivot/record.py +111 -0
- package/python/vendor/openpyxl/pivot/table.py +1261 -0
- package/python/vendor/openpyxl/reader/__init__.py +1 -0
- package/python/vendor/openpyxl/reader/drawings.py +71 -0
- package/python/vendor/openpyxl/reader/excel.py +349 -0
- package/python/vendor/openpyxl/reader/strings.py +44 -0
- package/python/vendor/openpyxl/reader/workbook.py +133 -0
- package/python/vendor/openpyxl/styles/__init__.py +11 -0
- package/python/vendor/openpyxl/styles/alignment.py +62 -0
- package/python/vendor/openpyxl/styles/borders.py +103 -0
- package/python/vendor/openpyxl/styles/builtins.py +1397 -0
- package/python/vendor/openpyxl/styles/cell_style.py +206 -0
- package/python/vendor/openpyxl/styles/colors.py +172 -0
- package/python/vendor/openpyxl/styles/differential.py +95 -0
- package/python/vendor/openpyxl/styles/fills.py +224 -0
- package/python/vendor/openpyxl/styles/fonts.py +113 -0
- package/python/vendor/openpyxl/styles/named_styles.py +282 -0
- package/python/vendor/openpyxl/styles/numbers.py +200 -0
- package/python/vendor/openpyxl/styles/protection.py +17 -0
- package/python/vendor/openpyxl/styles/proxy.py +62 -0
- package/python/vendor/openpyxl/styles/styleable.py +151 -0
- package/python/vendor/openpyxl/styles/stylesheet.py +274 -0
- package/python/vendor/openpyxl/styles/table.py +94 -0
- package/python/vendor/openpyxl/utils/__init__.py +17 -0
- package/python/vendor/openpyxl/utils/bound_dictionary.py +26 -0
- package/python/vendor/openpyxl/utils/cell.py +240 -0
- package/python/vendor/openpyxl/utils/dataframe.py +87 -0
- package/python/vendor/openpyxl/utils/datetime.py +140 -0
- package/python/vendor/openpyxl/utils/escape.py +43 -0
- package/python/vendor/openpyxl/utils/exceptions.py +34 -0
- package/python/vendor/openpyxl/utils/formulas.py +24 -0
- package/python/vendor/openpyxl/utils/indexed_list.py +49 -0
- package/python/vendor/openpyxl/utils/inference.py +60 -0
- package/python/vendor/openpyxl/utils/protection.py +22 -0
- package/python/vendor/openpyxl/utils/units.py +108 -0
- package/python/vendor/openpyxl/workbook/__init__.py +4 -0
- package/python/vendor/openpyxl/workbook/_writer.py +197 -0
- package/python/vendor/openpyxl/workbook/child.py +166 -0
- package/python/vendor/openpyxl/workbook/defined_name.py +189 -0
- package/python/vendor/openpyxl/workbook/external_link/__init__.py +3 -0
- package/python/vendor/openpyxl/workbook/external_link/external.py +190 -0
- package/python/vendor/openpyxl/workbook/external_reference.py +18 -0
- package/python/vendor/openpyxl/workbook/function_group.py +36 -0
- package/python/vendor/openpyxl/workbook/properties.py +151 -0
- package/python/vendor/openpyxl/workbook/protection.py +163 -0
- package/python/vendor/openpyxl/workbook/smart_tags.py +56 -0
- package/python/vendor/openpyxl/workbook/views.py +155 -0
- package/python/vendor/openpyxl/workbook/web.py +98 -0
- package/python/vendor/openpyxl/workbook/workbook.py +438 -0
- package/python/vendor/openpyxl/worksheet/__init__.py +1 -0
- package/python/vendor/openpyxl/worksheet/_read_only.py +190 -0
- package/python/vendor/openpyxl/worksheet/_reader.py +472 -0
- package/python/vendor/openpyxl/worksheet/_write_only.py +160 -0
- package/python/vendor/openpyxl/worksheet/_writer.py +390 -0
- package/python/vendor/openpyxl/worksheet/cell_range.py +512 -0
- package/python/vendor/openpyxl/worksheet/cell_watch.py +34 -0
- package/python/vendor/openpyxl/worksheet/controls.py +107 -0
- package/python/vendor/openpyxl/worksheet/copier.py +70 -0
- package/python/vendor/openpyxl/worksheet/custom.py +35 -0
- package/python/vendor/openpyxl/worksheet/datavalidation.py +202 -0
- package/python/vendor/openpyxl/worksheet/dimensions.py +306 -0
- package/python/vendor/openpyxl/worksheet/drawing.py +14 -0
- package/python/vendor/openpyxl/worksheet/errors.py +93 -0
- package/python/vendor/openpyxl/worksheet/filters.py +486 -0
- package/python/vendor/openpyxl/worksheet/formula.py +51 -0
- package/python/vendor/openpyxl/worksheet/header_footer.py +270 -0
- package/python/vendor/openpyxl/worksheet/hyperlink.py +46 -0
- package/python/vendor/openpyxl/worksheet/merge.py +141 -0
- package/python/vendor/openpyxl/worksheet/ole.py +133 -0
- package/python/vendor/openpyxl/worksheet/page.py +174 -0
- package/python/vendor/openpyxl/worksheet/pagebreak.py +94 -0
- package/python/vendor/openpyxl/worksheet/picture.py +8 -0
- package/python/vendor/openpyxl/worksheet/print_settings.py +184 -0
- package/python/vendor/openpyxl/worksheet/properties.py +97 -0
- package/python/vendor/openpyxl/worksheet/protection.py +120 -0
- package/python/vendor/openpyxl/worksheet/related.py +17 -0
- package/python/vendor/openpyxl/worksheet/scenario.py +105 -0
- package/python/vendor/openpyxl/worksheet/smart_tag.py +78 -0
- package/python/vendor/openpyxl/worksheet/table.py +385 -0
- package/python/vendor/openpyxl/worksheet/views.py +155 -0
- package/python/vendor/openpyxl/worksheet/worksheet.py +907 -0
- package/python/vendor/openpyxl/writer/__init__.py +1 -0
- package/python/vendor/openpyxl/writer/excel.py +295 -0
- package/python/vendor/openpyxl/writer/theme.py +291 -0
- package/python/vendor/openpyxl/xml/__init__.py +42 -0
- package/python/vendor/openpyxl/xml/constants.py +129 -0
- package/python/vendor/openpyxl/xml/functions.py +87 -0
- package/watchlist/package.json +1 -1
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
4
|
+
from openpyxl.descriptors import (
|
|
5
|
+
Typed,
|
|
6
|
+
DateTime,
|
|
7
|
+
Bool,
|
|
8
|
+
Float,
|
|
9
|
+
String,
|
|
10
|
+
Integer,
|
|
11
|
+
Sequence,
|
|
12
|
+
)
|
|
13
|
+
from openpyxl.descriptors.excel import HexBinary
|
|
14
|
+
|
|
15
|
+
class Index(Serialisable):
|
|
16
|
+
|
|
17
|
+
tagname = "x"
|
|
18
|
+
|
|
19
|
+
v = Integer(allow_none=True)
|
|
20
|
+
|
|
21
|
+
def __init__(self,
|
|
22
|
+
v=0,
|
|
23
|
+
):
|
|
24
|
+
self.v = v
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Tuple(Serialisable):
|
|
28
|
+
|
|
29
|
+
tagname = "tpl"
|
|
30
|
+
|
|
31
|
+
fld = Integer(allow_none=True)
|
|
32
|
+
hier = Integer(allow_none=True)
|
|
33
|
+
item = Integer()
|
|
34
|
+
|
|
35
|
+
def __init__(self,
|
|
36
|
+
fld=None,
|
|
37
|
+
hier=None,
|
|
38
|
+
item=None,
|
|
39
|
+
):
|
|
40
|
+
self.fld = fld
|
|
41
|
+
self.hier = hier
|
|
42
|
+
self.item = item
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class TupleList(Serialisable):
|
|
46
|
+
|
|
47
|
+
tagname = "tpls"
|
|
48
|
+
|
|
49
|
+
c = Integer(allow_none=True)
|
|
50
|
+
tpl = Typed(expected_type=Tuple, )
|
|
51
|
+
|
|
52
|
+
__elements__ = ('tpl',)
|
|
53
|
+
|
|
54
|
+
def __init__(self,
|
|
55
|
+
c=None,
|
|
56
|
+
tpl=None,
|
|
57
|
+
):
|
|
58
|
+
self.c = c
|
|
59
|
+
self.tpl = tpl
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class Missing(Serialisable):
|
|
63
|
+
|
|
64
|
+
tagname = "m"
|
|
65
|
+
|
|
66
|
+
tpls = Sequence(expected_type=TupleList)
|
|
67
|
+
x = Sequence(expected_type=Index)
|
|
68
|
+
u = Bool(allow_none=True)
|
|
69
|
+
f = Bool(allow_none=True)
|
|
70
|
+
c = String(allow_none=True)
|
|
71
|
+
cp = Integer(allow_none=True)
|
|
72
|
+
_in = Integer(allow_none=True)
|
|
73
|
+
bc = HexBinary(allow_none=True)
|
|
74
|
+
fc = HexBinary(allow_none=True)
|
|
75
|
+
i = Bool(allow_none=True)
|
|
76
|
+
un = Bool(allow_none=True)
|
|
77
|
+
st = Bool(allow_none=True)
|
|
78
|
+
b = Bool(allow_none=True)
|
|
79
|
+
|
|
80
|
+
__elements__ = ('tpls', 'x')
|
|
81
|
+
|
|
82
|
+
def __init__(self,
|
|
83
|
+
tpls=(),
|
|
84
|
+
x=(),
|
|
85
|
+
u=None,
|
|
86
|
+
f=None,
|
|
87
|
+
c=None,
|
|
88
|
+
cp=None,
|
|
89
|
+
_in=None,
|
|
90
|
+
bc=None,
|
|
91
|
+
fc=None,
|
|
92
|
+
i=None,
|
|
93
|
+
un=None,
|
|
94
|
+
st=None,
|
|
95
|
+
b=None,
|
|
96
|
+
):
|
|
97
|
+
self.tpls = tpls
|
|
98
|
+
self.x = x
|
|
99
|
+
self.u = u
|
|
100
|
+
self.f = f
|
|
101
|
+
self.c = c
|
|
102
|
+
self.cp = cp
|
|
103
|
+
self._in = _in
|
|
104
|
+
self.bc = bc
|
|
105
|
+
self.fc = fc
|
|
106
|
+
self.i = i
|
|
107
|
+
self.un = un
|
|
108
|
+
self.st = st
|
|
109
|
+
self.b = b
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class Number(Serialisable):
|
|
113
|
+
|
|
114
|
+
tagname = "n"
|
|
115
|
+
|
|
116
|
+
tpls = Sequence(expected_type=TupleList)
|
|
117
|
+
x = Sequence(expected_type=Index)
|
|
118
|
+
v = Float()
|
|
119
|
+
u = Bool(allow_none=True)
|
|
120
|
+
f = Bool(allow_none=True)
|
|
121
|
+
c = String(allow_none=True)
|
|
122
|
+
cp = Integer(allow_none=True)
|
|
123
|
+
_in = Integer(allow_none=True)
|
|
124
|
+
bc = HexBinary(allow_none=True)
|
|
125
|
+
fc = HexBinary(allow_none=True)
|
|
126
|
+
i = Bool(allow_none=True)
|
|
127
|
+
un = Bool(allow_none=True)
|
|
128
|
+
st = Bool(allow_none=True)
|
|
129
|
+
b = Bool(allow_none=True)
|
|
130
|
+
|
|
131
|
+
__elements__ = ('tpls', 'x')
|
|
132
|
+
|
|
133
|
+
def __init__(self,
|
|
134
|
+
tpls=(),
|
|
135
|
+
x=(),
|
|
136
|
+
v=None,
|
|
137
|
+
u=None,
|
|
138
|
+
f=None,
|
|
139
|
+
c=None,
|
|
140
|
+
cp=None,
|
|
141
|
+
_in=None,
|
|
142
|
+
bc=None,
|
|
143
|
+
fc=None,
|
|
144
|
+
i=None,
|
|
145
|
+
un=None,
|
|
146
|
+
st=None,
|
|
147
|
+
b=None,
|
|
148
|
+
):
|
|
149
|
+
self.tpls = tpls
|
|
150
|
+
self.x = x
|
|
151
|
+
self.v = v
|
|
152
|
+
self.u = u
|
|
153
|
+
self.f = f
|
|
154
|
+
self.c = c
|
|
155
|
+
self.cp = cp
|
|
156
|
+
self._in = _in
|
|
157
|
+
self.bc = bc
|
|
158
|
+
self.fc = fc
|
|
159
|
+
self.i = i
|
|
160
|
+
self.un = un
|
|
161
|
+
self.st = st
|
|
162
|
+
self.b = b
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class Error(Serialisable):
|
|
166
|
+
|
|
167
|
+
tagname = "e"
|
|
168
|
+
|
|
169
|
+
tpls = Typed(expected_type=TupleList, allow_none=True)
|
|
170
|
+
x = Sequence(expected_type=Index)
|
|
171
|
+
v = String()
|
|
172
|
+
u = Bool(allow_none=True)
|
|
173
|
+
f = Bool(allow_none=True)
|
|
174
|
+
c = String(allow_none=True)
|
|
175
|
+
cp = Integer(allow_none=True)
|
|
176
|
+
_in = Integer(allow_none=True)
|
|
177
|
+
bc = HexBinary(allow_none=True)
|
|
178
|
+
fc = HexBinary(allow_none=True)
|
|
179
|
+
i = Bool(allow_none=True)
|
|
180
|
+
un = Bool(allow_none=True)
|
|
181
|
+
st = Bool(allow_none=True)
|
|
182
|
+
b = Bool(allow_none=True)
|
|
183
|
+
|
|
184
|
+
__elements__ = ('tpls', 'x')
|
|
185
|
+
|
|
186
|
+
def __init__(self,
|
|
187
|
+
tpls=None,
|
|
188
|
+
x=(),
|
|
189
|
+
v=None,
|
|
190
|
+
u=None,
|
|
191
|
+
f=None,
|
|
192
|
+
c=None,
|
|
193
|
+
cp=None,
|
|
194
|
+
_in=None,
|
|
195
|
+
bc=None,
|
|
196
|
+
fc=None,
|
|
197
|
+
i=None,
|
|
198
|
+
un=None,
|
|
199
|
+
st=None,
|
|
200
|
+
b=None,
|
|
201
|
+
):
|
|
202
|
+
self.tpls = tpls
|
|
203
|
+
self.x = x
|
|
204
|
+
self.v = v
|
|
205
|
+
self.u = u
|
|
206
|
+
self.f = f
|
|
207
|
+
self.c = c
|
|
208
|
+
self.cp = cp
|
|
209
|
+
self._in = _in
|
|
210
|
+
self.bc = bc
|
|
211
|
+
self.fc = fc
|
|
212
|
+
self.i = i
|
|
213
|
+
self.un = un
|
|
214
|
+
self.st = st
|
|
215
|
+
self.b = b
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class Boolean(Serialisable):
|
|
219
|
+
|
|
220
|
+
tagname = "b"
|
|
221
|
+
|
|
222
|
+
x = Sequence(expected_type=Index)
|
|
223
|
+
v = Bool()
|
|
224
|
+
u = Bool(allow_none=True)
|
|
225
|
+
f = Bool(allow_none=True)
|
|
226
|
+
c = String(allow_none=True)
|
|
227
|
+
cp = Integer(allow_none=True)
|
|
228
|
+
|
|
229
|
+
__elements__ = ('x',)
|
|
230
|
+
|
|
231
|
+
def __init__(self,
|
|
232
|
+
x=(),
|
|
233
|
+
v=None,
|
|
234
|
+
u=None,
|
|
235
|
+
f=None,
|
|
236
|
+
c=None,
|
|
237
|
+
cp=None,
|
|
238
|
+
):
|
|
239
|
+
self.x = x
|
|
240
|
+
self.v = v
|
|
241
|
+
self.u = u
|
|
242
|
+
self.f = f
|
|
243
|
+
self.c = c
|
|
244
|
+
self.cp = cp
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
class Text(Serialisable):
|
|
248
|
+
|
|
249
|
+
tagname = "s"
|
|
250
|
+
|
|
251
|
+
tpls = Sequence(expected_type=TupleList)
|
|
252
|
+
x = Sequence(expected_type=Index)
|
|
253
|
+
v = String()
|
|
254
|
+
u = Bool(allow_none=True)
|
|
255
|
+
f = Bool(allow_none=True)
|
|
256
|
+
c = String(allow_none=True)
|
|
257
|
+
cp = Integer(allow_none=True)
|
|
258
|
+
_in = Integer(allow_none=True)
|
|
259
|
+
bc = HexBinary(allow_none=True)
|
|
260
|
+
fc = HexBinary(allow_none=True)
|
|
261
|
+
i = Bool(allow_none=True)
|
|
262
|
+
un = Bool(allow_none=True)
|
|
263
|
+
st = Bool(allow_none=True)
|
|
264
|
+
b = Bool(allow_none=True)
|
|
265
|
+
|
|
266
|
+
__elements__ = ('tpls', 'x')
|
|
267
|
+
|
|
268
|
+
def __init__(self,
|
|
269
|
+
tpls=(),
|
|
270
|
+
x=(),
|
|
271
|
+
v=None,
|
|
272
|
+
u=None,
|
|
273
|
+
f=None,
|
|
274
|
+
c=None,
|
|
275
|
+
cp=None,
|
|
276
|
+
_in=None,
|
|
277
|
+
bc=None,
|
|
278
|
+
fc=None,
|
|
279
|
+
i=None,
|
|
280
|
+
un=None,
|
|
281
|
+
st=None,
|
|
282
|
+
b=None,
|
|
283
|
+
):
|
|
284
|
+
self.tpls = tpls
|
|
285
|
+
self.x = x
|
|
286
|
+
self.v = v
|
|
287
|
+
self.u = u
|
|
288
|
+
self.f = f
|
|
289
|
+
self.c = c
|
|
290
|
+
self.cp = cp
|
|
291
|
+
self._in = _in
|
|
292
|
+
self.bc = bc
|
|
293
|
+
self.fc = fc
|
|
294
|
+
self.i = i
|
|
295
|
+
self.un = un
|
|
296
|
+
self.st = st
|
|
297
|
+
self.b = b
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
class DateTimeField(Serialisable):
|
|
301
|
+
|
|
302
|
+
tagname = "d"
|
|
303
|
+
|
|
304
|
+
x = Sequence(expected_type=Index)
|
|
305
|
+
v = DateTime()
|
|
306
|
+
u = Bool(allow_none=True)
|
|
307
|
+
f = Bool(allow_none=True)
|
|
308
|
+
c = String(allow_none=True)
|
|
309
|
+
cp = Integer(allow_none=True)
|
|
310
|
+
|
|
311
|
+
__elements__ = ('x',)
|
|
312
|
+
|
|
313
|
+
def __init__(self,
|
|
314
|
+
x=(),
|
|
315
|
+
v=None,
|
|
316
|
+
u=None,
|
|
317
|
+
f=None,
|
|
318
|
+
c=None,
|
|
319
|
+
cp=None,
|
|
320
|
+
):
|
|
321
|
+
self.x = x
|
|
322
|
+
self.v = v
|
|
323
|
+
self.u = u
|
|
324
|
+
self.f = f
|
|
325
|
+
self.c = c
|
|
326
|
+
self.cp = cp
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
4
|
+
from openpyxl.descriptors import (
|
|
5
|
+
Typed,
|
|
6
|
+
Integer,
|
|
7
|
+
Sequence,
|
|
8
|
+
)
|
|
9
|
+
from openpyxl.descriptors.sequence import (
|
|
10
|
+
MultiSequence,
|
|
11
|
+
MultiSequencePart,
|
|
12
|
+
)
|
|
13
|
+
from openpyxl.descriptors.excel import ExtensionList
|
|
14
|
+
from openpyxl.descriptors.nested import (
|
|
15
|
+
NestedInteger,
|
|
16
|
+
NestedBool,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
from openpyxl.xml.constants import SHEET_MAIN_NS
|
|
20
|
+
from openpyxl.xml.functions import tostring
|
|
21
|
+
|
|
22
|
+
from .fields import (
|
|
23
|
+
Boolean,
|
|
24
|
+
Error,
|
|
25
|
+
Missing,
|
|
26
|
+
Number,
|
|
27
|
+
Text,
|
|
28
|
+
TupleList,
|
|
29
|
+
DateTimeField,
|
|
30
|
+
Index,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class Record(Serialisable):
|
|
35
|
+
|
|
36
|
+
tagname = "r"
|
|
37
|
+
|
|
38
|
+
_fields = MultiSequence()
|
|
39
|
+
m = MultiSequencePart(expected_type=Missing, store="_fields")
|
|
40
|
+
n = MultiSequencePart(expected_type=Number, store="_fields")
|
|
41
|
+
b = MultiSequencePart(expected_type=Boolean, store="_fields")
|
|
42
|
+
e = MultiSequencePart(expected_type=Error, store="_fields")
|
|
43
|
+
s = MultiSequencePart(expected_type=Text, store="_fields")
|
|
44
|
+
d = MultiSequencePart(expected_type=DateTimeField, store="_fields")
|
|
45
|
+
x = MultiSequencePart(expected_type=Index, store="_fields")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def __init__(self,
|
|
49
|
+
_fields=(),
|
|
50
|
+
m=None,
|
|
51
|
+
n=None,
|
|
52
|
+
b=None,
|
|
53
|
+
e=None,
|
|
54
|
+
s=None,
|
|
55
|
+
d=None,
|
|
56
|
+
x=None,
|
|
57
|
+
):
|
|
58
|
+
self._fields = _fields
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class RecordList(Serialisable):
|
|
62
|
+
|
|
63
|
+
mime_type = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml"
|
|
64
|
+
rel_type = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords"
|
|
65
|
+
_id = 1
|
|
66
|
+
_path = "/xl/pivotCache/pivotCacheRecords{0}.xml"
|
|
67
|
+
|
|
68
|
+
tagname ="pivotCacheRecords"
|
|
69
|
+
|
|
70
|
+
r = Sequence(expected_type=Record, allow_none=True)
|
|
71
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
72
|
+
|
|
73
|
+
__elements__ = ('r', )
|
|
74
|
+
__attrs__ = ('count', )
|
|
75
|
+
|
|
76
|
+
def __init__(self,
|
|
77
|
+
count=None,
|
|
78
|
+
r=(),
|
|
79
|
+
extLst=None,
|
|
80
|
+
):
|
|
81
|
+
self.r = r
|
|
82
|
+
self.extLst = extLst
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def count(self):
|
|
87
|
+
return len(self.r)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def to_tree(self):
|
|
91
|
+
tree = super().to_tree()
|
|
92
|
+
tree.set("xmlns", SHEET_MAIN_NS)
|
|
93
|
+
return tree
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def path(self):
|
|
98
|
+
return self._path.format(self._id)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _write(self, archive, manifest):
|
|
102
|
+
"""
|
|
103
|
+
Write to zipfile and update manifest
|
|
104
|
+
"""
|
|
105
|
+
xml = tostring(self.to_tree())
|
|
106
|
+
archive.writestr(self.path[1:], xml)
|
|
107
|
+
manifest.append(self)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _write_rels(self, archive, manifest):
|
|
111
|
+
pass
|