The formatflowed.py python library provides en- and decoding functionality for RFC 2646 and RFC 3676 text, also called format=flowed text. The development of this library was generously sponsored by Logicalware, and was written by Martijn Pieters.
The latest version can be downloaded from the pypi page; the code repository is hosted GitHub.
formatflowed.py has been tested with python versions 2.6 - 2.7, 3.3 - 3.6 and pypy and pypy3. Installation requires setuptools.
Use the standard setuptools installation script provided:
python setup.py install
or install the package as an egg:
pip install formatflowed
Further documentation is embedded in the docstrings of the module.