diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..06df4a8
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,84 @@
+name: Build and publish the new version to PyPI
+
+on:
+ push:
+ tags:
+ - "v*.*.*"
+
+permissions:
+ contents: read
+
+jobs:
+ build-package:
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ fetch-tags: true
+
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.13"
+ cache: pip
+ cache-dependency-path: |
+ setup.py
+ **/*requirements.txt
+ tox.ini
+
+ - run: make setup-ci
+
+ - run: make build
+
+ - uses: actions/upload-artifact@v4
+ with:
+ name: dist
+ path: ./dist/*
+
+ publish-package:
+ needs: build-package
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ environment:
+ name: pypi
+ url: https://pypi.org/p/pytablewriter
+ permissions:
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
+
+ steps:
+ - uses: actions/download-artifact@v4
+ with:
+ name: dist
+ path: ./dist
+
+ - name: Publish to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
+
+ generate-relese:
+ needs: publish-package
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ id-token: write
+ contents: write
+
+ steps:
+ - uses: actions/download-artifact@v4
+ with:
+ name: dist
+ path: ./dist
+
+ - name: Sign the dists with Sigstore
+ uses: sigstore/gh-action-sigstore-python@v3.0.0
+ with:
+ inputs: >-
+ ./dist/*.tar.gz
+ ./dist/*.whl
+
+ - name: Generate a GitHub release
+ uses: softprops/action-gh-release@v2
+ with:
+ generate_release_notes: true
+ files: dist/*
diff --git a/.gitignore b/.gitignore
index b0639c2..5eaba4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -119,6 +119,7 @@ dmypy.json
.tool-versions
_sandbox/
+bin/
*_profile
Untitled.ipynb
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..d25dc18
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,1200 @@
+
+# [v1.2.0](https://github.com/thombashi/pytablewriter/releases/tag/v1.2.0) - 2023-10-08
+
+- Add `enable_style_filter` method and `disable_style_filter` method to writer classes
+- Add `check_style_filter_kwargs` method to the `Theme` class
+- Add `pytablewriter-altcol-theme` to theme extras
+- Add `margin` support to the `CssTableWriter` class
+- Add support for Python 3.12
+- Modify the style filter to be applicable to table headers: [#37](https://github.com/thombashi/pytablewriter/issues/37) (Thanks to [@shawalli](https://github.com/shawalli))
+- Change the `add_col_separator_style_filter` method that raises `NotImplementedError` to debug-log output
+- Improve discovery of pytablewriter plugins
+- Bump minimum required version of `typepy` to 1.3.2
+- Fix `margin`, `stream`, and `style_filter_kwargs` to be propagated correctly in `from_writer` method
+ - Fix the output of `HtmlTableWriter.write_table` method when the method called with `write_css=True`
+- Fix an issue where the CSS output would be incorrect if the `HtmlTableWriter.write_table` method was called with `write_css=True` when `table_name` was not specified
+- Fix style applying for headers of `CssTableWriter` writer class
+- Fix type annotations
+
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v1.1.0...v1.2.0
+
+[Changes][v1.2.0]
+
+
+
+# [v1.1.0](https://github.com/thombashi/pytablewriter/releases/tag/v1.1.0) - 2023-09-24
+
+- Add color support for GFM to `MarkdownTableWriter` class
+- Add `FontStyle.TYPEWRITER`
+- Add styles supported by Latex writers
+ - `Style.fg_color`
+ - `Style.decoration_line`: `DecorationLine.STRIKE`, `DecorationLine.LINE_THROUGH`
+ - `Style.decoration_line`: `DecorationLine.UNDERLINE`
+- Add warnings for when invalid style attributes are passed to the Style class
+- Modify the output format of Latex table writers
+- Improve type annotations
+- Fix Excel worksheet name generation
+- Bump minimum required version of `DataProperty` to 1.0.1
+
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v1.0.0...v1.1.0
+
+[Changes][v1.1.0]
+
+
+
+# [v1.0.0](https://github.com/thombashi/pytablewriter/releases/tag/v1.0.0) - 2023-06-25
+
+- Add support for Python 3.11
+- Drop support for Python 3.6
+- Fix a regular expression range of LatexWriter: [#57](https://github.com/thombashi/pytablewriter/issues/57)
+- Add support for Elasticsearch 8
+- Drop support for Elasticsearch 7
+- Reduce import time for non-pandas use
+- Update `pathvalidate` dependency to allow v3
+- Bump minimum version requirement of `SimpleSQLite`
+- Improve type annotations
+- Add `zip_safe=False`
+- Change the `Cell` class to an immutable data class
+- Update docs
+- Replace deprecated `setup.py` calls
+- Add `pandas` extras
+- Add `__all__` to `__init__.py`
+- Remove deprecated functions and properties
+ - `dump_tabledata`
+ - `set_log_level`
+ - `AbstractTableWriter.header_list`
+ - `AbstractTableWriter.type_hint_list`
+ - `AbstractTableWriter.styles`
+ - `AbstractTableWriter.style_list`
+ - `AbstractTableWriter.value_preprocessor.setter`
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v0.64.2...v1.0.0
+
+[Changes][v1.0.0]
+
+
+
+# [v0.64.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.64.2) - 2022-03-21
+
+- Fix to `thousand_separator` of `default_style` not properly applied: [#55](https://github.com/thombashi/pytablewriter/issues/55) (Thanks to [@riklopfer](https://github.com/riklopfer))
+- Add support for `PyYAML` v7
+- Avoid installation error with `setuptools>=58`
+- Modify type annotations:
+ - `default_style` property
+ - `StyleFilterFunc.__call__` method
+ - `ColSeparatorStyleFilterFunc.__call__` method
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v0.64.1...v0.64.2
+
+
+[Changes][v0.64.2]
+
+
+
+# [v0.64.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.64.1) - 2021-10-17
+
+- Fix write failed when the inputs include `dict` values: [#52](https://github.com/thombashi/pytablewriter/issues/52) (Thanks to [@rutsam](https://github.com/rutsam))
+- Improve write performance
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v0.64.0...v0.64.1
+
+
+[Changes][v0.64.1]
+
+
+
+# [v0.64.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.64.0) - 2021-10-02
+
+- Modify to accept `deuote` keyword argument at writer class constructors: [#51](https://github.com/thombashi/pytablewriter/issues/51) (Thanks to [@andormarkus](https://github.com/andormarkus))
+- Make it possible to specify type hints by strings
+
+
+[Changes][v0.64.0]
+
+
+
+# [v0.63.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.63.0) - 2021-09-20
+
+- Add `max_precision` argument to writer class constructors: [#44](https://github.com/thombashi/pytablewriter/issues/44)
+- Improve output precision of real numbers: [#44](https://github.com/thombashi/pytablewriter/issues/44)
+- Remove trailing whitespace when table does not have a name [#46](https://github.com/thombashi/pytablewriter/issues/46) (Thanks to [@movermeyer](https://github.com/movermeyer))
+- Fix AsciiDoc table header output: [#47](https://github.com/thombashi/pytablewriter/issues/47) (Thanks to [@jvdvegt](https://github.com/jvdvegt))
+- Fix to dequote in cells properly: [#49](https://github.com/thombashi/pytablewriter/issues/49) (Thanks to [@hugovk](https://github.com/hugovk))
+- Modify to accept type hints by strings as well
+- Add `CodeQL` analysis
+- Add type annotations
+- Allow `XlsxWriter` v3
+- Add `setup-ci` target to Makefile
+
+
+[Changes][v0.63.0]
+
+
+
+# [v0.62.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.62.0) - 2021-07-18
+
+- Add support for `CommonMark` as a flavor for `MarkdownTableWriter` class
+- Add support for `kramdown`/`Jeklly` as a flavor for `MarkdownTableWriter` class
+- Add support styles(`fg_color`, `bg_color`, `font_weight`, `font_style`) for `AsciiDocTableWriter` class
+- Add `table_style` for `MediaWikiTableWriter`: [#43](https://github.com/thombashi/pytablewriter/issues/43)
+- Add `overwrite_type_hints` argument to `from_dataframe` method
+- Add types to `pytablewirter.typehint`
+- Add support for string with thousand separators as integer: [#44](https://github.com/thombashi/pytablewriter/issues/44)
+- Add support for string with thousand separators as integer
+- Made it possible to set `flavor` as a keyword argument of `MarkdownTableWriter` constructor
+- Fix to `flavor` keyword argument properly applied when executing `write_table` method at the second time
+- Change to just output warning instead of raising exception when `set_theme` method failed
+- Improve error messages when a theme not found
+- Improve output precision of numbers: [#44](https://github.com/thombashi/pytablewriter/issues/44)
+ - This may increase output decimal places of real numbers compared to the previous versions
+- Remove an unused class
+
+
+[Changes][v0.62.0]
+
+
+
+# [v0.61.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.61.0) - 2021-06-16
+
+- Add an alias for `Style.color` as `Style.fg_color`
+- Make it possible to set `theme` via writer class constructors
+- Make it possible to initialize writer from `dataframe` via writer class constructors
+- Fix comparison of `Style.__eq__` method
+- Fix CSS output of `HtmlTableWriter.write_table` method when `write_css=True`
+- Vendoring `msgfy` package
+
+
+[Changes][v0.61.0]
+
+
+
+# [v0.60.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.60.0) - 2021-05-12
+
+- Add support for AsciiDoc format
+- Add format name `ssv` for `SpaceAlignedTableWriter` class
+- Make it possible to set `write_callback` via writer class constructors
+- Fix format attributes of `UNICODE`/`BOLD_UNICODE` enums
+- Remove `es5`/`es6` from `extras_require`
+
+
+[Changes][v0.60.0]
+
+
+
+# [v0.59.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.59.0) - 2021-05-04
+
+- Add support for Python 3.10
+- Drop support for Python 3.5
+- Markdown alignment cells respect `margin` [#36](https://github.com/thombashi/pytablewriter/issues/36) (Thanks to [@shawalli](https://github.com/shawalli))
+- Add validation to margin setter
+- Make it possible to set more writer settings via writer class constructors
+- Forced to set margin to zero for CSV/sourcecode writer classes
+- Fix `_repr_html_` method to properly apply writer settings
+- Fix to `margin` value setting changes are properly applied after written a table
+- Modify type annotations
+- Update requirements
+
+
+[Changes][v0.59.0]
+
+
+
+# [v0.58.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.58.0) - 2020-08-30
+
+- Add `PandasDataFramePickleWriter` class
+- Add support for keyword arguments initialization to `TableWriterFactory` instantiation
+- Fix initialization by keyword arguments of writer class constructor
+- Remove deprecated properties
+
+
+[Changes][v0.58.0]
+
+
+
+# [v0.57.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.57.0) - 2020-08-22
+
+- Add `table_format` property to writer classes
+- Add `clear_theme` method to writer classes
+- Add `TableFormat.from_file_extension` class method
+- Make it possible to initialize writer instance with constructor
+- Fix plugin discovery to avoid errors when some of the functions not implemented
+- Fix the case that style filters are not properly applied
+
+
+[Changes][v0.57.0]
+
+
+
+# [v0.56.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.56.1) - 2020-08-16
+
+- Add ``theme`` extras
+
+
+[Changes][v0.56.1]
+
+
+
+# [v0.56.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.56.0) - 2020-08-16
+
+- Add `set_theme`/`list_themes` functions to writer classes
+- Add `es` extras
+- Implement `__repr__` method for text writer classes
+- Modify pytest stream detection
+- Modify not to raise an error when input data is empty
+- Fix to properly propagate `max_workers` value to a dependency package
+- Update requirements
+
+
+[Changes][v0.56.0]
+
+
+
+# [v0.55.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.55.0) - 2020-07-26
+
+- Add `enable_ansi_escape` attribute to writer classes: [#30](https://github.com/thombashi/pytablewriter/issues/30) (Thanks to [@calebstewart](https://github.com/calebstewart))
+- Add `update` method to Style class
+- Modify to disable ANSI escapes during `dump` method execution
+- Modify type annotations for `dump` method
+- Fix to propagate `enable_ansi_escape`/`colorize_terminal` at `_repr_html_` method
+- Fix `colorize_terminal` to clear preprocess data when the value changed
+- Update requirements
+
+
+[Changes][v0.55.0]
+
+
+
+# [v0.54.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.54.0) - 2020-05-16
+
+- Add `kwargs` to `dump` method of writer classes
+- Add `indent` keyword argument support for `write_table`/`dump`/`dumps` methods
+- Add `sort_keys` keyword argument support for `write_table`/`dump`/`dumps` method of JSON writer classes
+- Changes to accept list of dict as value_matrix for JSON table writer classes
+- Change the default indent level of `JsonTableWriter` class
+- Fix output of `JsonLinesTableWriter` for `None` values
+- Modify output format of `JsonTableWriter.write_table` method
+- Remove `EmptyHeaderError`
+- Update requirements
+
+
+[Changes][v0.54.0]
+
+
+
+# [v0.53.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.53.0) - 2020-05-10
+
+- Add GitHub Flavored Markdown support
+- Add DecorationLine support as a style
+- Add `is_header_row` method to `Cell` class
+- Modify type annotations
+
+
+[Changes][v0.53.0]
+
+
+
+# [v0.52.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.52.0) - 2020-05-05
+
+- Add `YamlTableWriter` writer class
+- Add `Cell` class
+- Add `style_filter_kwargs` attribute to writer classes
+- Add `pytablewriter.typehint` module
+- Add color support with style
+- Make it possible to apply style filter to column separators
+- Make it possible to apply part of the style filter to headers
+- Make it configurable header row crosspoint characters for text format writer classes
+- Make "sort_keys" not True by default [#15](https://github.com/thombashi/pytablewriter/issues/15) (Thanks to [@Zackhardtoname](https://github.com/Zackhardtoname))
+- Change to convert `None` values for Style class constructor arguments to default values.
+- Improve an error message: [#26](https://github.com/thombashi/pytablewriter/issues/26) (Thanks to [@hugovk](https://github.com/hugovk))
+- Change signatures of `StyleFilterFunc`
+- Change `max_workers` attribute default value to 1
+- Allow non ascii characters for JSON formats
+- Fix changing chars for text format tables not properly applied due to initialization order
+- Fix `TomlTableWriter` not properly rendered when including `Decimal` values
+- Fix `from_tabledata` method not properly propagate `table_name` when the value is None
+- Fix `__repr__` method of `Style` class
+- Fix style filter to properly apply align
+- Update requirements
+- Minor bug fixes
+
+
+[Changes][v0.52.0]
+
+
+
+# [v0.51.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.51.0) - 2020-04-12
+
+- Add `BoldUnicodeTableWriter` class
+- Add `BorderlessTableWriter` class
+- Add underscore support for thousand separators
+- Add `TableFormat.from_name` class method
+- Add `from_writer` method to writers
+- Add vertical align to style (only for `HtmlTableWriter`): [#13](https://github.com/thombashi/pytablewriter/issues/13) (Thanks to [@jimkohl](https://github.com/jimkohl))
+- Add `write_css` argument add an interface to write CSS with `HtmlTableWriter`: [#16](https://github.com/thombashi/pytablewriter/issues/16) (Thanks to [@domino-blake](https://github.com/domino-blake))
+- Add `AbstractTableWriter` class to public paths
+- Add margin property to `AbstractTableWriter` class to avoid lint errors
+- Make it possible to apply styles to headers
+- Fix to properly apply align for `HtmlTableWriter`
+- Make style filter applicable to `HtmlTableWriter`
+- Add `CssTableWriter` class
+- Fix to include `py.typed` to the package
+- Modify type annotations
+- Increase priority of the `xlsx` format within `TableFormat`
+- Change the default `table_name` value to an empty string
+- Update requirements
+- Minor bug fixes
+
+
+[Changes][v0.51.0]
+
+
+
+# [v0.50.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.50.0) - 2020-02-24
+
+- Add `add_style_filter` method to writers
+- Add type annotations and `py.typed` to the package
+- Minor bug fixes
+
+
+[Changes][v0.50.0]
+
+
+
+# [v0.49.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.49.0) - 2020-02-17
+
+- Add `max_workers` property to writers
+- Add validation for `default_style` setter
+- Change `_font_size_map` to cache
+
+
+[Changes][v0.49.0]
+
+
+
+# [v0.48.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.48.0) - 2020-02-16
+
+- Drop Python 2 support: [#24](https://github.com/thombashi/pytablewriter/issues/24) (Thanks to [@hugovk](https://github.com/hugovk))
+- Add support for Python 3.9
+- Add support for platforms that lacks support `sem_open` such as Android Termux
+- Add `default_style` to writers
+- Add `update_preprocessor` method to writers
+- Fix backward compatibility with getting `pandas.DataFrame`: [#25](https://github.com/thombashi/pytablewriter/issues/25) (Thanks to [@hugovk](https://github.com/hugovk) )
+- Replace the logging library from `Logbook` to `loguru`
+- Remove deprecated methods/properties
+- Remove `dev` extras_require
+- Rename a property from `styles` to `column_styles`
+
+[Changes][v0.48.0]
+
+
+
+# [v0.47.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.47.0) - 2020-02-05
+
+- Add support for escape formula injection: [#20](https://github.com/thombashi/pytablewriter/issues/20) (Thanks to [@randomstuff](https://github.com/randomstuff))
+ - for CSV/Excel writers
+- Replace line breaks to `
` tag for HTML table writer: [#22](https://github.com/thombashi/pytablewriter/issues/22) (Thanks to [@kesyog](https://github.com/kesyog))
+- Modify to replace line breaks separately
+
+
+[Changes][v0.47.0]
+
+
+
+# [v0.46.3](https://github.com/thombashi/pytablewriter/releases/tag/v0.46.3) - 2020-01-13
+
+- Add support for PyPy
+- Add `es7` extras
+- Integrate `release` and `build` extras to `dev` extras
+- Update requirements
+
+
+[Changes][v0.46.3]
+
+
+
+# [v0.46.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.46.0) - 2019-05-05
+
+- Drop support for `Python 3.4`
+- Add deb package to PPA
+- Loosen some of the external dependencies version restriction
+- Bug fixes
+
+[Changes][v0.46.0]
+
+
+
+# [v0.45.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.45.1) - 2019-04-20
+
+- Fix improper type hints behavior for SQLite table writer: [#12](https://github.com/thombashi/pytablewriter/issues/12) (Thanks to [@smcat8](https://github.com/smcat8))
+
+[Changes][v0.45.1]
+
+
+
+# [v0.45.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.45.0) - 2019-03-16
+
+- Add `UnicodeTableWriter` class
+- Bug fixes
+- Do not install on Python 3.3: [#11](https://github.com/thombashi/pytablewriter/issues/11) (Thanks to [@hugovk](https://github.com/hugovk))
+
+[Changes][v0.45.0]
+
+
+
+# [v0.44.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.44.0) - 2019-02-18
+
+- Add `pandas.DataFrame` pickle support for `from_dataframe` method
+- Add `from_series` method
+- Bug fixes
+
+
+[Changes][v0.44.0]
+
+
+
+# [v0.43.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.43.1) - 2019-02-11
+
+- Improve processing performance
+- Suppress excessive DeprecationWarning
+
+[Changes][v0.43.1]
+
+
+
+# [v0.43.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.43.0) - 2019-02-11
+
+- Improve processing performance
+- Add `add_index_column` argument to `from_dataframe`
+- Add `register_trans_func` method
+- Rename properties:
+ - from `type_hint_list` to `type_hints`
+ - from `header_list` to `headers`
+ - from `style_list` to `styles`
+- Remove `value_map` property
+
+
+[Changes][v0.43.0]
+
+
+
+# [v0.42.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.42.0) - 2019-01-27
+
+- Add `trans_func` property
+- Change to forbid to assign a `stream` to binary writers
+- Change to be more informative when optional packages not installed
+- Bug fixes
+
+[Changes][v0.42.0]
+
+
+
+# [v0.41.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.41.2) - 2019-01-14
+
+- Fix missing `extras_require` for `html` (Thanks to [@hugovk](https://github.com/hugovk))
+
+[Changes][v0.41.2]
+
+
+
+# [v0.41.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.41.1) - 2019-01-14
+
+- Fix the case that changing styles by using `set_style` not properly applied
+- Fix `__repr__`/`__eq__` method for `Style` class
+- Avoid closing ipykernel OutStream
+- Bug fixes
+
+[Changes][v0.41.1]
+
+
+
+# [v0.41.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.41.0) - 2019-01-13
+
+- Add `dump` method to writers
+- Add support for italic style
+- Add `is_opened` method to binary writers
+- Fix to apply styles for `_repr_html_` method
+- Avoid overwriting the stream when executing `dumps` method
+- Loosen external package dependencies
+ - Change HTML writer to an extra require
+- Bug fixes
+
+[Changes][v0.41.0]
+
+
+
+# [v0.40.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.40.1) - 2019-01-09
+
+- Fix Excel writers failed to write
+
+[Changes][v0.40.1]
+
+
+
+# [v0.40.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.40.0) - 2019-01-07
+
+- Add `set_style` method to writers
+- Add `value_map` attribute to writers
+- Improve precision of column ASCII char width calculation
+- Suppress applying styles when the value is null
+- Bug fixes
+
+
+[Changes][v0.40.0]
+
+
+
+# [v0.39.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.39.0) - 2019-01-06
+
+- Add support for `Style` to ReStructuredText writers
+- Bug fixes
+
+[Changes][v0.39.0]
+
+
+
+# [v0.38.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.38.0) - 2019-01-02
+
+- Change to accept string values for the `line_break_handling` attribute of writers
+- Change `is_write_null_line_after_table` default value of writers from `True` to `False`
+- Change `dump_tabledata` function to pass arguments to writer
+
+
+[Changes][v0.38.0]
+
+
+
+# [v0.37.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.37.0) - 2019-01-02
+
+- Add `align`/`thousand_separator`/`font_weight` to Style
+- Add `line_break_handling` attribute to writers
+- Bug fixes
+
+
+[Changes][v0.37.0]
+
+
+
+# [v0.36.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.36.1) - 2018-11-25
+
+- Add `all` to `extras_require` that enable install all of the extra dependency packages at once
+- Fix to avoid executing writers constructor when importing `pytablewriter`
+
+[Changes][v0.36.1]
+
+
+
+# [v0.36.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.36.0) - 2018-10-13
+
+- Add support for ANSI escape sequences to text writers: [#6](https://github.com/thombashi/pytablewriter/issues/6) (Thanks to [@hugovk](https://github.com/hugovk))
+
+
+[Changes][v0.36.0]
+
+
+
+# [v0.35.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.35.0) - 2018-10-10
+
+- Loosen external package dependencies
+
+[Changes][v0.35.0]
+
+
+
+# [v0.34.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.34.0) - 2018-10-07
+
+- Add `style_list` attribute to writers as an interface to set styles of columns: [#4](https://github.com/thombashi/pytablewriter/issues/4) (thanks to [@jpiter](https://github.com/jpiter))
+- Loosen external package dependencies
+- Bug fixes
+
+[Changes][v0.34.0]
+
+
+
+# [v0.33.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.33.0) - 2018-09-30
+
+- Add `format_list` attribute to set float formatting in a table: [#4](https://github.com/thombashi/pytablewriter/issues/4) (Thanks to [@hugovk](https://github.com/hugovk))
+- Improve processing performance
+- Enable float formatting in default with `SpaceAlignedTableWriter`
+- Bug fixes
+
+[Changes][v0.33.0]
+
+
+
+# [v0.32.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.32.0) - 2018-09-17
+
+- Add `dumps` method that returns rendered tabular text: [#3](https://github.com/thombashi/pytablewriter/issues/3) (Thanks to [@nettrino](https://github.com/nettrino))
+
+
+[Changes][v0.32.0]
+
+
+
+# [v0.31.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.31.0) - 2018-07-22
+
+- Add an interface to set alignment for each column of the output table: [#2](https://github.com/thombashi/pytablewriter/issues/2) (Thanks to [@jpoa](https://github.com/jpoa))
+
+
+[Changes][v0.31.0]
+
+
+
+# [v0.30.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.30.1) - 2018-07-15
+
+- Add support for Python 3.7
+- Bug fixes
+
+[Changes][v0.30.1]
+
+
+
+# [v0.30.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.30.0) - 2018-06-25
+
+- Add support for LDJSON/JSON Lines/NDJSON
+- Bug fixes
+
+[Changes][v0.30.0]
+
+
+
+# [v0.29.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.29.0) - 2018-06-10
+
+- Add interface to escape HTML tags in cells in a table
+- Add `from_tablib` method
+- Bug fixes
+
+
+[Changes][v0.29.0]
+
+
+
+# [v0.28.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.28.1) - 2018-05-05
+
+- Fix the case that margins not properly worked
+- Loosen external package dependencies
+
+
+[Changes][v0.28.1]
+
+
+
+# [v0.28.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.28.0) - 2018-04-22
+
+- Add an interface to set margin for both sides of each cell for text format writer classes
+- Bug fixes
+
+[Changes][v0.28.0]
+
+
+
+# [v0.27.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.27.2) - 2018-01-01
+
+- The type detected from the `str` values has been changed from `string` type (deprecated since Elasticsearch 5.x) to `text`/`keyword` type
+
+
+[Changes][v0.27.2]
+
+
+
+# [v0.27.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.27.1) - 2017-11-20
+
+- Fix the improper write output, which occurred when executing `from_tabledata` and `write_table` multiple times consecutively.
+
+[Changes][v0.27.1]
+
+
+
+# [v0.27.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.27.0) - 2017-11-19
+
+- Performance improvement
+
+[Changes][v0.27.0]
+
+
+
+# [v0.26.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.26.1) - 2017-11-19
+
+- Fix package dependency
+
+[Changes][v0.26.1]
+
+
+
+# [v0.26.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.26.0) - 2017-11-12
+
+- Performance improvement
+- Loosen package dependency
+- Bug fixes
+
+[Changes][v0.26.0]
+
+
+
+# [v0.25.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.25.0) - 2017-11-04
+
+- Improve performance for multi-core environments
+- Change Latex output to insert padding to align columns
+- Fix improper column width calculation for the case that includes mixed value types in a column
+- Drop support for Python 3.3
+
+
+[Changes][v0.25.0]
+
+
+
+# [v0.24.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.24.1) - 2017-10-29
+
+- Modify Latex output to optimize for Jupyter Notebook
+- Suppress excessive quote output for Excel sheets
+
+
+[Changes][v0.24.1]
+
+
+
+# [v0.24.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.24.0) - 2017-08-20
+
+- Add support for Jupyter Notebook
+
+[Changes][v0.24.0]
+
+
+
+# [v0.23.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.23.1) - 2017-07-31
+
+- Add escape processing for vertical bar characters in Markdown table items to get consistent rendering result
+
+[Changes][v0.23.1]
+
+
+
+# [v0.23.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.23.0) - 2017-07-23
+
+- Add a table writer class for space aligned values
+- Add default headers for Markdown/SQLite table writers that used when headers are null
+- Change to preserve spaces in table items
+- Change to remove line breaks from headers for text table formats
+- Make headers are not mandatory for Pandas writer
+- Modify Markdown output format to get more consistent rendering result
+- Improve output consistency for SQLite
+
+
+[Changes][v0.23.0]
+
+
+
+# [v0.22.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.22.0) - 2017-07-15
+
+- Add support for LaTeX table/matrix
+- Improve real number output precision.for CSV/JSON/LTSV/TOML/TSV
+
+
+[Changes][v0.22.0]
+
+
+
+# [v0.21.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.21.0) - 2017-07-02
+
+- Add `NumPy` writer class
+- Add `search_table_format` method to `TableFormat` class
+- Add attributes to pandas writer class: `import_pandas_as`/`import_numpy_as` to specify import name
+- Modify to sanitize `Elasticsearch` index name
+- Bug fixes
+
+
+[Changes][v0.21.0]
+
+
+
+# [v0.20.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.20.2) - 2017-06-29
+
+- Fix the case that incorrect write result when matrix which has uniform size for each row
+
+[Changes][v0.20.2]
+
+
+
+# [v0.20.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.20.0) - 2017-06-25
+
+- Add support for Elasticsearch
+- Simplify pandas dataframe output
+- Change to accept non string values as headers
+- Modify log messages
+- Bug fixes
+
+[Changes][v0.20.0]
+
+
+
+# [v0.19.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.19.1) - 2017-05-03
+
+- Change to write a blank line after writing a text format table
+
+
+[Changes][v0.19.1]
+
+
+
+# [v0.19.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.19.0) - 2017-05-02
+
+- Add SQLite writer
+- Improve processing performance
+- Bug fixes
+
+
+[Changes][v0.19.0]
+
+
+
+# [v0.17.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.17.0) - 2017-01-08
+
+- Add type hint interface to writer classes
+- Improve data type detection
+- Add `get_variable_name` method to source code writers to provide an interface that retrieves variable names to be written
+- Add an interface to change variable declaration type to `JavaScriptTableWriter` class
+ - Change default variable declaration type from `var` to `const`
+
+
+[Changes][v0.17.0]
+
+
+
+# [v0.16.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.16.0) - 2016-12-30
+
+- Add `TOML` format support
+- Add `tabledata` property
+- Change to all of the source code table writers are required table name
+- Improve multibyte character support
+- Bug fixes
+
+
+[Changes][v0.16.0]
+
+
+
+# [v0.15.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.15.0) - 2016-12-23
+
+- Add `TSV`/`LTSV` support
+- Add `dump_tabledata` function
+- Bug fixes
+
+
+[Changes][v0.15.0]
+
+
+
+# [v0.14.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.14.0) - 2016-12-10
+
+- Add `from_csv` method
+- Improve multi-byte character support
+- Bug fixes
+
+
+[Changes][v0.14.0]
+
+
+
+# [v0.13.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.13.0) - 2016-11-27
+
+- Add pandas DataFrame as a data source
+- Improve multi-byte character support
+
+
+[Changes][v0.13.0]
+
+
+
+# [v0.12.6](https://github.com/thombashi/pytablewriter/releases/tag/v0.12.6) - 2016-11-20
+
+- Support multi-byte string formatting
+- Bug fixes
+
+
+[Changes][v0.12.6]
+
+
+
+# [v0.12.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.12.0) - 2016-10-30
+
+- Add writer factory
+- Bug fixes
+
+
+[Changes][v0.12.0]
+
+
+
+# [v0.10.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.10.2) - 2016-08-10
+
+- Bug fixes
+
+
+[Changes][v0.10.2]
+
+
+
+# [v0.10.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.10.1) - 2016-08-07
+
+- Fix iterative table write
+
+
+[Changes][v0.10.1]
+
+
+
+# [v0.10.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.10.0) - 2016-08-07
+
+- Modify to support the iterative table write with PandasDataFrameWriter class
+- Add a switch that write datetime instance formatting to PythonCodeTableWriter/PandasDataFrameWriter
+- Bug fixes
+
+
+[Changes][v0.10.0]
+
+
+
+# [v0.9.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.9.0) - 2016-07-31
+
+- Modify error handling of the write_table_iter method
+
+
+[Changes][v0.9.0]
+
+
+
+# [v0.8.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.8.2) - 2016-07-28
+
+- Improve memory efficiency for Python 2
+
+
+[Changes][v0.8.2]
+
+
+
+# [v0.8.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.8.0) - 2016-07-23
+
+- Add MediaWiki format support
+- Add writing table with iteration
+- Add flag to switch writing format of datetime values as date-time instance or string
+- Modify to write will be succeeded when the table header is null
+- Bug fixes
+
+
+[Changes][v0.8.0]
+
+
+
+# [v0.7.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.7.0) - 2016-07-17
+
+- Add support for iteration write
+- Fix for the case that excel sheet name includes invalid character(s)
+- Minor bug fixes
+
+
+[Changes][v0.7.0]
+
+
+
+# [v0.6.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.6.0) - 2016-07-16
+
+- Add support for `.xls` file format: l: Thanks to [@yegorich](https://github.com/yegorich)
+
+
+[Changes][v0.6.0]
+
+
+
+# [v0.5.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.5.0) - 2016-07-10
+
+- Split is_quote_str property to is_quote_header property and is_quote_table property
+- Modify default datetime format string
+- Fix: For float value formatting apply condition
+- Fix: An exception is not correctly handled
+
+
+[Changes][v0.5.0]
+
+
+
+# [v0.4.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.4.0) - 2016-07-09
+
+- Modification for support Decimal: Thanks to [@yegorich](https://github.com/yegorich)
+- Minor bug fixes
+
+
+[Changes][v0.4.0]
+
+
+
+# [v0.3.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.3.0) - 2016-07-04
+
+- Add is_float_formatting property
+- Fix conversion error when writing data that a version string (such as "3.3.5"): Thanks to [@yegorich](https://github.com/yegorich)
+
+
+[Changes][v0.3.0]
+
+
+
+# [v0.2.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.2.1) - 2016-07-03
+
+
+
+[Changes][v0.2.1]
+
+
+
+# [v0.2.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.2.0) - 2016-07-03
+
+- Add support for:
+ - bool type
+ - Infinity value
+ - Not a Number
+
+
+[Changes][v0.2.0]
+
+
+
+# [v0.1.6](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.6) - 2016-06-19
+
+- Make pytest-runner a conditional requirement
+
+
+[Changes][v0.1.6]
+
+
+
+# [v0.1.4](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.4) - 2016-05-30
+
+- Fix: PythonCodeTableWriter was written `None` as string (`"None"`). [`cfdf591daf`](https://github.com/thombashi/pytablewriter/commit/cfdf591dafaff0576426a3bda215ed298313563d)
+- Fix: PandasDataFrameWriter is not properly write a table. [`9b82a9715a`](https://github.com/thombashi/pytablewriter/commit/9b82a9715a7566a0db7b404558c2ecb7ca8bbff7)
+- Change: write null string when a value in a table is None. [`cfdf591daf`](https://github.com/thombashi/pytablewriter/commit/cfdf591dafaff0576426a3bda215ed298313563d)
+
+
+[Changes][v0.1.4]
+
+
+
+# [v0.1.3](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.3) - 2016-05-29
+
+- Fix: converting `None` value to `null` with JavaScriptTableWriter and JsonTableWriter classes
+
+
+[Changes][v0.1.3]
+
+
+
+# [v0.1.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.2) - 2016-05-29
+
+- Fix variable name output: [`9a4f264354`](https://github.com/thombashi/pytablewriter/commit/9a4f264354de508d2e91648755a8903362533575)
+
+
+[Changes][v0.1.2]
+
+
+
+# [v0.1.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.0) - 2016-05-23
+
+
+
+[Changes][v0.1.0]
+
+
+[v1.2.0]: https://github.com/thombashi/pytablewriter/compare/v1.1.0...v1.2.0
+[v1.1.0]: https://github.com/thombashi/pytablewriter/compare/v1.0.0...v1.1.0
+[v1.0.0]: https://github.com/thombashi/pytablewriter/compare/v0.64.2...v1.0.0
+[v0.64.2]: https://github.com/thombashi/pytablewriter/compare/v0.64.1...v0.64.2
+[v0.64.1]: https://github.com/thombashi/pytablewriter/compare/v0.64.0...v0.64.1
+[v0.64.0]: https://github.com/thombashi/pytablewriter/compare/v0.63.0...v0.64.0
+[v0.63.0]: https://github.com/thombashi/pytablewriter/compare/v0.62.0...v0.63.0
+[v0.62.0]: https://github.com/thombashi/pytablewriter/compare/v0.61.0...v0.62.0
+[v0.61.0]: https://github.com/thombashi/pytablewriter/compare/v0.60.0...v0.61.0
+[v0.60.0]: https://github.com/thombashi/pytablewriter/compare/v0.59.0...v0.60.0
+[v0.59.0]: https://github.com/thombashi/pytablewriter/compare/v0.58.0...v0.59.0
+[v0.58.0]: https://github.com/thombashi/pytablewriter/compare/v0.57.0...v0.58.0
+[v0.57.0]: https://github.com/thombashi/pytablewriter/compare/v0.56.1...v0.57.0
+[v0.56.1]: https://github.com/thombashi/pytablewriter/compare/v0.56.0...v0.56.1
+[v0.56.0]: https://github.com/thombashi/pytablewriter/compare/v0.55.0...v0.56.0
+[v0.55.0]: https://github.com/thombashi/pytablewriter/compare/v0.54.0...v0.55.0
+[v0.54.0]: https://github.com/thombashi/pytablewriter/compare/v0.53.0...v0.54.0
+[v0.53.0]: https://github.com/thombashi/pytablewriter/compare/v0.52.0...v0.53.0
+[v0.52.0]: https://github.com/thombashi/pytablewriter/compare/v0.51.0...v0.52.0
+[v0.51.0]: https://github.com/thombashi/pytablewriter/compare/v0.50.0...v0.51.0
+[v0.50.0]: https://github.com/thombashi/pytablewriter/compare/v0.49.0...v0.50.0
+[v0.49.0]: https://github.com/thombashi/pytablewriter/compare/v0.48.0...v0.49.0
+[v0.48.0]: https://github.com/thombashi/pytablewriter/compare/v0.47.0...v0.48.0
+[v0.47.0]: https://github.com/thombashi/pytablewriter/compare/v0.46.3...v0.47.0
+[v0.46.3]: https://github.com/thombashi/pytablewriter/compare/v0.46.0...v0.46.3
+[v0.46.0]: https://github.com/thombashi/pytablewriter/compare/v0.45.1...v0.46.0
+[v0.45.1]: https://github.com/thombashi/pytablewriter/compare/v0.45.0...v0.45.1
+[v0.45.0]: https://github.com/thombashi/pytablewriter/compare/v0.44.0...v0.45.0
+[v0.44.0]: https://github.com/thombashi/pytablewriter/compare/v0.43.1...v0.44.0
+[v0.43.1]: https://github.com/thombashi/pytablewriter/compare/v0.43.0...v0.43.1
+[v0.43.0]: https://github.com/thombashi/pytablewriter/compare/v0.42.0...v0.43.0
+[v0.42.0]: https://github.com/thombashi/pytablewriter/compare/v0.41.2...v0.42.0
+[v0.41.2]: https://github.com/thombashi/pytablewriter/compare/v0.41.1...v0.41.2
+[v0.41.1]: https://github.com/thombashi/pytablewriter/compare/v0.41.0...v0.41.1
+[v0.41.0]: https://github.com/thombashi/pytablewriter/compare/v0.40.1...v0.41.0
+[v0.40.1]: https://github.com/thombashi/pytablewriter/compare/v0.40.0...v0.40.1
+[v0.40.0]: https://github.com/thombashi/pytablewriter/compare/v0.39.0...v0.40.0
+[v0.39.0]: https://github.com/thombashi/pytablewriter/compare/v0.38.0...v0.39.0
+[v0.38.0]: https://github.com/thombashi/pytablewriter/compare/v0.37.0...v0.38.0
+[v0.37.0]: https://github.com/thombashi/pytablewriter/compare/v0.36.1...v0.37.0
+[v0.36.1]: https://github.com/thombashi/pytablewriter/compare/v0.36.0...v0.36.1
+[v0.36.0]: https://github.com/thombashi/pytablewriter/compare/v0.35.0...v0.36.0
+[v0.35.0]: https://github.com/thombashi/pytablewriter/compare/v0.34.0...v0.35.0
+[v0.34.0]: https://github.com/thombashi/pytablewriter/compare/v0.33.0...v0.34.0
+[v0.33.0]: https://github.com/thombashi/pytablewriter/compare/v0.32.0...v0.33.0
+[v0.32.0]: https://github.com/thombashi/pytablewriter/compare/v0.31.0...v0.32.0
+[v0.31.0]: https://github.com/thombashi/pytablewriter/compare/v0.30.1...v0.31.0
+[v0.30.1]: https://github.com/thombashi/pytablewriter/compare/v0.30.0...v0.30.1
+[v0.30.0]: https://github.com/thombashi/pytablewriter/compare/v0.29.0...v0.30.0
+[v0.29.0]: https://github.com/thombashi/pytablewriter/compare/v0.28.1...v0.29.0
+[v0.28.1]: https://github.com/thombashi/pytablewriter/compare/v0.28.0...v0.28.1
+[v0.28.0]: https://github.com/thombashi/pytablewriter/compare/v0.27.2...v0.28.0
+[v0.27.2]: https://github.com/thombashi/pytablewriter/compare/v0.27.1...v0.27.2
+[v0.27.1]: https://github.com/thombashi/pytablewriter/compare/v0.27.0...v0.27.1
+[v0.27.0]: https://github.com/thombashi/pytablewriter/compare/v0.26.1...v0.27.0
+[v0.26.1]: https://github.com/thombashi/pytablewriter/compare/v0.26.0...v0.26.1
+[v0.26.0]: https://github.com/thombashi/pytablewriter/compare/v0.25.0...v0.26.0
+[v0.25.0]: https://github.com/thombashi/pytablewriter/compare/v0.24.1...v0.25.0
+[v0.24.1]: https://github.com/thombashi/pytablewriter/compare/v0.24.0...v0.24.1
+[v0.24.0]: https://github.com/thombashi/pytablewriter/compare/v0.23.1...v0.24.0
+[v0.23.1]: https://github.com/thombashi/pytablewriter/compare/v0.23.0...v0.23.1
+[v0.23.0]: https://github.com/thombashi/pytablewriter/compare/v0.22.0...v0.23.0
+[v0.22.0]: https://github.com/thombashi/pytablewriter/compare/v0.21.0...v0.22.0
+[v0.21.0]: https://github.com/thombashi/pytablewriter/compare/v0.20.2...v0.21.0
+[v0.20.2]: https://github.com/thombashi/pytablewriter/compare/v0.20.0...v0.20.2
+[v0.20.0]: https://github.com/thombashi/pytablewriter/compare/v0.19.1...v0.20.0
+[v0.19.1]: https://github.com/thombashi/pytablewriter/compare/v0.19.0...v0.19.1
+[v0.19.0]: https://github.com/thombashi/pytablewriter/compare/v0.17.0...v0.19.0
+[v0.17.0]: https://github.com/thombashi/pytablewriter/compare/v0.16.0...v0.17.0
+[v0.16.0]: https://github.com/thombashi/pytablewriter/compare/v0.15.0...v0.16.0
+[v0.15.0]: https://github.com/thombashi/pytablewriter/compare/v0.14.0...v0.15.0
+[v0.14.0]: https://github.com/thombashi/pytablewriter/compare/v0.13.0...v0.14.0
+[v0.13.0]: https://github.com/thombashi/pytablewriter/compare/v0.12.6...v0.13.0
+[v0.12.6]: https://github.com/thombashi/pytablewriter/compare/v0.12.0...v0.12.6
+[v0.12.0]: https://github.com/thombashi/pytablewriter/compare/v0.10.2...v0.12.0
+[v0.10.2]: https://github.com/thombashi/pytablewriter/compare/v0.10.1...v0.10.2
+[v0.10.1]: https://github.com/thombashi/pytablewriter/compare/v0.10.0...v0.10.1
+[v0.10.0]: https://github.com/thombashi/pytablewriter/compare/v0.9.0...v0.10.0
+[v0.9.0]: https://github.com/thombashi/pytablewriter/compare/v0.8.2...v0.9.0
+[v0.8.2]: https://github.com/thombashi/pytablewriter/compare/v0.8.0...v0.8.2
+[v0.8.0]: https://github.com/thombashi/pytablewriter/compare/v0.7.0...v0.8.0
+[v0.7.0]: https://github.com/thombashi/pytablewriter/compare/v0.6.0...v0.7.0
+[v0.6.0]: https://github.com/thombashi/pytablewriter/compare/v0.5.0...v0.6.0
+[v0.5.0]: https://github.com/thombashi/pytablewriter/compare/v0.4.0...v0.5.0
+[v0.4.0]: https://github.com/thombashi/pytablewriter/compare/v0.3.0...v0.4.0
+[v0.3.0]: https://github.com/thombashi/pytablewriter/compare/v0.2.1...v0.3.0
+[v0.2.1]: https://github.com/thombashi/pytablewriter/compare/v0.2.0...v0.2.1
+[v0.2.0]: https://github.com/thombashi/pytablewriter/compare/v0.1.6...v0.2.0
+[v0.1.6]: https://github.com/thombashi/pytablewriter/compare/v0.1.4...v0.1.6
+[v0.1.4]: https://github.com/thombashi/pytablewriter/compare/v0.1.3...v0.1.4
+[v0.1.3]: https://github.com/thombashi/pytablewriter/compare/v0.1.2...v0.1.3
+[v0.1.2]: https://github.com/thombashi/pytablewriter/compare/v0.1.0...v0.1.2
+[v0.1.0]: https://github.com/thombashi/pytablewriter/tree/v0.1.0
+
+
diff --git a/LICENSE b/LICENSE
index 268c00e..3e3c2f9 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2016 Tsuyoshi Hombashi
+Copyright (c) 2016-2025 Tsuyoshi Hombashi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/Makefile b/Makefile
index 53f11c6..600a6cb 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,9 @@ PYTHON := python3
ACTIONLINT_VERSION := v1.6.9
SHELLCHECK_VERSION := v0.8.0
-AUTHOR := thombashi
PACKAGE := pytablewriter
+BIN_DIR := $(shell pwd)/bin
DOCS_DIR := docs
BUILD_WORK_DIR := _work
PKG_BUILD_DIR := $(BUILD_WORK_DIR)/$(PACKAGE)
@@ -15,6 +15,15 @@ PKG_CACHE_ROOT_DIR := $(HOME)/.cache/downloaded
PKG_CACHE_DIR := $(PKG_CACHE_ROOT_DIR)/$(CACHE_VERSION)
SHELLCHECK_CACHE_DIR := $(PKG_CACHE_DIR)/shellcheck-$(SHELLCHECK_VERSION)
+AUTHOR := Tsuyoshi Hombashi
+FIRST_RELEASE_YEAR := 2016
+LAST_UPDATE_YEAR := $(shell git log -1 --format=%cd --date=format:%Y)
+
+
+BIN_CHANGELOG_FROM_RELEASE := $(BIN_DIR)/changelog-from-release
+$(BIN_CHANGELOG_FROM_RELEASE):
+ mkdir -p $(BIN_DIR)
+ GOBIN=$(BIN_DIR) go install github.com/rhysd/changelog-from-release/v3@latest
$(SHELLCHECK_CACHE_DIR):
@echo "installing shellcheck $(SHELLCHECK_VERSION)"
@@ -31,7 +40,7 @@ actionlint: setup-actionlint
build-remote: clean
@mkdir -p $(BUILD_WORK_DIR)
@cd $(BUILD_WORK_DIR) && \
- git clone https://github.com/$(AUTHOR)/$(PACKAGE).git --depth 1 && \
+ git clone https://github.com/thombashi/$(PACKAGE).git --depth 1 && \
cd $(PACKAGE) && \
$(PYTHON) -m tox -e build
ls -lh $(PKG_BUILD_DIR)/dist/*
@@ -41,6 +50,11 @@ build: clean
@$(PYTHON) -m tox -e build
ls -lh dist/*
+.PHONY: changelog
+changelog: $(BIN_CHANGELOG_FROM_RELEASE)
+ $(BIN_CHANGELOG_FROM_RELEASE) > CHANGELOG.md
+ cp -a CHANGELOG.md docs/pages/CHANGELOG.md
+
.PHONY: check
check:
$(PYTHON) -m tox -e lint
@@ -98,3 +112,8 @@ test:
.PHONY: test-py
test-py:
$(PYTHON) -m tox -e py
+
+.PHONY: update-copyright
+update-copyright:
+ sed -i "s/f\"Copyright .*/f\"Copyright $(FIRST_RELEASE_YEAR)-$(LAST_UPDATE_YEAR), {__author__}\"/" $(PACKAGE)/__version__.py
+ sed -i "s/^Copyright (c) .* $(AUTHOR)/Copyright (c) $(FIRST_RELEASE_YEAR)-$(LAST_UPDATE_YEAR) $(AUTHOR)/" LICENSE
diff --git a/docs/pages/CHANGELOG.md b/docs/pages/CHANGELOG.md
new file mode 100644
index 0000000..d25dc18
--- /dev/null
+++ b/docs/pages/CHANGELOG.md
@@ -0,0 +1,1200 @@
+
+# [v1.2.0](https://github.com/thombashi/pytablewriter/releases/tag/v1.2.0) - 2023-10-08
+
+- Add `enable_style_filter` method and `disable_style_filter` method to writer classes
+- Add `check_style_filter_kwargs` method to the `Theme` class
+- Add `pytablewriter-altcol-theme` to theme extras
+- Add `margin` support to the `CssTableWriter` class
+- Add support for Python 3.12
+- Modify the style filter to be applicable to table headers: [#37](https://github.com/thombashi/pytablewriter/issues/37) (Thanks to [@shawalli](https://github.com/shawalli))
+- Change the `add_col_separator_style_filter` method that raises `NotImplementedError` to debug-log output
+- Improve discovery of pytablewriter plugins
+- Bump minimum required version of `typepy` to 1.3.2
+- Fix `margin`, `stream`, and `style_filter_kwargs` to be propagated correctly in `from_writer` method
+ - Fix the output of `HtmlTableWriter.write_table` method when the method called with `write_css=True`
+- Fix an issue where the CSS output would be incorrect if the `HtmlTableWriter.write_table` method was called with `write_css=True` when `table_name` was not specified
+- Fix style applying for headers of `CssTableWriter` writer class
+- Fix type annotations
+
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v1.1.0...v1.2.0
+
+[Changes][v1.2.0]
+
+
+
+# [v1.1.0](https://github.com/thombashi/pytablewriter/releases/tag/v1.1.0) - 2023-09-24
+
+- Add color support for GFM to `MarkdownTableWriter` class
+- Add `FontStyle.TYPEWRITER`
+- Add styles supported by Latex writers
+ - `Style.fg_color`
+ - `Style.decoration_line`: `DecorationLine.STRIKE`, `DecorationLine.LINE_THROUGH`
+ - `Style.decoration_line`: `DecorationLine.UNDERLINE`
+- Add warnings for when invalid style attributes are passed to the Style class
+- Modify the output format of Latex table writers
+- Improve type annotations
+- Fix Excel worksheet name generation
+- Bump minimum required version of `DataProperty` to 1.0.1
+
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v1.0.0...v1.1.0
+
+[Changes][v1.1.0]
+
+
+
+# [v1.0.0](https://github.com/thombashi/pytablewriter/releases/tag/v1.0.0) - 2023-06-25
+
+- Add support for Python 3.11
+- Drop support for Python 3.6
+- Fix a regular expression range of LatexWriter: [#57](https://github.com/thombashi/pytablewriter/issues/57)
+- Add support for Elasticsearch 8
+- Drop support for Elasticsearch 7
+- Reduce import time for non-pandas use
+- Update `pathvalidate` dependency to allow v3
+- Bump minimum version requirement of `SimpleSQLite`
+- Improve type annotations
+- Add `zip_safe=False`
+- Change the `Cell` class to an immutable data class
+- Update docs
+- Replace deprecated `setup.py` calls
+- Add `pandas` extras
+- Add `__all__` to `__init__.py`
+- Remove deprecated functions and properties
+ - `dump_tabledata`
+ - `set_log_level`
+ - `AbstractTableWriter.header_list`
+ - `AbstractTableWriter.type_hint_list`
+ - `AbstractTableWriter.styles`
+ - `AbstractTableWriter.style_list`
+ - `AbstractTableWriter.value_preprocessor.setter`
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v0.64.2...v1.0.0
+
+[Changes][v1.0.0]
+
+
+
+# [v0.64.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.64.2) - 2022-03-21
+
+- Fix to `thousand_separator` of `default_style` not properly applied: [#55](https://github.com/thombashi/pytablewriter/issues/55) (Thanks to [@riklopfer](https://github.com/riklopfer))
+- Add support for `PyYAML` v7
+- Avoid installation error with `setuptools>=58`
+- Modify type annotations:
+ - `default_style` property
+ - `StyleFilterFunc.__call__` method
+ - `ColSeparatorStyleFilterFunc.__call__` method
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v0.64.1...v0.64.2
+
+
+[Changes][v0.64.2]
+
+
+
+# [v0.64.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.64.1) - 2021-10-17
+
+- Fix write failed when the inputs include `dict` values: [#52](https://github.com/thombashi/pytablewriter/issues/52) (Thanks to [@rutsam](https://github.com/rutsam))
+- Improve write performance
+
+**Full Changelog**: https://github.com/thombashi/pytablewriter/compare/v0.64.0...v0.64.1
+
+
+[Changes][v0.64.1]
+
+
+
+# [v0.64.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.64.0) - 2021-10-02
+
+- Modify to accept `deuote` keyword argument at writer class constructors: [#51](https://github.com/thombashi/pytablewriter/issues/51) (Thanks to [@andormarkus](https://github.com/andormarkus))
+- Make it possible to specify type hints by strings
+
+
+[Changes][v0.64.0]
+
+
+
+# [v0.63.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.63.0) - 2021-09-20
+
+- Add `max_precision` argument to writer class constructors: [#44](https://github.com/thombashi/pytablewriter/issues/44)
+- Improve output precision of real numbers: [#44](https://github.com/thombashi/pytablewriter/issues/44)
+- Remove trailing whitespace when table does not have a name [#46](https://github.com/thombashi/pytablewriter/issues/46) (Thanks to [@movermeyer](https://github.com/movermeyer))
+- Fix AsciiDoc table header output: [#47](https://github.com/thombashi/pytablewriter/issues/47) (Thanks to [@jvdvegt](https://github.com/jvdvegt))
+- Fix to dequote in cells properly: [#49](https://github.com/thombashi/pytablewriter/issues/49) (Thanks to [@hugovk](https://github.com/hugovk))
+- Modify to accept type hints by strings as well
+- Add `CodeQL` analysis
+- Add type annotations
+- Allow `XlsxWriter` v3
+- Add `setup-ci` target to Makefile
+
+
+[Changes][v0.63.0]
+
+
+
+# [v0.62.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.62.0) - 2021-07-18
+
+- Add support for `CommonMark` as a flavor for `MarkdownTableWriter` class
+- Add support for `kramdown`/`Jeklly` as a flavor for `MarkdownTableWriter` class
+- Add support styles(`fg_color`, `bg_color`, `font_weight`, `font_style`) for `AsciiDocTableWriter` class
+- Add `table_style` for `MediaWikiTableWriter`: [#43](https://github.com/thombashi/pytablewriter/issues/43)
+- Add `overwrite_type_hints` argument to `from_dataframe` method
+- Add types to `pytablewirter.typehint`
+- Add support for string with thousand separators as integer: [#44](https://github.com/thombashi/pytablewriter/issues/44)
+- Add support for string with thousand separators as integer
+- Made it possible to set `flavor` as a keyword argument of `MarkdownTableWriter` constructor
+- Fix to `flavor` keyword argument properly applied when executing `write_table` method at the second time
+- Change to just output warning instead of raising exception when `set_theme` method failed
+- Improve error messages when a theme not found
+- Improve output precision of numbers: [#44](https://github.com/thombashi/pytablewriter/issues/44)
+ - This may increase output decimal places of real numbers compared to the previous versions
+- Remove an unused class
+
+
+[Changes][v0.62.0]
+
+
+
+# [v0.61.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.61.0) - 2021-06-16
+
+- Add an alias for `Style.color` as `Style.fg_color`
+- Make it possible to set `theme` via writer class constructors
+- Make it possible to initialize writer from `dataframe` via writer class constructors
+- Fix comparison of `Style.__eq__` method
+- Fix CSS output of `HtmlTableWriter.write_table` method when `write_css=True`
+- Vendoring `msgfy` package
+
+
+[Changes][v0.61.0]
+
+
+
+# [v0.60.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.60.0) - 2021-05-12
+
+- Add support for AsciiDoc format
+- Add format name `ssv` for `SpaceAlignedTableWriter` class
+- Make it possible to set `write_callback` via writer class constructors
+- Fix format attributes of `UNICODE`/`BOLD_UNICODE` enums
+- Remove `es5`/`es6` from `extras_require`
+
+
+[Changes][v0.60.0]
+
+
+
+# [v0.59.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.59.0) - 2021-05-04
+
+- Add support for Python 3.10
+- Drop support for Python 3.5
+- Markdown alignment cells respect `margin` [#36](https://github.com/thombashi/pytablewriter/issues/36) (Thanks to [@shawalli](https://github.com/shawalli))
+- Add validation to margin setter
+- Make it possible to set more writer settings via writer class constructors
+- Forced to set margin to zero for CSV/sourcecode writer classes
+- Fix `_repr_html_` method to properly apply writer settings
+- Fix to `margin` value setting changes are properly applied after written a table
+- Modify type annotations
+- Update requirements
+
+
+[Changes][v0.59.0]
+
+
+
+# [v0.58.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.58.0) - 2020-08-30
+
+- Add `PandasDataFramePickleWriter` class
+- Add support for keyword arguments initialization to `TableWriterFactory` instantiation
+- Fix initialization by keyword arguments of writer class constructor
+- Remove deprecated properties
+
+
+[Changes][v0.58.0]
+
+
+
+# [v0.57.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.57.0) - 2020-08-22
+
+- Add `table_format` property to writer classes
+- Add `clear_theme` method to writer classes
+- Add `TableFormat.from_file_extension` class method
+- Make it possible to initialize writer instance with constructor
+- Fix plugin discovery to avoid errors when some of the functions not implemented
+- Fix the case that style filters are not properly applied
+
+
+[Changes][v0.57.0]
+
+
+
+# [v0.56.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.56.1) - 2020-08-16
+
+- Add ``theme`` extras
+
+
+[Changes][v0.56.1]
+
+
+
+# [v0.56.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.56.0) - 2020-08-16
+
+- Add `set_theme`/`list_themes` functions to writer classes
+- Add `es` extras
+- Implement `__repr__` method for text writer classes
+- Modify pytest stream detection
+- Modify not to raise an error when input data is empty
+- Fix to properly propagate `max_workers` value to a dependency package
+- Update requirements
+
+
+[Changes][v0.56.0]
+
+
+
+# [v0.55.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.55.0) - 2020-07-26
+
+- Add `enable_ansi_escape` attribute to writer classes: [#30](https://github.com/thombashi/pytablewriter/issues/30) (Thanks to [@calebstewart](https://github.com/calebstewart))
+- Add `update` method to Style class
+- Modify to disable ANSI escapes during `dump` method execution
+- Modify type annotations for `dump` method
+- Fix to propagate `enable_ansi_escape`/`colorize_terminal` at `_repr_html_` method
+- Fix `colorize_terminal` to clear preprocess data when the value changed
+- Update requirements
+
+
+[Changes][v0.55.0]
+
+
+
+# [v0.54.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.54.0) - 2020-05-16
+
+- Add `kwargs` to `dump` method of writer classes
+- Add `indent` keyword argument support for `write_table`/`dump`/`dumps` methods
+- Add `sort_keys` keyword argument support for `write_table`/`dump`/`dumps` method of JSON writer classes
+- Changes to accept list of dict as value_matrix for JSON table writer classes
+- Change the default indent level of `JsonTableWriter` class
+- Fix output of `JsonLinesTableWriter` for `None` values
+- Modify output format of `JsonTableWriter.write_table` method
+- Remove `EmptyHeaderError`
+- Update requirements
+
+
+[Changes][v0.54.0]
+
+
+
+# [v0.53.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.53.0) - 2020-05-10
+
+- Add GitHub Flavored Markdown support
+- Add DecorationLine support as a style
+- Add `is_header_row` method to `Cell` class
+- Modify type annotations
+
+
+[Changes][v0.53.0]
+
+
+
+# [v0.52.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.52.0) - 2020-05-05
+
+- Add `YamlTableWriter` writer class
+- Add `Cell` class
+- Add `style_filter_kwargs` attribute to writer classes
+- Add `pytablewriter.typehint` module
+- Add color support with style
+- Make it possible to apply style filter to column separators
+- Make it possible to apply part of the style filter to headers
+- Make it configurable header row crosspoint characters for text format writer classes
+- Make "sort_keys" not True by default [#15](https://github.com/thombashi/pytablewriter/issues/15) (Thanks to [@Zackhardtoname](https://github.com/Zackhardtoname))
+- Change to convert `None` values for Style class constructor arguments to default values.
+- Improve an error message: [#26](https://github.com/thombashi/pytablewriter/issues/26) (Thanks to [@hugovk](https://github.com/hugovk))
+- Change signatures of `StyleFilterFunc`
+- Change `max_workers` attribute default value to 1
+- Allow non ascii characters for JSON formats
+- Fix changing chars for text format tables not properly applied due to initialization order
+- Fix `TomlTableWriter` not properly rendered when including `Decimal` values
+- Fix `from_tabledata` method not properly propagate `table_name` when the value is None
+- Fix `__repr__` method of `Style` class
+- Fix style filter to properly apply align
+- Update requirements
+- Minor bug fixes
+
+
+[Changes][v0.52.0]
+
+
+
+# [v0.51.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.51.0) - 2020-04-12
+
+- Add `BoldUnicodeTableWriter` class
+- Add `BorderlessTableWriter` class
+- Add underscore support for thousand separators
+- Add `TableFormat.from_name` class method
+- Add `from_writer` method to writers
+- Add vertical align to style (only for `HtmlTableWriter`): [#13](https://github.com/thombashi/pytablewriter/issues/13) (Thanks to [@jimkohl](https://github.com/jimkohl))
+- Add `write_css` argument add an interface to write CSS with `HtmlTableWriter`: [#16](https://github.com/thombashi/pytablewriter/issues/16) (Thanks to [@domino-blake](https://github.com/domino-blake))
+- Add `AbstractTableWriter` class to public paths
+- Add margin property to `AbstractTableWriter` class to avoid lint errors
+- Make it possible to apply styles to headers
+- Fix to properly apply align for `HtmlTableWriter`
+- Make style filter applicable to `HtmlTableWriter`
+- Add `CssTableWriter` class
+- Fix to include `py.typed` to the package
+- Modify type annotations
+- Increase priority of the `xlsx` format within `TableFormat`
+- Change the default `table_name` value to an empty string
+- Update requirements
+- Minor bug fixes
+
+
+[Changes][v0.51.0]
+
+
+
+# [v0.50.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.50.0) - 2020-02-24
+
+- Add `add_style_filter` method to writers
+- Add type annotations and `py.typed` to the package
+- Minor bug fixes
+
+
+[Changes][v0.50.0]
+
+
+
+# [v0.49.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.49.0) - 2020-02-17
+
+- Add `max_workers` property to writers
+- Add validation for `default_style` setter
+- Change `_font_size_map` to cache
+
+
+[Changes][v0.49.0]
+
+
+
+# [v0.48.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.48.0) - 2020-02-16
+
+- Drop Python 2 support: [#24](https://github.com/thombashi/pytablewriter/issues/24) (Thanks to [@hugovk](https://github.com/hugovk))
+- Add support for Python 3.9
+- Add support for platforms that lacks support `sem_open` such as Android Termux
+- Add `default_style` to writers
+- Add `update_preprocessor` method to writers
+- Fix backward compatibility with getting `pandas.DataFrame`: [#25](https://github.com/thombashi/pytablewriter/issues/25) (Thanks to [@hugovk](https://github.com/hugovk) )
+- Replace the logging library from `Logbook` to `loguru`
+- Remove deprecated methods/properties
+- Remove `dev` extras_require
+- Rename a property from `styles` to `column_styles`
+
+[Changes][v0.48.0]
+
+
+
+# [v0.47.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.47.0) - 2020-02-05
+
+- Add support for escape formula injection: [#20](https://github.com/thombashi/pytablewriter/issues/20) (Thanks to [@randomstuff](https://github.com/randomstuff))
+ - for CSV/Excel writers
+- Replace line breaks to `
` tag for HTML table writer: [#22](https://github.com/thombashi/pytablewriter/issues/22) (Thanks to [@kesyog](https://github.com/kesyog))
+- Modify to replace line breaks separately
+
+
+[Changes][v0.47.0]
+
+
+
+# [v0.46.3](https://github.com/thombashi/pytablewriter/releases/tag/v0.46.3) - 2020-01-13
+
+- Add support for PyPy
+- Add `es7` extras
+- Integrate `release` and `build` extras to `dev` extras
+- Update requirements
+
+
+[Changes][v0.46.3]
+
+
+
+# [v0.46.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.46.0) - 2019-05-05
+
+- Drop support for `Python 3.4`
+- Add deb package to PPA
+- Loosen some of the external dependencies version restriction
+- Bug fixes
+
+[Changes][v0.46.0]
+
+
+
+# [v0.45.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.45.1) - 2019-04-20
+
+- Fix improper type hints behavior for SQLite table writer: [#12](https://github.com/thombashi/pytablewriter/issues/12) (Thanks to [@smcat8](https://github.com/smcat8))
+
+[Changes][v0.45.1]
+
+
+
+# [v0.45.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.45.0) - 2019-03-16
+
+- Add `UnicodeTableWriter` class
+- Bug fixes
+- Do not install on Python 3.3: [#11](https://github.com/thombashi/pytablewriter/issues/11) (Thanks to [@hugovk](https://github.com/hugovk))
+
+[Changes][v0.45.0]
+
+
+
+# [v0.44.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.44.0) - 2019-02-18
+
+- Add `pandas.DataFrame` pickle support for `from_dataframe` method
+- Add `from_series` method
+- Bug fixes
+
+
+[Changes][v0.44.0]
+
+
+
+# [v0.43.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.43.1) - 2019-02-11
+
+- Improve processing performance
+- Suppress excessive DeprecationWarning
+
+[Changes][v0.43.1]
+
+
+
+# [v0.43.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.43.0) - 2019-02-11
+
+- Improve processing performance
+- Add `add_index_column` argument to `from_dataframe`
+- Add `register_trans_func` method
+- Rename properties:
+ - from `type_hint_list` to `type_hints`
+ - from `header_list` to `headers`
+ - from `style_list` to `styles`
+- Remove `value_map` property
+
+
+[Changes][v0.43.0]
+
+
+
+# [v0.42.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.42.0) - 2019-01-27
+
+- Add `trans_func` property
+- Change to forbid to assign a `stream` to binary writers
+- Change to be more informative when optional packages not installed
+- Bug fixes
+
+[Changes][v0.42.0]
+
+
+
+# [v0.41.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.41.2) - 2019-01-14
+
+- Fix missing `extras_require` for `html` (Thanks to [@hugovk](https://github.com/hugovk))
+
+[Changes][v0.41.2]
+
+
+
+# [v0.41.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.41.1) - 2019-01-14
+
+- Fix the case that changing styles by using `set_style` not properly applied
+- Fix `__repr__`/`__eq__` method for `Style` class
+- Avoid closing ipykernel OutStream
+- Bug fixes
+
+[Changes][v0.41.1]
+
+
+
+# [v0.41.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.41.0) - 2019-01-13
+
+- Add `dump` method to writers
+- Add support for italic style
+- Add `is_opened` method to binary writers
+- Fix to apply styles for `_repr_html_` method
+- Avoid overwriting the stream when executing `dumps` method
+- Loosen external package dependencies
+ - Change HTML writer to an extra require
+- Bug fixes
+
+[Changes][v0.41.0]
+
+
+
+# [v0.40.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.40.1) - 2019-01-09
+
+- Fix Excel writers failed to write
+
+[Changes][v0.40.1]
+
+
+
+# [v0.40.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.40.0) - 2019-01-07
+
+- Add `set_style` method to writers
+- Add `value_map` attribute to writers
+- Improve precision of column ASCII char width calculation
+- Suppress applying styles when the value is null
+- Bug fixes
+
+
+[Changes][v0.40.0]
+
+
+
+# [v0.39.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.39.0) - 2019-01-06
+
+- Add support for `Style` to ReStructuredText writers
+- Bug fixes
+
+[Changes][v0.39.0]
+
+
+
+# [v0.38.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.38.0) - 2019-01-02
+
+- Change to accept string values for the `line_break_handling` attribute of writers
+- Change `is_write_null_line_after_table` default value of writers from `True` to `False`
+- Change `dump_tabledata` function to pass arguments to writer
+
+
+[Changes][v0.38.0]
+
+
+
+# [v0.37.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.37.0) - 2019-01-02
+
+- Add `align`/`thousand_separator`/`font_weight` to Style
+- Add `line_break_handling` attribute to writers
+- Bug fixes
+
+
+[Changes][v0.37.0]
+
+
+
+# [v0.36.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.36.1) - 2018-11-25
+
+- Add `all` to `extras_require` that enable install all of the extra dependency packages at once
+- Fix to avoid executing writers constructor when importing `pytablewriter`
+
+[Changes][v0.36.1]
+
+
+
+# [v0.36.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.36.0) - 2018-10-13
+
+- Add support for ANSI escape sequences to text writers: [#6](https://github.com/thombashi/pytablewriter/issues/6) (Thanks to [@hugovk](https://github.com/hugovk))
+
+
+[Changes][v0.36.0]
+
+
+
+# [v0.35.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.35.0) - 2018-10-10
+
+- Loosen external package dependencies
+
+[Changes][v0.35.0]
+
+
+
+# [v0.34.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.34.0) - 2018-10-07
+
+- Add `style_list` attribute to writers as an interface to set styles of columns: [#4](https://github.com/thombashi/pytablewriter/issues/4) (thanks to [@jpiter](https://github.com/jpiter))
+- Loosen external package dependencies
+- Bug fixes
+
+[Changes][v0.34.0]
+
+
+
+# [v0.33.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.33.0) - 2018-09-30
+
+- Add `format_list` attribute to set float formatting in a table: [#4](https://github.com/thombashi/pytablewriter/issues/4) (Thanks to [@hugovk](https://github.com/hugovk))
+- Improve processing performance
+- Enable float formatting in default with `SpaceAlignedTableWriter`
+- Bug fixes
+
+[Changes][v0.33.0]
+
+
+
+# [v0.32.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.32.0) - 2018-09-17
+
+- Add `dumps` method that returns rendered tabular text: [#3](https://github.com/thombashi/pytablewriter/issues/3) (Thanks to [@nettrino](https://github.com/nettrino))
+
+
+[Changes][v0.32.0]
+
+
+
+# [v0.31.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.31.0) - 2018-07-22
+
+- Add an interface to set alignment for each column of the output table: [#2](https://github.com/thombashi/pytablewriter/issues/2) (Thanks to [@jpoa](https://github.com/jpoa))
+
+
+[Changes][v0.31.0]
+
+
+
+# [v0.30.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.30.1) - 2018-07-15
+
+- Add support for Python 3.7
+- Bug fixes
+
+[Changes][v0.30.1]
+
+
+
+# [v0.30.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.30.0) - 2018-06-25
+
+- Add support for LDJSON/JSON Lines/NDJSON
+- Bug fixes
+
+[Changes][v0.30.0]
+
+
+
+# [v0.29.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.29.0) - 2018-06-10
+
+- Add interface to escape HTML tags in cells in a table
+- Add `from_tablib` method
+- Bug fixes
+
+
+[Changes][v0.29.0]
+
+
+
+# [v0.28.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.28.1) - 2018-05-05
+
+- Fix the case that margins not properly worked
+- Loosen external package dependencies
+
+
+[Changes][v0.28.1]
+
+
+
+# [v0.28.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.28.0) - 2018-04-22
+
+- Add an interface to set margin for both sides of each cell for text format writer classes
+- Bug fixes
+
+[Changes][v0.28.0]
+
+
+
+# [v0.27.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.27.2) - 2018-01-01
+
+- The type detected from the `str` values has been changed from `string` type (deprecated since Elasticsearch 5.x) to `text`/`keyword` type
+
+
+[Changes][v0.27.2]
+
+
+
+# [v0.27.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.27.1) - 2017-11-20
+
+- Fix the improper write output, which occurred when executing `from_tabledata` and `write_table` multiple times consecutively.
+
+[Changes][v0.27.1]
+
+
+
+# [v0.27.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.27.0) - 2017-11-19
+
+- Performance improvement
+
+[Changes][v0.27.0]
+
+
+
+# [v0.26.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.26.1) - 2017-11-19
+
+- Fix package dependency
+
+[Changes][v0.26.1]
+
+
+
+# [v0.26.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.26.0) - 2017-11-12
+
+- Performance improvement
+- Loosen package dependency
+- Bug fixes
+
+[Changes][v0.26.0]
+
+
+
+# [v0.25.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.25.0) - 2017-11-04
+
+- Improve performance for multi-core environments
+- Change Latex output to insert padding to align columns
+- Fix improper column width calculation for the case that includes mixed value types in a column
+- Drop support for Python 3.3
+
+
+[Changes][v0.25.0]
+
+
+
+# [v0.24.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.24.1) - 2017-10-29
+
+- Modify Latex output to optimize for Jupyter Notebook
+- Suppress excessive quote output for Excel sheets
+
+
+[Changes][v0.24.1]
+
+
+
+# [v0.24.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.24.0) - 2017-08-20
+
+- Add support for Jupyter Notebook
+
+[Changes][v0.24.0]
+
+
+
+# [v0.23.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.23.1) - 2017-07-31
+
+- Add escape processing for vertical bar characters in Markdown table items to get consistent rendering result
+
+[Changes][v0.23.1]
+
+
+
+# [v0.23.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.23.0) - 2017-07-23
+
+- Add a table writer class for space aligned values
+- Add default headers for Markdown/SQLite table writers that used when headers are null
+- Change to preserve spaces in table items
+- Change to remove line breaks from headers for text table formats
+- Make headers are not mandatory for Pandas writer
+- Modify Markdown output format to get more consistent rendering result
+- Improve output consistency for SQLite
+
+
+[Changes][v0.23.0]
+
+
+
+# [v0.22.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.22.0) - 2017-07-15
+
+- Add support for LaTeX table/matrix
+- Improve real number output precision.for CSV/JSON/LTSV/TOML/TSV
+
+
+[Changes][v0.22.0]
+
+
+
+# [v0.21.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.21.0) - 2017-07-02
+
+- Add `NumPy` writer class
+- Add `search_table_format` method to `TableFormat` class
+- Add attributes to pandas writer class: `import_pandas_as`/`import_numpy_as` to specify import name
+- Modify to sanitize `Elasticsearch` index name
+- Bug fixes
+
+
+[Changes][v0.21.0]
+
+
+
+# [v0.20.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.20.2) - 2017-06-29
+
+- Fix the case that incorrect write result when matrix which has uniform size for each row
+
+[Changes][v0.20.2]
+
+
+
+# [v0.20.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.20.0) - 2017-06-25
+
+- Add support for Elasticsearch
+- Simplify pandas dataframe output
+- Change to accept non string values as headers
+- Modify log messages
+- Bug fixes
+
+[Changes][v0.20.0]
+
+
+
+# [v0.19.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.19.1) - 2017-05-03
+
+- Change to write a blank line after writing a text format table
+
+
+[Changes][v0.19.1]
+
+
+
+# [v0.19.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.19.0) - 2017-05-02
+
+- Add SQLite writer
+- Improve processing performance
+- Bug fixes
+
+
+[Changes][v0.19.0]
+
+
+
+# [v0.17.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.17.0) - 2017-01-08
+
+- Add type hint interface to writer classes
+- Improve data type detection
+- Add `get_variable_name` method to source code writers to provide an interface that retrieves variable names to be written
+- Add an interface to change variable declaration type to `JavaScriptTableWriter` class
+ - Change default variable declaration type from `var` to `const`
+
+
+[Changes][v0.17.0]
+
+
+
+# [v0.16.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.16.0) - 2016-12-30
+
+- Add `TOML` format support
+- Add `tabledata` property
+- Change to all of the source code table writers are required table name
+- Improve multibyte character support
+- Bug fixes
+
+
+[Changes][v0.16.0]
+
+
+
+# [v0.15.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.15.0) - 2016-12-23
+
+- Add `TSV`/`LTSV` support
+- Add `dump_tabledata` function
+- Bug fixes
+
+
+[Changes][v0.15.0]
+
+
+
+# [v0.14.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.14.0) - 2016-12-10
+
+- Add `from_csv` method
+- Improve multi-byte character support
+- Bug fixes
+
+
+[Changes][v0.14.0]
+
+
+
+# [v0.13.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.13.0) - 2016-11-27
+
+- Add pandas DataFrame as a data source
+- Improve multi-byte character support
+
+
+[Changes][v0.13.0]
+
+
+
+# [v0.12.6](https://github.com/thombashi/pytablewriter/releases/tag/v0.12.6) - 2016-11-20
+
+- Support multi-byte string formatting
+- Bug fixes
+
+
+[Changes][v0.12.6]
+
+
+
+# [v0.12.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.12.0) - 2016-10-30
+
+- Add writer factory
+- Bug fixes
+
+
+[Changes][v0.12.0]
+
+
+
+# [v0.10.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.10.2) - 2016-08-10
+
+- Bug fixes
+
+
+[Changes][v0.10.2]
+
+
+
+# [v0.10.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.10.1) - 2016-08-07
+
+- Fix iterative table write
+
+
+[Changes][v0.10.1]
+
+
+
+# [v0.10.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.10.0) - 2016-08-07
+
+- Modify to support the iterative table write with PandasDataFrameWriter class
+- Add a switch that write datetime instance formatting to PythonCodeTableWriter/PandasDataFrameWriter
+- Bug fixes
+
+
+[Changes][v0.10.0]
+
+
+
+# [v0.9.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.9.0) - 2016-07-31
+
+- Modify error handling of the write_table_iter method
+
+
+[Changes][v0.9.0]
+
+
+
+# [v0.8.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.8.2) - 2016-07-28
+
+- Improve memory efficiency for Python 2
+
+
+[Changes][v0.8.2]
+
+
+
+# [v0.8.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.8.0) - 2016-07-23
+
+- Add MediaWiki format support
+- Add writing table with iteration
+- Add flag to switch writing format of datetime values as date-time instance or string
+- Modify to write will be succeeded when the table header is null
+- Bug fixes
+
+
+[Changes][v0.8.0]
+
+
+
+# [v0.7.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.7.0) - 2016-07-17
+
+- Add support for iteration write
+- Fix for the case that excel sheet name includes invalid character(s)
+- Minor bug fixes
+
+
+[Changes][v0.7.0]
+
+
+
+# [v0.6.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.6.0) - 2016-07-16
+
+- Add support for `.xls` file format: l: Thanks to [@yegorich](https://github.com/yegorich)
+
+
+[Changes][v0.6.0]
+
+
+
+# [v0.5.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.5.0) - 2016-07-10
+
+- Split is_quote_str property to is_quote_header property and is_quote_table property
+- Modify default datetime format string
+- Fix: For float value formatting apply condition
+- Fix: An exception is not correctly handled
+
+
+[Changes][v0.5.0]
+
+
+
+# [v0.4.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.4.0) - 2016-07-09
+
+- Modification for support Decimal: Thanks to [@yegorich](https://github.com/yegorich)
+- Minor bug fixes
+
+
+[Changes][v0.4.0]
+
+
+
+# [v0.3.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.3.0) - 2016-07-04
+
+- Add is_float_formatting property
+- Fix conversion error when writing data that a version string (such as "3.3.5"): Thanks to [@yegorich](https://github.com/yegorich)
+
+
+[Changes][v0.3.0]
+
+
+
+# [v0.2.1](https://github.com/thombashi/pytablewriter/releases/tag/v0.2.1) - 2016-07-03
+
+
+
+[Changes][v0.2.1]
+
+
+
+# [v0.2.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.2.0) - 2016-07-03
+
+- Add support for:
+ - bool type
+ - Infinity value
+ - Not a Number
+
+
+[Changes][v0.2.0]
+
+
+
+# [v0.1.6](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.6) - 2016-06-19
+
+- Make pytest-runner a conditional requirement
+
+
+[Changes][v0.1.6]
+
+
+
+# [v0.1.4](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.4) - 2016-05-30
+
+- Fix: PythonCodeTableWriter was written `None` as string (`"None"`). [`cfdf591daf`](https://github.com/thombashi/pytablewriter/commit/cfdf591dafaff0576426a3bda215ed298313563d)
+- Fix: PandasDataFrameWriter is not properly write a table. [`9b82a9715a`](https://github.com/thombashi/pytablewriter/commit/9b82a9715a7566a0db7b404558c2ecb7ca8bbff7)
+- Change: write null string when a value in a table is None. [`cfdf591daf`](https://github.com/thombashi/pytablewriter/commit/cfdf591dafaff0576426a3bda215ed298313563d)
+
+
+[Changes][v0.1.4]
+
+
+
+# [v0.1.3](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.3) - 2016-05-29
+
+- Fix: converting `None` value to `null` with JavaScriptTableWriter and JsonTableWriter classes
+
+
+[Changes][v0.1.3]
+
+
+
+# [v0.1.2](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.2) - 2016-05-29
+
+- Fix variable name output: [`9a4f264354`](https://github.com/thombashi/pytablewriter/commit/9a4f264354de508d2e91648755a8903362533575)
+
+
+[Changes][v0.1.2]
+
+
+
+# [v0.1.0](https://github.com/thombashi/pytablewriter/releases/tag/v0.1.0) - 2016-05-23
+
+
+
+[Changes][v0.1.0]
+
+
+[v1.2.0]: https://github.com/thombashi/pytablewriter/compare/v1.1.0...v1.2.0
+[v1.1.0]: https://github.com/thombashi/pytablewriter/compare/v1.0.0...v1.1.0
+[v1.0.0]: https://github.com/thombashi/pytablewriter/compare/v0.64.2...v1.0.0
+[v0.64.2]: https://github.com/thombashi/pytablewriter/compare/v0.64.1...v0.64.2
+[v0.64.1]: https://github.com/thombashi/pytablewriter/compare/v0.64.0...v0.64.1
+[v0.64.0]: https://github.com/thombashi/pytablewriter/compare/v0.63.0...v0.64.0
+[v0.63.0]: https://github.com/thombashi/pytablewriter/compare/v0.62.0...v0.63.0
+[v0.62.0]: https://github.com/thombashi/pytablewriter/compare/v0.61.0...v0.62.0
+[v0.61.0]: https://github.com/thombashi/pytablewriter/compare/v0.60.0...v0.61.0
+[v0.60.0]: https://github.com/thombashi/pytablewriter/compare/v0.59.0...v0.60.0
+[v0.59.0]: https://github.com/thombashi/pytablewriter/compare/v0.58.0...v0.59.0
+[v0.58.0]: https://github.com/thombashi/pytablewriter/compare/v0.57.0...v0.58.0
+[v0.57.0]: https://github.com/thombashi/pytablewriter/compare/v0.56.1...v0.57.0
+[v0.56.1]: https://github.com/thombashi/pytablewriter/compare/v0.56.0...v0.56.1
+[v0.56.0]: https://github.com/thombashi/pytablewriter/compare/v0.55.0...v0.56.0
+[v0.55.0]: https://github.com/thombashi/pytablewriter/compare/v0.54.0...v0.55.0
+[v0.54.0]: https://github.com/thombashi/pytablewriter/compare/v0.53.0...v0.54.0
+[v0.53.0]: https://github.com/thombashi/pytablewriter/compare/v0.52.0...v0.53.0
+[v0.52.0]: https://github.com/thombashi/pytablewriter/compare/v0.51.0...v0.52.0
+[v0.51.0]: https://github.com/thombashi/pytablewriter/compare/v0.50.0...v0.51.0
+[v0.50.0]: https://github.com/thombashi/pytablewriter/compare/v0.49.0...v0.50.0
+[v0.49.0]: https://github.com/thombashi/pytablewriter/compare/v0.48.0...v0.49.0
+[v0.48.0]: https://github.com/thombashi/pytablewriter/compare/v0.47.0...v0.48.0
+[v0.47.0]: https://github.com/thombashi/pytablewriter/compare/v0.46.3...v0.47.0
+[v0.46.3]: https://github.com/thombashi/pytablewriter/compare/v0.46.0...v0.46.3
+[v0.46.0]: https://github.com/thombashi/pytablewriter/compare/v0.45.1...v0.46.0
+[v0.45.1]: https://github.com/thombashi/pytablewriter/compare/v0.45.0...v0.45.1
+[v0.45.0]: https://github.com/thombashi/pytablewriter/compare/v0.44.0...v0.45.0
+[v0.44.0]: https://github.com/thombashi/pytablewriter/compare/v0.43.1...v0.44.0
+[v0.43.1]: https://github.com/thombashi/pytablewriter/compare/v0.43.0...v0.43.1
+[v0.43.0]: https://github.com/thombashi/pytablewriter/compare/v0.42.0...v0.43.0
+[v0.42.0]: https://github.com/thombashi/pytablewriter/compare/v0.41.2...v0.42.0
+[v0.41.2]: https://github.com/thombashi/pytablewriter/compare/v0.41.1...v0.41.2
+[v0.41.1]: https://github.com/thombashi/pytablewriter/compare/v0.41.0...v0.41.1
+[v0.41.0]: https://github.com/thombashi/pytablewriter/compare/v0.40.1...v0.41.0
+[v0.40.1]: https://github.com/thombashi/pytablewriter/compare/v0.40.0...v0.40.1
+[v0.40.0]: https://github.com/thombashi/pytablewriter/compare/v0.39.0...v0.40.0
+[v0.39.0]: https://github.com/thombashi/pytablewriter/compare/v0.38.0...v0.39.0
+[v0.38.0]: https://github.com/thombashi/pytablewriter/compare/v0.37.0...v0.38.0
+[v0.37.0]: https://github.com/thombashi/pytablewriter/compare/v0.36.1...v0.37.0
+[v0.36.1]: https://github.com/thombashi/pytablewriter/compare/v0.36.0...v0.36.1
+[v0.36.0]: https://github.com/thombashi/pytablewriter/compare/v0.35.0...v0.36.0
+[v0.35.0]: https://github.com/thombashi/pytablewriter/compare/v0.34.0...v0.35.0
+[v0.34.0]: https://github.com/thombashi/pytablewriter/compare/v0.33.0...v0.34.0
+[v0.33.0]: https://github.com/thombashi/pytablewriter/compare/v0.32.0...v0.33.0
+[v0.32.0]: https://github.com/thombashi/pytablewriter/compare/v0.31.0...v0.32.0
+[v0.31.0]: https://github.com/thombashi/pytablewriter/compare/v0.30.1...v0.31.0
+[v0.30.1]: https://github.com/thombashi/pytablewriter/compare/v0.30.0...v0.30.1
+[v0.30.0]: https://github.com/thombashi/pytablewriter/compare/v0.29.0...v0.30.0
+[v0.29.0]: https://github.com/thombashi/pytablewriter/compare/v0.28.1...v0.29.0
+[v0.28.1]: https://github.com/thombashi/pytablewriter/compare/v0.28.0...v0.28.1
+[v0.28.0]: https://github.com/thombashi/pytablewriter/compare/v0.27.2...v0.28.0
+[v0.27.2]: https://github.com/thombashi/pytablewriter/compare/v0.27.1...v0.27.2
+[v0.27.1]: https://github.com/thombashi/pytablewriter/compare/v0.27.0...v0.27.1
+[v0.27.0]: https://github.com/thombashi/pytablewriter/compare/v0.26.1...v0.27.0
+[v0.26.1]: https://github.com/thombashi/pytablewriter/compare/v0.26.0...v0.26.1
+[v0.26.0]: https://github.com/thombashi/pytablewriter/compare/v0.25.0...v0.26.0
+[v0.25.0]: https://github.com/thombashi/pytablewriter/compare/v0.24.1...v0.25.0
+[v0.24.1]: https://github.com/thombashi/pytablewriter/compare/v0.24.0...v0.24.1
+[v0.24.0]: https://github.com/thombashi/pytablewriter/compare/v0.23.1...v0.24.0
+[v0.23.1]: https://github.com/thombashi/pytablewriter/compare/v0.23.0...v0.23.1
+[v0.23.0]: https://github.com/thombashi/pytablewriter/compare/v0.22.0...v0.23.0
+[v0.22.0]: https://github.com/thombashi/pytablewriter/compare/v0.21.0...v0.22.0
+[v0.21.0]: https://github.com/thombashi/pytablewriter/compare/v0.20.2...v0.21.0
+[v0.20.2]: https://github.com/thombashi/pytablewriter/compare/v0.20.0...v0.20.2
+[v0.20.0]: https://github.com/thombashi/pytablewriter/compare/v0.19.1...v0.20.0
+[v0.19.1]: https://github.com/thombashi/pytablewriter/compare/v0.19.0...v0.19.1
+[v0.19.0]: https://github.com/thombashi/pytablewriter/compare/v0.17.0...v0.19.0
+[v0.17.0]: https://github.com/thombashi/pytablewriter/compare/v0.16.0...v0.17.0
+[v0.16.0]: https://github.com/thombashi/pytablewriter/compare/v0.15.0...v0.16.0
+[v0.15.0]: https://github.com/thombashi/pytablewriter/compare/v0.14.0...v0.15.0
+[v0.14.0]: https://github.com/thombashi/pytablewriter/compare/v0.13.0...v0.14.0
+[v0.13.0]: https://github.com/thombashi/pytablewriter/compare/v0.12.6...v0.13.0
+[v0.12.6]: https://github.com/thombashi/pytablewriter/compare/v0.12.0...v0.12.6
+[v0.12.0]: https://github.com/thombashi/pytablewriter/compare/v0.10.2...v0.12.0
+[v0.10.2]: https://github.com/thombashi/pytablewriter/compare/v0.10.1...v0.10.2
+[v0.10.1]: https://github.com/thombashi/pytablewriter/compare/v0.10.0...v0.10.1
+[v0.10.0]: https://github.com/thombashi/pytablewriter/compare/v0.9.0...v0.10.0
+[v0.9.0]: https://github.com/thombashi/pytablewriter/compare/v0.8.2...v0.9.0
+[v0.8.2]: https://github.com/thombashi/pytablewriter/compare/v0.8.0...v0.8.2
+[v0.8.0]: https://github.com/thombashi/pytablewriter/compare/v0.7.0...v0.8.0
+[v0.7.0]: https://github.com/thombashi/pytablewriter/compare/v0.6.0...v0.7.0
+[v0.6.0]: https://github.com/thombashi/pytablewriter/compare/v0.5.0...v0.6.0
+[v0.5.0]: https://github.com/thombashi/pytablewriter/compare/v0.4.0...v0.5.0
+[v0.4.0]: https://github.com/thombashi/pytablewriter/compare/v0.3.0...v0.4.0
+[v0.3.0]: https://github.com/thombashi/pytablewriter/compare/v0.2.1...v0.3.0
+[v0.2.1]: https://github.com/thombashi/pytablewriter/compare/v0.2.0...v0.2.1
+[v0.2.0]: https://github.com/thombashi/pytablewriter/compare/v0.1.6...v0.2.0
+[v0.1.6]: https://github.com/thombashi/pytablewriter/compare/v0.1.4...v0.1.6
+[v0.1.4]: https://github.com/thombashi/pytablewriter/compare/v0.1.3...v0.1.4
+[v0.1.3]: https://github.com/thombashi/pytablewriter/compare/v0.1.2...v0.1.3
+[v0.1.2]: https://github.com/thombashi/pytablewriter/compare/v0.1.0...v0.1.2
+[v0.1.0]: https://github.com/thombashi/pytablewriter/tree/v0.1.0
+
+
diff --git a/docs/pages/changelog_ref.rst b/docs/pages/changelog_ref.rst
new file mode 100644
index 0000000..05e0216
--- /dev/null
+++ b/docs/pages/changelog_ref.rst
@@ -0,0 +1,6 @@
+Changelog
+==================
+
+`Reference `__
+
+.. literalinclude:: CHANGELOG.md
diff --git a/docs/pages/sponsors.rst b/docs/pages/sponsors.rst
index 2cc4742..5c2067a 100644
--- a/docs/pages/sponsors.rst
+++ b/docs/pages/sponsors.rst
@@ -1,13 +1,21 @@
Sponsors
====================================
-.. image:: https://avatars.githubusercontent.com/u/44389260?s=48&u=6da7176e51ae2654bcfd22564772ef8a3bb22318&v=4
+|chasbecker| |shiguredo| |b4tman| |Arturi0| |github|
+
+.. |chasbecker| image:: https://avatars.githubusercontent.com/u/44389260?s=48&u=6da7176e51ae2654bcfd22564772ef8a3bb22318&v=4
:target: https://github.com/chasbecker
- :alt: Charles Becker (chasbecker)
-.. image:: https://avatars.githubusercontent.com/u/46711571?s=48&u=57687c0e02d5d6e8eeaf9177f7b7af4c9f275eb5&v=4
- :target: https://github.com/Arturi0
- :alt: onetime: Arturi0
-.. image:: https://avatars.githubusercontent.com/u/3658062?s=48&v=4
+ :alt: ex-sponsor: Charles Becker (chasbecker)
+.. |shiguredo| image:: https://avatars.githubusercontent.com/u/2549434?s=48&v=4
+ :target: https://github.com/shiguredo
+ :alt: ex-sponsor: 時雨堂 (shiguredo)
+.. |b4tman| image:: https://avatars.githubusercontent.com/u/3658062?s=48&v=4
:target: https://github.com/b4tman
:alt: onetime: Dmitry Belyaev (b4tman)
+.. |Arturi0| image:: https://avatars.githubusercontent.com/u/46711571?s=48&u=57687c0e02d5d6e8eeaf9177f7b7af4c9f275eb5&v=4
+ :target: https://github.com/Arturi0
+ :alt: onetime: Arturi0
+.. |github| image:: https://avatars.githubusercontent.com/u/9919?s=48&v=4
+ :target: https://github.com/github
+ :alt: onetime: GitHub (github)
`Become a sponsor `__
diff --git a/pytablewriter/__version__.py b/pytablewriter/__version__.py
index 6ed8c0e..3bb5282 100644
--- a/pytablewriter/__version__.py
+++ b/pytablewriter/__version__.py
@@ -1,6 +1,9 @@
-__author__ = "Tsuyoshi Hombashi"
-__copyright__ = f"Copyright 2016, {__author__}"
-__license__ = "MIT License"
+from typing import Final
+
+
+__author__: Final = "Tsuyoshi Hombashi"
+__copyright__: Final = f"Copyright 2016-2025, {__author__}"
+__license__: Final = "MIT License"
__version__ = "1.2.0"
-__maintainer__ = __author__
-__email__ = "tsuyoshi.hombashi@gmail.com"
+__maintainer__: Final = __author__
+__email__: Final = "tsuyoshi.hombashi@gmail.com"
diff --git a/pytablewriter/_factory.py b/pytablewriter/_factory.py
index 8f574d5..0244a1c 100644
--- a/pytablewriter/_factory.py
+++ b/pytablewriter/_factory.py
@@ -4,7 +4,7 @@
import os
from itertools import chain
-from typing import Any
+from typing import Any, Final
import typepy
@@ -66,7 +66,7 @@ def create_from_file_extension(cls, file_extension: str, **kwargs: Any) -> Abstr
|WriterNotFoundError_desc| the file extension.
"""
- ext = os.path.splitext(file_extension)[1]
+ ext: Final = os.path.splitext(file_extension)[1]
if typepy.is_null_string(ext):
file_extension = file_extension
else:
diff --git a/pytablewriter/_logger/_logger.py b/pytablewriter/_logger/_logger.py
index 9dff075..d75ed0b 100644
--- a/pytablewriter/_logger/_logger.py
+++ b/pytablewriter/_logger/_logger.py
@@ -2,7 +2,7 @@
.. codeauthor:: Tsuyoshi Hombashi
"""
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, Final
import dataproperty
from mbstrdecoder import MultiByteStrDecoder
@@ -13,7 +13,7 @@
if TYPE_CHECKING:
from ..writer import AbstractTableWriter
-MODULE_NAME = "pytablewriter"
+MODULE_NAME: Final = "pytablewriter"
try:
from loguru import logger
diff --git a/pytablewriter/sanitizer/_base.py b/pytablewriter/sanitizer/_base.py
index c73afb5..e1fddf7 100644
--- a/pytablewriter/sanitizer/_base.py
+++ b/pytablewriter/sanitizer/_base.py
@@ -5,6 +5,7 @@
import abc
import re
from re import Pattern
+from typing import Final
from pathvalidate.error import ErrorReason, ValidationError
from typepy import is_null_string
@@ -34,7 +35,7 @@ def sanitize(self, replacement_text: str = "") -> str:
var_name = self._invalid_var_name_re.sub(replacement_text, self._str)
# delete invalid char(s) in the beginning of the variable name
- is_require_remove_head = any(
+ is_require_remove_head: Final = any(
[
is_null_string(replacement_text),
self._invalid_var_name_head_re.search(replacement_text) is not None,
@@ -64,7 +65,7 @@ def sanitize(self, replacement_text: str = "") -> str:
def _validate(self, value: str) -> None:
self._validate_null_string(value)
- unicode_var_name = _preprocess(value)
+ unicode_var_name: Final = _preprocess(value)
if self._is_reserved_keyword(unicode_var_name):
raise ValidationError(
diff --git a/pytablewriter/sanitizer/_elasticsearch.py b/pytablewriter/sanitizer/_elasticsearch.py
index 9a29d9c..2a96d50 100644
--- a/pytablewriter/sanitizer/_elasticsearch.py
+++ b/pytablewriter/sanitizer/_elasticsearch.py
@@ -4,16 +4,16 @@
import re
from re import Pattern
-from typing import ClassVar
+from typing import Final
from ._base import VarNameSanitizer
class ElasticsearchIndexNameSanitizer(VarNameSanitizer):
- __RE_INVALID_INDEX_NAME: ClassVar[Pattern[str]] = re.compile(
+ __RE_INVALID_INDEX_NAME: Final[Pattern[str]] = re.compile(
"[" + re.escape('\\/*?"<>|,"') + r"\s]+"
)
- __RE_INVALID_INDEX_NAME_HEAD: ClassVar[Pattern[str]] = re.compile("^[_]+")
+ __RE_INVALID_INDEX_NAME_HEAD: Final[Pattern[str]] = re.compile("^[_]+")
@property
def reserved_keywords(self) -> list[str]:
diff --git a/pytablewriter/sanitizer/_excel.py b/pytablewriter/sanitizer/_excel.py
index cf5e096..be87fa3 100644
--- a/pytablewriter/sanitizer/_excel.py
+++ b/pytablewriter/sanitizer/_excel.py
@@ -3,6 +3,7 @@
"""
import re
+from typing import Final
from pathvalidate import validate_pathtype
from pathvalidate.error import ErrorReason, ValidationError
@@ -10,11 +11,13 @@
from ._base import _preprocess
-__MAX_SHEET_NAME_LEN = 31
+__MAX_SHEET_NAME_LEN: Final = 31
-__INVALID_EXCEL_CHARS = "[]:*?/\\"
+__INVALID_EXCEL_CHARS: Final = "[]:*?/\\"
-__RE_INVALID_EXCEL_SHEET_NAME = re.compile(f"[{re.escape(__INVALID_EXCEL_CHARS):s}]", re.UNICODE)
+__RE_INVALID_EXCEL_SHEET_NAME: Final = re.compile(
+ f"[{re.escape(__INVALID_EXCEL_CHARS):s}]", re.UNICODE
+)
def validate_excel_sheet_name(sheet_name: str) -> None:
diff --git a/pytablewriter/sanitizer/_javascript.py b/pytablewriter/sanitizer/_javascript.py
index 2877b50..5c761f8 100644
--- a/pytablewriter/sanitizer/_javascript.py
+++ b/pytablewriter/sanitizer/_javascript.py
@@ -4,12 +4,13 @@
import re
from re import Pattern
+from typing import Final
from ._base import VarNameSanitizer
class JavaScriptVarNameSanitizer(VarNameSanitizer):
- __JS_RESERVED_KEYWORDS_ES6 = [
+ __JS_RESERVED_KEYWORDS_ES6: Final = [
"break",
"case",
"catch",
@@ -44,7 +45,7 @@ class JavaScriptVarNameSanitizer(VarNameSanitizer):
"with",
"yield",
]
- __JS_RESERVED_KEYWORDS_FUTURE = [
+ __JS_RESERVED_KEYWORDS_FUTURE: Final = [
"enum",
"implements",
"interface",
@@ -72,10 +73,10 @@ class JavaScriptVarNameSanitizer(VarNameSanitizer):
"transient",
"volatile",
]
- __JS_BUILTIN_CONSTANTS = ["null", "true", "false"]
+ __JS_BUILTIN_CONSTANTS: Final = ["null", "true", "false"]
- __RE_INVALID_VAR_NAME = re.compile("[^a-zA-Z0-9_$]")
- __RE_INVALID_VAR_NAME_HEAD = re.compile("^[^a-zA-Z$]+")
+ __RE_INVALID_VAR_NAME: Final = re.compile("[^a-zA-Z0-9_$]")
+ __RE_INVALID_VAR_NAME_HEAD: Final = re.compile("^[^a-zA-Z$]+")
@property
def reserved_keywords(self) -> list[str]:
diff --git a/pytablewriter/sanitizer/_python.py b/pytablewriter/sanitizer/_python.py
index 659e79a..44140a2 100644
--- a/pytablewriter/sanitizer/_python.py
+++ b/pytablewriter/sanitizer/_python.py
@@ -4,12 +4,13 @@
import re
from re import Pattern
+from typing import Final
from ._base import VarNameSanitizer
class PythonVarNameSanitizer(VarNameSanitizer):
- __PYTHON_RESERVED_KEYWORDS = [
+ __PYTHON_RESERVED_KEYWORDS: Final = [
"and",
"del",
"from",
@@ -42,7 +43,7 @@ class PythonVarNameSanitizer(VarNameSanitizer):
"lambda",
"try",
]
- __PYTHON_BUILTIN_CONSTANTS = [
+ __PYTHON_BUILTIN_CONSTANTS: Final = [
"False",
"True",
"None",
@@ -51,8 +52,8 @@ class PythonVarNameSanitizer(VarNameSanitizer):
"__debug__",
]
- __RE_INVALID_VAR_NAME = re.compile("[^a-zA-Z0-9_]")
- __RE_INVALID_VAR_NAME_HEAD = re.compile("^[^a-zA-Z]+")
+ __RE_INVALID_VAR_NAME: Final = re.compile("[^a-zA-Z0-9_]")
+ __RE_INVALID_VAR_NAME_HEAD: Final = re.compile("^[^a-zA-Z]+")
@property
def reserved_keywords(self) -> list[str]:
diff --git a/pytablewriter/style/_style.py b/pytablewriter/style/_style.py
index 7ca9ddf..201748c 100644
--- a/pytablewriter/style/_style.py
+++ b/pytablewriter/style/_style.py
@@ -1,6 +1,6 @@
import warnings
from enum import Enum, unique
-from typing import Any, Optional, Union
+from typing import Any, Final, Optional, Union
from dataproperty import Align
from tcolorpy import Color
@@ -45,7 +45,7 @@ def __init__(self, code: int, string: str) -> None:
self.__align_string = string
-_s_to_ts: dict[str, ThousandSeparator] = {
+_s_to_ts: Final[dict[str, ThousandSeparator]] = {
"": ThousandSeparator.NONE,
",": ThousandSeparator.COMMA,
" ": ThousandSeparator.SPACE,
diff --git a/pytablewriter/style/_styler.py b/pytablewriter/style/_styler.py
index b753850..71bb14a 100644
--- a/pytablewriter/style/_styler.py
+++ b/pytablewriter/style/_styler.py
@@ -1,5 +1,5 @@
import re
-from typing import TYPE_CHECKING, Any, Optional
+from typing import TYPE_CHECKING, Any, Final, Optional
from dataproperty import Align
from tcolorpy import Color, tcolor
@@ -13,7 +13,7 @@
from ..writer._table_writer import AbstractTableWriter
-_align_char_mapping: dict[Align, str] = {
+_align_char_mapping: Final[dict[Align, str]] = {
Align.AUTO: "<",
Align.LEFT: "<",
Align.RIGHT: ">",
@@ -112,11 +112,11 @@ def _get_font_size_map(self) -> dict[FontSize, str]:
class LatexStyler(TextStyler):
class Command:
- BOLD = r"\bf"
- ITALIC = r"\it"
- TYPEWRITER = r"\tt"
- UNDERLINE = r"\underline"
- STRIKEOUT = r"\sout"
+ BOLD: Final = r"\bf"
+ ITALIC: Final = r"\it"
+ TYPEWRITER: Final = r"\tt"
+ UNDERLINE: Final = r"\underline"
+ STRIKEOUT: Final = r"\sout"
def get_additional_char_width(self, style: Style) -> int:
dummy_value = "d"
diff --git a/pytablewriter/style/_theme.py b/pytablewriter/style/_theme.py
index 836f67e..c4a6bb9 100644
--- a/pytablewriter/style/_theme.py
+++ b/pytablewriter/style/_theme.py
@@ -2,15 +2,15 @@
import pkgutil
import re
from collections.abc import Sequence
-from typing import Any, NamedTuple, Optional, Protocol
+from typing import Any, Final, NamedTuple, Optional, Protocol
from .._logger import logger
from ..style import Cell, Style
-PLUGIN_NAME_PEFIX = "pytablewriter"
-PLUGIN_NAME_SUFFIX = "theme"
-KNOWN_PLUGINS = (
+PLUGIN_NAME_PEFIX: Final = "pytablewriter"
+PLUGIN_NAME_SUFFIX: Final = "theme"
+KNOWN_PLUGINS: Final = (
f"{PLUGIN_NAME_PEFIX}_altrow_{PLUGIN_NAME_SUFFIX}",
f"{PLUGIN_NAME_PEFIX}_altcol_{PLUGIN_NAME_SUFFIX}",
)
@@ -41,11 +41,11 @@ def list_themes() -> Sequence[str]:
def load_ptw_plugins() -> dict[str, Theme]:
- plugin_regexp = re.compile(
+ plugin_regexp: Final = re.compile(
rf"^{PLUGIN_NAME_PEFIX}[_-].+[_-]{PLUGIN_NAME_SUFFIX}", re.IGNORECASE
)
- discovered_plugins = {
+ discovered_plugins: Final = {
name: importlib.import_module(name)
for _finder, name, _ispkg in pkgutil.iter_modules()
if plugin_regexp.search(name) is not None
@@ -72,8 +72,8 @@ def load_ptw_plugins() -> dict[str, Theme]:
def fetch_theme(plugin_name: str) -> Theme:
- loaded_themes = load_ptw_plugins()
- theme_regexp = re.compile(
+ loaded_themes: Final = load_ptw_plugins()
+ theme_regexp: Final = re.compile(
rf"^{PLUGIN_NAME_PEFIX}[_-]{plugin_name}[_-]{PLUGIN_NAME_SUFFIX}", re.IGNORECASE
)
matched_theme = None
diff --git a/pytablewriter/writer/binary/_excel.py b/pytablewriter/writer/binary/_excel.py
index 6712365..8cd7ba2 100644
--- a/pytablewriter/writer/binary/_excel.py
+++ b/pytablewriter/writer/binary/_excel.py
@@ -1,7 +1,7 @@
import abc
import copy
import warnings
-from typing import IO, TYPE_CHECKING, Any, ClassVar, Optional, Union, cast
+from typing import IO, TYPE_CHECKING, Any, Final, Optional, Union, cast
import dataproperty
import typepy
@@ -338,18 +338,18 @@ class ExcelXlsxTableWriter(ExcelTableWriter):
- |nan|: written as ``NaN``
"""
- MAX_CELL_WIDTH: ClassVar[int] = 60
+ MAX_CELL_WIDTH: Final[int] = 60
class TableFormat:
- HEADER = "header"
- CELL = "cell"
- NAN = "nan"
+ HEADER: Final = "header"
+ CELL: Final = "cell"
+ NAN: Final = "nan"
class Default:
- FONT_NAME: ClassVar[str] = "MS Gothic"
- FONT_SIZE: ClassVar[int] = 9
+ FONT_NAME: Final[str] = "MS Gothic"
+ FONT_SIZE: Final[int] = 9
- CELL_FORMAT: dict[str, Union[int, str, bool]] = {
+ CELL_FORMAT: Final[dict[str, Union[int, str, bool]]] = {
"font_name": FONT_NAME,
"font_size": FONT_SIZE,
"align": "top",
@@ -359,7 +359,7 @@ class Default:
"bottom": 1,
"right": 1,
}
- HEADER_FORMAT: dict[str, Union[int, str, bool]] = {
+ HEADER_FORMAT: Final[dict[str, Union[int, str, bool]]] = {
"font_name": FONT_NAME,
"font_size": FONT_SIZE,
"bg_color": "#DFDFFF",
@@ -367,7 +367,7 @@ class Default:
"left": 1,
"right": 1,
}
- NAN_FORMAT: dict[str, Union[int, str, bool]] = {
+ NAN_FORMAT: Final[dict[str, Union[int, str, bool]]] = {
"font_name": FONT_NAME,
"font_size": FONT_SIZE,
"font_color": "silver",
diff --git a/pytablewriter/writer/text/_asciidoc.py b/pytablewriter/writer/text/_asciidoc.py
index a90e2cf..4f0ee12 100644
--- a/pytablewriter/writer/text/_asciidoc.py
+++ b/pytablewriter/writer/text/_asciidoc.py
@@ -1,6 +1,6 @@
import copy
from collections.abc import Sequence
-from typing import Any
+from typing import Any, Final
import dataproperty as dp
import typepy
@@ -97,7 +97,7 @@ def _write_value_row(
)
def _get_opening_row_items(self) -> list[str]:
- cols = ", ".join(
+ cols: Final = ", ".join(
f"{get_align_char(col_dp.align)}{col_dp.ascii_char_width}"
for col_dp in self._column_dp_list
)
@@ -131,8 +131,8 @@ def _apply_style_to_header_item(
def __modify_row_element(
self, row_idx: int, col_idx: int, value: str, value_dp: DataProperty
) -> str:
- col_dp = self._column_dp_list[col_idx]
- style = self._fetch_style(row_idx, col_dp, value_dp)
+ col_dp: Final = self._column_dp_list[col_idx]
+ style: Final = self._fetch_style(row_idx, col_dp, value_dp)
align = col_dp.align
if style and style.align and style.align != align:
diff --git a/pytablewriter/writer/text/_css.py b/pytablewriter/writer/text/_css.py
index 0044cd1..1ba085a 100644
--- a/pytablewriter/writer/text/_css.py
+++ b/pytablewriter/writer/text/_css.py
@@ -1,5 +1,5 @@
import copy
-from typing import Any, cast
+from typing import Any, Final, cast
from dataproperty import NOT_QUOTING_FLAGS, DataProperty
from pathvalidate import replace_symbol
@@ -16,7 +16,7 @@ class CssTableWriter(IndentationTextTableWriter):
"""
FORMAT_NAME = "css"
- MARGIN_PIXEL = 6
+ MARGIN_PIXEL: Final = 6
@property
def format_name(self) -> str:
diff --git a/pytablewriter/writer/text/_html.py b/pytablewriter/writer/text/_html.py
index 761c3b2..8216472 100644
--- a/pytablewriter/writer/text/_html.py
+++ b/pytablewriter/writer/text/_html.py
@@ -1,6 +1,6 @@
import copy
import warnings
-from typing import Any, Optional, cast
+from typing import Any, Final, Optional, cast
import dataproperty
import typepy
@@ -75,7 +75,7 @@ def write_table(self, **kwargs: Any) -> None:
"""
tags, raw = _get_tags_module()
- write_css: bool = kwargs.get("write_css", False)
+ write_css: Final[bool] = kwargs.get("write_css", False)
with self._logger:
try:
diff --git a/pytablewriter/writer/text/_json.py b/pytablewriter/writer/text/_json.py
index ea70879..d3e54a4 100644
--- a/pytablewriter/writer/text/_json.py
+++ b/pytablewriter/writer/text/_json.py
@@ -1,6 +1,6 @@
import copy
from textwrap import indent
-from typing import Any
+from typing import Any, Final
import dataproperty
import typepy
@@ -90,7 +90,7 @@ def write_null_line(self) -> None:
self.stream.write("\n")
def _write_table(self, **kwargs: Any) -> None:
- sort_keys = kwargs.get("sort_keys", False)
+ sort_keys: Final = kwargs.get("sort_keys", False)
self._preprocess()
diff --git a/pytablewriter/writer/text/_jsonlines.py b/pytablewriter/writer/text/_jsonlines.py
index 5423f85..4a743b4 100644
--- a/pytablewriter/writer/text/_jsonlines.py
+++ b/pytablewriter/writer/text/_jsonlines.py
@@ -1,4 +1,4 @@
-from typing import Any
+from typing import Any, Final
from ._json import JsonTableWriter
@@ -43,7 +43,7 @@ def write_table(self, **kwargs: Any) -> None:
:ref:`example-jsonl-writer`
"""
- sort_keys = kwargs.get("sort_keys", False)
+ sort_keys: Final = kwargs.get("sort_keys", False)
with self._logger:
self._verify_property()
diff --git a/pytablewriter/writer/text/_latex.py b/pytablewriter/writer/text/_latex.py
index c9b7397..7b9b4f1 100644
--- a/pytablewriter/writer/text/_latex.py
+++ b/pytablewriter/writer/text/_latex.py
@@ -1,6 +1,6 @@
import copy
import re
-from typing import Any
+from typing import Any, Final
import dataproperty as dp
import typepy
@@ -17,7 +17,7 @@ class LatexWriter(IndentationTextTableWriter):
A base writer class for LaTeX format.
"""
- _RE_MATH_PARTS = re.compile(r"^\\?[a-zA-Z]+$")
+ _RE_MATH_PARTS: Final = re.compile(r"^\\?[a-zA-Z]+$")
@property
def support_split_write(self) -> bool:
@@ -104,7 +104,7 @@ class LatexMatrixWriter(LatexWriter):
"""
FORMAT_NAME = "latex_matrix"
- _RE_VAR = re.compile(r"^[a-zA-Z]+_\{[a-zA-Z0-9]+\}$")
+ _RE_VAR: Final = re.compile(r"^[a-zA-Z]+_\{[a-zA-Z0-9]+\}$")
@property
def format_name(self) -> str:
diff --git a/pytablewriter/writer/text/_markdown.py b/pytablewriter/writer/text/_markdown.py
index 3aa2d2a..939b410 100644
--- a/pytablewriter/writer/text/_markdown.py
+++ b/pytablewriter/writer/text/_markdown.py
@@ -1,6 +1,6 @@
import copy
from enum import Enum, unique
-from typing import Any, Union
+from typing import Any, Final, Union
import dataproperty as dp
import typepy
@@ -50,7 +50,7 @@ class MarkdownTableWriter(IndentationTextTableWriter):
"""
FORMAT_NAME = "markdown"
- DEFAULT_FLAVOR = MarkdownFlavor.COMMON_MARK
+ DEFAULT_FLAVOR: Final = MarkdownFlavor.COMMON_MARK
@property
def format_name(self) -> str:
diff --git a/pytablewriter/writer/text/_mediawiki.py b/pytablewriter/writer/text/_mediawiki.py
index bdc2a23..299364b 100644
--- a/pytablewriter/writer/text/_mediawiki.py
+++ b/pytablewriter/writer/text/_mediawiki.py
@@ -1,7 +1,7 @@
import copy
import re
from collections.abc import Sequence
-from typing import Any
+from typing import Any, Final
import dataproperty as dp
import typepy
@@ -21,7 +21,7 @@ class MediaWikiTableWriter(TextTableWriter):
"""
FORMAT_NAME = "mediawiki"
- __RE_TABLE_SEQUENCE = re.compile(r"^[\s]+[*|#]+")
+ __RE_TABLE_SEQUENCE: Final = re.compile(r"^[\s]+[*|#]+")
@property
def format_name(self) -> str:
@@ -88,7 +88,7 @@ def _get_closing_row_items(self) -> list[str]:
def _apply_style_to_header_item(
self, col_dp: ColumnDataProperty, value_dp: DataProperty, style: Style
) -> str:
- value = self._styler.apply(col_dp.dp_to_str(value_dp), style=style)
+ value: Final = self._styler.apply(col_dp.dp_to_str(value_dp), style=style)
str_format = "! {{:{:s}{:s}}}".format(
get_align_char(Align.CENTER), str(self._get_padding_len(col_dp, value_dp))
)
diff --git a/pytablewriter/writer/text/sourcecode/_javascript.py b/pytablewriter/writer/text/sourcecode/_javascript.py
index 6f35525..e86e294 100644
--- a/pytablewriter/writer/text/sourcecode/_javascript.py
+++ b/pytablewriter/writer/text/sourcecode/_javascript.py
@@ -1,6 +1,6 @@
import io
from datetime import datetime
-from typing import Any
+from typing import Any, Final
from dataproperty import ColumnDataProperty, DataProperty, DefaultValue
from typepy import StrictLevel, Typecode
@@ -59,8 +59,8 @@ class JavaScriptTableWriter(SourceCodeTableWriter):
"""
FORMAT_NAME = "javascript"
- __VALID_VAR_DECLARATION = ("var", "let", "const")
- __NONE_VALUE_DP = DataProperty("null")
+ __VALID_VAR_DECLARATION: Final = ("var", "let", "const")
+ __NONE_VALUE_DP: Final = DataProperty("null")
@property
def format_name(self) -> str:
diff --git a/pytablewriter/writer/text/sourcecode/_numpy.py b/pytablewriter/writer/text/sourcecode/_numpy.py
index b9aeba8..17bd500 100644
--- a/pytablewriter/writer/text/sourcecode/_numpy.py
+++ b/pytablewriter/writer/text/sourcecode/_numpy.py
@@ -47,12 +47,8 @@ def __init__(self, **kwargs: Any) -> None:
super().__init__(**kwargs)
self.import_numpy_as = "np"
- self._dp_extractor.set_type_value(
- typepy.Typecode.INFINITY, "{:s}.inf".format(self.import_numpy_as)
- )
- self._dp_extractor.set_type_value(
- typepy.Typecode.NAN, "{:s}.nan".format(self.import_numpy_as)
- )
+ self._dp_extractor.set_type_value(typepy.Typecode.INFINITY, f"{self.import_numpy_as:s}.inf")
+ self._dp_extractor.set_type_value(typepy.Typecode.NAN, f"{self.import_numpy_as:s}.nan")
def _get_opening_row_items(self) -> list[str]:
array_def = f"{self.import_numpy_as:s}.array(["
diff --git a/setup.py b/setup.py
index e9e2c7e..d7ce668 100644
--- a/setup.py
+++ b/setup.py
@@ -4,14 +4,15 @@
import os.path
import re
+from typing import Final
import setuptools
-MODULE_NAME = "pytablewriter"
-REPOSITORY_URL = f"https://github.com/thombashi/{MODULE_NAME:s}"
-REQUIREMENT_DIR = "requirements"
-ENCODING = "utf8"
+MODULE_NAME: Final = "pytablewriter"
+REPOSITORY_URL: Final = f"https://github.com/thombashi/{MODULE_NAME:s}"
+REQUIREMENT_DIR: Final = "requirements"
+ENCODING: Final = "utf8"
pkg_info: dict[str, str] = {}
@@ -110,7 +111,7 @@ def make_long_description() -> str:
packages=setuptools.find_packages(exclude=["test*"]),
package_data={MODULE_NAME: ["py.typed"]},
project_urls={
- "Changelog": f"{REPOSITORY_URL:s}/releases",
+ "Changelog": f"{REPOSITORY_URL:s}/blob/master/CHANGELOG.md",
"Documentation": f"https://{MODULE_NAME:s}.rtfd.io/",
"Funding": "https://github.com/sponsors/thombashi",
"Source": REPOSITORY_URL,