flexablelib 2.3.1__tar.gz → 3.0.0__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.
- {flexablelib-2.3.1 → flexablelib-3.0.0}/CHANGELOG.md +87 -0
- {flexablelib-2.3.1/flexablelib.egg-info → flexablelib-3.0.0}/PKG-INFO +11 -11
- {flexablelib-2.3.1 → flexablelib-3.0.0}/README.md +9 -9
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/merges.py +2 -2
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/options.py +1 -1
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/style_compositions.py +214 -166
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/table.py +62 -726
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/table_strings.py +1 -1
- {flexablelib-2.3.1 → flexablelib-3.0.0/flexablelib.egg-info}/PKG-INFO +11 -11
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib.egg-info/SOURCES.txt +2 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/package.json +1 -1
- {flexablelib-2.3.1 → flexablelib-3.0.0}/setup.py +1 -1
- flexablelib-3.0.0/style_examples.md +773 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_align_indicators.py +8 -8
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_features.py +17 -17
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_issues.py +18 -18
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_merge_edge_matrix.py +18 -18
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_merges.py +25 -25
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_readme_examples.py +2 -2
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_stress_matrix.py +3 -3
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_style_line_widths.py +3 -3
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_styles.py +17 -17
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_two_pass_measurement.py +2 -2
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_upstream_issues.py +16 -16
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v2021_fixes.py +3 -3
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v211_fixes.py +1 -1
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v214_features.py +5 -5
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v215_features.py +6 -6
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v216_features.py +6 -6
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v217_features.py +2 -2
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v218_features.py +1 -1
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v219_fixes.py +28 -28
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v221_fixes.py +3 -3
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v224_fixes.py +16 -16
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v230_none.py +1 -1
- flexablelib-3.0.0/tests/test_v300_style_names.py +81 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tools/readme_gallery.py +4 -4
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tools/stress_matrix.py +2 -2
- flexablelib-3.0.0/tools/style_examples.py +133 -0
- flexablelib-2.3.1/style_examples.md +0 -769
- {flexablelib-2.3.1 → flexablelib-3.0.0}/LICENSE +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/MANIFEST.in +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/__init__.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/_speedups.c +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/_width_tables.h +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/cells.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/colors.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/columns.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/fast.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/py.typed +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/readers.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/text_width.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/utils.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib/writers.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib.egg-info/dependency_links.txt +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib.egg-info/requires.txt +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/flexablelib.egg-info/top_level.txt +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/pytest.ini +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/setup.cfg +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/conftest.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/helpers.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_cells.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_columns.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_excel.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_public_api_edges.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_text_width.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v210_rows_copy.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v2110_fixes.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v213_features.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v219_coverage.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v220_exports.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v222_fixes.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v223_fixes.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tests/test_v231_fixes.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tools/benchmark.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tools/generate_width_tables.py +0 -0
- {flexablelib-2.3.1 → flexablelib-3.0.0}/tools/text_to_png.py +0 -0
|
@@ -2,6 +2,93 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.0.0] - 2026-11-10
|
|
6
|
+
|
|
7
|
+
### Changed (breaking)
|
|
8
|
+
- Every border style has a new name that describes how it looks. A name
|
|
9
|
+
reads as the line family (`single`, `rounded`, `double`, `double_frame`,
|
|
10
|
+
`double_horizontal`, `double_header`, `dashed`, `dotted`, `ascii`,
|
|
11
|
+
`tilde`, `lines`, `underlined`, `borderless`, or a text format:
|
|
12
|
+
`markdown`, `org`, `psql`, `rst`), then optional modifiers:
|
|
13
|
+
`_double_underline` (double rule under the header), `_rows` (a rule
|
|
14
|
+
between every row) and `_open_header` / `_open_body` / `_open` (no
|
|
15
|
+
column separators in the header, the body, or both).
|
|
16
|
+
- The default style is now called `ascii_double_underline_open_header`
|
|
17
|
+
(formerly `grid_eheader`); it looks the same.
|
|
18
|
+
- `presto` was identical to `psql`, and `blocks` to `blank`, so each pair
|
|
19
|
+
now has one name: `psql` and `borderless`. The catalogue has 54 styles.
|
|
20
|
+
- `table.possible_styles` lists only the new names.
|
|
21
|
+
|
|
22
|
+
### Deprecated
|
|
23
|
+
- The old names still work: setting one (on `style_name` or in the
|
|
24
|
+
constructor) uses the new style and emits a `DeprecationWarning`. They
|
|
25
|
+
are listed in `flexablelib.style_compositions.DEPRECATED_STYLE_NAMES` and
|
|
26
|
+
will be removed in a future major release.
|
|
27
|
+
|
|
28
|
+
### Old → new names
|
|
29
|
+
|
|
30
|
+
| Old name | New name |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `plain` | `borderless_compact_header_gap` |
|
|
33
|
+
| `empty` | `borderless_compact` |
|
|
34
|
+
| `blank` | `borderless` |
|
|
35
|
+
| `blocks` | `borderless` |
|
|
36
|
+
| `sharp` | `single` |
|
|
37
|
+
| `modern` | `single_rows` |
|
|
38
|
+
| `thin_borderline` | `single_double_underline_rows` |
|
|
39
|
+
| `th_bd_eheader` | `single_double_underline_rows_open_header` |
|
|
40
|
+
| `th_bd_ebody` | `single_double_underline_open_body` |
|
|
41
|
+
| `th_bd_empty` | `single_double_underline_open` |
|
|
42
|
+
| `modern_rounded` | `rounded_rows` |
|
|
43
|
+
| `round_edges` | `rounded_double_underline` |
|
|
44
|
+
| `re_eheader` | `rounded_double_underline_open_header` |
|
|
45
|
+
| `re_ebody` | `rounded_double_underline_open` |
|
|
46
|
+
| `extended` | `double_rows` |
|
|
47
|
+
| `bold_borderline` | `double_frame_rows` |
|
|
48
|
+
| `bd_bl_eheader` | `double_frame_rows_open_header` |
|
|
49
|
+
| `bd_bl_ebody` | `double_frame_open_body` |
|
|
50
|
+
| `bd_bl_empty` | `double_frame_open` |
|
|
51
|
+
| `pretty_columns` | `double_horizontal` |
|
|
52
|
+
| `pretty_grid` | `double_horizontal_rows` |
|
|
53
|
+
| `bheader_columns` | `double_header` |
|
|
54
|
+
| `bold_header` | `double_header_rows` |
|
|
55
|
+
| `beheader_columns` | `double_header_open_header` |
|
|
56
|
+
| `bold_eheader` | `double_header_rows_open_header` |
|
|
57
|
+
| `bheader_ebody` | `double_header_open` |
|
|
58
|
+
| `dashes` | `dashed` |
|
|
59
|
+
| `dots` | `dotted_rows` |
|
|
60
|
+
| `ascii` | `ascii_rows` |
|
|
61
|
+
| `grid` | `ascii_double_underline_rows` |
|
|
62
|
+
| `grid_eheader` | `ascii_double_underline_open_header` |
|
|
63
|
+
| `grid_ebody` | `ascii_double_underline_open_body` |
|
|
64
|
+
| `grid_empty` | `ascii_double_underline_open` |
|
|
65
|
+
| `sticks` | `ascii_align_markers` |
|
|
66
|
+
| `tilg_columns` | `tilde` |
|
|
67
|
+
| `tilde_grid` | `tilde_rows` |
|
|
68
|
+
| `tilg_eheader` | `tilde_rows_open_header` |
|
|
69
|
+
| `tilg_empty` | `tilde_open` |
|
|
70
|
+
| `simple` | `lines_ascii` |
|
|
71
|
+
| `simple_bold` | `lines_ascii_double` |
|
|
72
|
+
| `simple_head` | `lines_ascii_header_only` |
|
|
73
|
+
| `simple_head_bold` | `lines_ascii_double_header_only` |
|
|
74
|
+
| `sim_th_bl` | `lines_single` |
|
|
75
|
+
| `sim_bd_bl` | `lines_double` |
|
|
76
|
+
| `sim_head_th_bl` | `lines_single_header_only` |
|
|
77
|
+
| `sim_head_bd_bl` | `lines_double_header_only` |
|
|
78
|
+
| `pwrshll_alike` | `underlined_ascii` |
|
|
79
|
+
| `clean` | `underlined_single` |
|
|
80
|
+
| `pipes` | `markdown_aligned` |
|
|
81
|
+
| `orgtbl` | `org` |
|
|
82
|
+
| `presto` | `psql` |
|
|
83
|
+
| `re_structured_text` | `rst` |
|
|
84
|
+
|
|
85
|
+
`rounded`, `markdown`, `psql` and `ascii_rounded` keep their names.
|
|
86
|
+
|
|
87
|
+
### Documentation
|
|
88
|
+
- `style_examples.md` is generated by `tools/style_examples.py` and shows
|
|
89
|
+
all 54 styles grouped by family, with a description of each and the
|
|
90
|
+
old → new table.
|
|
91
|
+
|
|
5
92
|
## [2.3.1] - 2026-11-10
|
|
6
93
|
|
|
7
94
|
### Fixed
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flexablelib
|
|
3
|
-
Version:
|
|
4
|
-
Summary: Fast, dependency-free terminal tables for Python:
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Fast, dependency-free terminal tables for Python: 54 border styles, ANSI colors, cell merges, decimal alignment, width fitting, and CSV/Markdown/HTML/Excel/LaTeX I/O.
|
|
5
5
|
Home-page: https://github.com/Opus-Perpetuus/flexablelib
|
|
6
6
|
Author: Benjamin Ramirez
|
|
7
7
|
Author-email: chilerito12@gmail.com
|
|
@@ -69,7 +69,7 @@ Dynamic: summary
|
|
|
69
69
|
|
|
70
70
|
<p align="center">
|
|
71
71
|
<strong>Fast, dependency-free terminal tables for Python.</strong><br>
|
|
72
|
-
|
|
72
|
+
54 border styles · ANSI colours · cell merges · decimal alignment · width fitting · CSV / Markdown / HTML / Excel / LaTeX I/O
|
|
73
73
|
</p>
|
|
74
74
|
|
|
75
75
|
<p align="center">
|
|
@@ -116,7 +116,7 @@ table = Table(
|
|
|
116
116
|
],
|
|
117
117
|
headers=["Service", "Region", "Uptime %", "RPS"],
|
|
118
118
|
)
|
|
119
|
-
table.style_name = "rounded" #
|
|
119
|
+
table.style_name = "rounded" # 54 styles, see style_examples.md
|
|
120
120
|
table.header_color = "bold cyan"
|
|
121
121
|
table.color_rule = lambda value, row, column: (
|
|
122
122
|
"red" if column == "Uptime %" and value < 99.5 else None
|
|
@@ -149,7 +149,7 @@ Table.from_csv("sales.csv"); Table.from_markdown(md); Table.from_pandas(df)
|
|
|
149
149
|
|
|
150
150
|
<table>
|
|
151
151
|
<tr>
|
|
152
|
-
<td width="50%"><b>Styles</b> —
|
|
152
|
+
<td width="50%"><b>Styles</b> — 54 presets, from <code>ascii_rows</code> to <code>borderless</code><br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/styles.png" alt="Several border styles" width="260"></td>
|
|
153
153
|
<td width="50%"><b>Themes</b> — <code>table.apply_theme("ocean")</code><br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/themes.png" alt="Theme presets" width="380"></td>
|
|
154
154
|
</tr>
|
|
155
155
|
<tr>
|
|
@@ -162,7 +162,7 @@ Table.from_csv("sales.csv"); Table.from_markdown(md); Table.from_pandas(df)
|
|
|
162
162
|
</tr>
|
|
163
163
|
</table>
|
|
164
164
|
|
|
165
|
-
More: [all
|
|
165
|
+
More: [all 54 styles](https://github.com/Opus-Perpetuus/flexablelib/blob/main/style_examples.md) ·
|
|
166
166
|
wrapping and ellipsis overflow · per-column / per-cell colour and alignment ·
|
|
167
167
|
vertical alignment · `paginate()` · `stream()` for live rows · `transpose()` ·
|
|
168
168
|
nested tables · `fit_terminal()` · `hide_columns` · `sort_by` · Roman / custom
|
|
@@ -178,7 +178,7 @@ not a claim that it is impossible there.
|
|
|
178
178
|
| | flexablelib | tabulate | prettytable | rich |
|
|
179
179
|
| --- | :---: | :---: | :---: | :---: |
|
|
180
180
|
| Runtime dependencies | **none** | none | `wcwidth` | `markdown-it-py`, `pygments` |
|
|
181
|
-
| Border style presets |
|
|
181
|
+
| Border style presets | 54 | many `tablefmt` | — (hrules/vrules toggles) | box styles |
|
|
182
182
|
| Decimal-point alignment | ✓ | ✓ | — | — |
|
|
183
183
|
| Row **and** column cell merges | ✓ | — | — | — |
|
|
184
184
|
| ANSI colours (header, rows, cells, borders) | ✓ | — | — | ✓ |
|
|
@@ -216,7 +216,7 @@ one place.
|
|
|
216
216
|
coloured text stay aligned.
|
|
217
217
|
- **Windows.** Box-drawing styles need a UTF-8 console (`chcp 65001` or
|
|
218
218
|
`PYTHONUTF8=1`; Windows Terminal is usually UTF-8 already). ASCII styles
|
|
219
|
-
(`
|
|
219
|
+
(`ascii_rows`, `ascii_double_underline_rows`, `psql`, `markdown`, …) work on any code page.
|
|
220
220
|
- **Typed.** Ships `py.typed` (PEP 561).
|
|
221
221
|
- **Stability.** flexablelib follows [semantic versioning](https://semver.org):
|
|
222
222
|
within 2.x, public `Table` attributes and methods are not removed or renamed
|
|
@@ -326,7 +326,7 @@ new_table.add_column('Test\nResults', [9.651, 3, 245.7])
|
|
|
326
326
|
new_table.add_row(['Piotr\nBaltimore', 27, 3.5])
|
|
327
327
|
new_table.add_row(['Sam', 21])
|
|
328
328
|
new_table.show_index = True
|
|
329
|
-
new_table.style_name = '
|
|
329
|
+
new_table.style_name = 'double_horizontal'
|
|
330
330
|
new_table.missing_value = '?'
|
|
331
331
|
print(new_table)
|
|
332
332
|
```
|
|
@@ -520,7 +520,7 @@ flexablelib/ # GitHub repository
|
|
|
520
520
|
│ ├── __init__.py public API: Table, TableComposition, SeparatorLine
|
|
521
521
|
│ ├── table.py the Table class — state and render orchestration
|
|
522
522
|
│ ├── columns.py type inference, alignment, column widths
|
|
523
|
-
│ ├── style_compositions.py the
|
|
523
|
+
│ ├── style_compositions.py the 54 border styles, as data
|
|
524
524
|
│ ├── table_strings.py separator lines and data rows
|
|
525
525
|
│ ├── cells.py cell padding, justification, wrapping
|
|
526
526
|
│ ├── options.py constants and defaults
|
|
@@ -529,7 +529,7 @@ flexablelib/ # GitHub repository
|
|
|
529
529
|
├── docs/ issue history and design notes
|
|
530
530
|
├── logos/ brand assets — see logos/README.md
|
|
531
531
|
├── ARCHITECTURE.md how it all fits together
|
|
532
|
-
├── style_examples.md all
|
|
532
|
+
├── style_examples.md all 54 styles rendered
|
|
533
533
|
├── package.json canonical version number (no npm deps)
|
|
534
534
|
└── setup.py reads the version from package.json
|
|
535
535
|
```
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<strong>Fast, dependency-free terminal tables for Python.</strong><br>
|
|
7
|
-
|
|
7
|
+
54 border styles · ANSI colours · cell merges · decimal alignment · width fitting · CSV / Markdown / HTML / Excel / LaTeX I/O
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
@@ -51,7 +51,7 @@ table = Table(
|
|
|
51
51
|
],
|
|
52
52
|
headers=["Service", "Region", "Uptime %", "RPS"],
|
|
53
53
|
)
|
|
54
|
-
table.style_name = "rounded" #
|
|
54
|
+
table.style_name = "rounded" # 54 styles, see style_examples.md
|
|
55
55
|
table.header_color = "bold cyan"
|
|
56
56
|
table.color_rule = lambda value, row, column: (
|
|
57
57
|
"red" if column == "Uptime %" and value < 99.5 else None
|
|
@@ -84,7 +84,7 @@ Table.from_csv("sales.csv"); Table.from_markdown(md); Table.from_pandas(df)
|
|
|
84
84
|
|
|
85
85
|
<table>
|
|
86
86
|
<tr>
|
|
87
|
-
<td width="50%"><b>Styles</b> —
|
|
87
|
+
<td width="50%"><b>Styles</b> — 54 presets, from <code>ascii_rows</code> to <code>borderless</code><br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/styles.png" alt="Several border styles" width="260"></td>
|
|
88
88
|
<td width="50%"><b>Themes</b> — <code>table.apply_theme("ocean")</code><br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/themes.png" alt="Theme presets" width="380"></td>
|
|
89
89
|
</tr>
|
|
90
90
|
<tr>
|
|
@@ -97,7 +97,7 @@ Table.from_csv("sales.csv"); Table.from_markdown(md); Table.from_pandas(df)
|
|
|
97
97
|
</tr>
|
|
98
98
|
</table>
|
|
99
99
|
|
|
100
|
-
More: [all
|
|
100
|
+
More: [all 54 styles](https://github.com/Opus-Perpetuus/flexablelib/blob/main/style_examples.md) ·
|
|
101
101
|
wrapping and ellipsis overflow · per-column / per-cell colour and alignment ·
|
|
102
102
|
vertical alignment · `paginate()` · `stream()` for live rows · `transpose()` ·
|
|
103
103
|
nested tables · `fit_terminal()` · `hide_columns` · `sort_by` · Roman / custom
|
|
@@ -113,7 +113,7 @@ not a claim that it is impossible there.
|
|
|
113
113
|
| | flexablelib | tabulate | prettytable | rich |
|
|
114
114
|
| --- | :---: | :---: | :---: | :---: |
|
|
115
115
|
| Runtime dependencies | **none** | none | `wcwidth` | `markdown-it-py`, `pygments` |
|
|
116
|
-
| Border style presets |
|
|
116
|
+
| Border style presets | 54 | many `tablefmt` | — (hrules/vrules toggles) | box styles |
|
|
117
117
|
| Decimal-point alignment | ✓ | ✓ | — | — |
|
|
118
118
|
| Row **and** column cell merges | ✓ | — | — | — |
|
|
119
119
|
| ANSI colours (header, rows, cells, borders) | ✓ | — | — | ✓ |
|
|
@@ -151,7 +151,7 @@ one place.
|
|
|
151
151
|
coloured text stay aligned.
|
|
152
152
|
- **Windows.** Box-drawing styles need a UTF-8 console (`chcp 65001` or
|
|
153
153
|
`PYTHONUTF8=1`; Windows Terminal is usually UTF-8 already). ASCII styles
|
|
154
|
-
(`
|
|
154
|
+
(`ascii_rows`, `ascii_double_underline_rows`, `psql`, `markdown`, …) work on any code page.
|
|
155
155
|
- **Typed.** Ships `py.typed` (PEP 561).
|
|
156
156
|
- **Stability.** flexablelib follows [semantic versioning](https://semver.org):
|
|
157
157
|
within 2.x, public `Table` attributes and methods are not removed or renamed
|
|
@@ -261,7 +261,7 @@ new_table.add_column('Test\nResults', [9.651, 3, 245.7])
|
|
|
261
261
|
new_table.add_row(['Piotr\nBaltimore', 27, 3.5])
|
|
262
262
|
new_table.add_row(['Sam', 21])
|
|
263
263
|
new_table.show_index = True
|
|
264
|
-
new_table.style_name = '
|
|
264
|
+
new_table.style_name = 'double_horizontal'
|
|
265
265
|
new_table.missing_value = '?'
|
|
266
266
|
print(new_table)
|
|
267
267
|
```
|
|
@@ -455,7 +455,7 @@ flexablelib/ # GitHub repository
|
|
|
455
455
|
│ ├── __init__.py public API: Table, TableComposition, SeparatorLine
|
|
456
456
|
│ ├── table.py the Table class — state and render orchestration
|
|
457
457
|
│ ├── columns.py type inference, alignment, column widths
|
|
458
|
-
│ ├── style_compositions.py the
|
|
458
|
+
│ ├── style_compositions.py the 54 border styles, as data
|
|
459
459
|
│ ├── table_strings.py separator lines and data rows
|
|
460
460
|
│ ├── cells.py cell padding, justification, wrapping
|
|
461
461
|
│ ├── options.py constants and defaults
|
|
@@ -464,7 +464,7 @@ flexablelib/ # GitHub repository
|
|
|
464
464
|
├── docs/ issue history and design notes
|
|
465
465
|
├── logos/ brand assets — see logos/README.md
|
|
466
466
|
├── ARCHITECTURE.md how it all fits together
|
|
467
|
-
├── style_examples.md all
|
|
467
|
+
├── style_examples.md all 54 styles rendered
|
|
468
468
|
├── package.json canonical version number (no npm deps)
|
|
469
469
|
└── setup.py reads the version from package.json
|
|
470
470
|
```
|
|
@@ -353,7 +353,7 @@ def _pick_junction(v_glyph: str, h_glyph: str, n: bool, s: bool, e: bool, w: boo
|
|
|
353
353
|
# ASCII column lines join with '+' whatever the dash ('-', '=', '~').
|
|
354
354
|
return _ASCII.get(key, '+')
|
|
355
355
|
if v_glyph and not ('\u2500' <= v_glyph <= '\u257f'):
|
|
356
|
-
# Other non-box column glyphs (``
|
|
356
|
+
# Other non-box column glyphs (``dotted_rows`` draws ':') are their own
|
|
357
357
|
# junction; a light box tee next to them is a foreign glyph.
|
|
358
358
|
return v_glyph
|
|
359
359
|
if v_glyph == '║' and h_glyph == '═':
|
|
@@ -388,7 +388,7 @@ def _synthesize_body_rule(composition):
|
|
|
388
388
|
elif header is not None and header.middle:
|
|
389
389
|
h = header.middle
|
|
390
390
|
if not ('\u2500' <= v.middle <= '\u257f') and v.middle not in '|+':
|
|
391
|
-
# Non-box column glyphs (``
|
|
391
|
+
# Non-box column glyphs (``dotted_rows`` draws ':') are their own junction.
|
|
392
392
|
return SeparatorLine(
|
|
393
393
|
left=v.left or None,
|
|
394
394
|
middle=h if h and not ('\u2500' <= h <= '\u257f') else '-',
|
|
@@ -38,7 +38,7 @@ NONE_VALUE_REPLACEMENT = ''
|
|
|
38
38
|
# Default value to fill cells when aligning.
|
|
39
39
|
DEFAULT_FILL_CHAR = ' '
|
|
40
40
|
# The style is set if the user doesn't choose or puts an incorrect value.
|
|
41
|
-
DEFAULT_STYLE = '
|
|
41
|
+
DEFAULT_STYLE = 'ascii_double_underline_open_header'
|
|
42
42
|
# Default index column header.
|
|
43
43
|
I_COL_TIT = 'i'
|
|
44
44
|
# Default space a cell has on each side (after aligning).
|