chardetng_py#

PyPI Status Python Version License

Read the documentation at https://chardetng-py.readthedocs.io/ Tests

pre-commit Black

Features#

Python binding for the chardetng character encoding detector.

Installation#

You can install chardetng_py via pip from PyPI:

$ pip install chardetng-py

Or via poetry:

$ poetry add chardetng-py

Quick Start#

The easiest way to get started is to use the :meth:detect method.

>>> from chardetng_py import detect
>>> detect(b'Jakby r\xeaka Boga')
'windows-1254'

There is also a detect method available for compatability with chardet, but it will always report None for the language and a confidence value of 0.99.

>>> from chardetng_py.compat import detect
>>> detect(b'Jakby r\xeaka Boga')
{'encoding': 'windows-1254', 'confidence': 0.99, 'language': None}

Contributing#

Contributions are very welcome. To learn more, see the Contributor Guide.

License#

Distributed under the terms of the MIT license, chardetng_py is free and open source software.

Issues#

If you encounter any problems, please file an issue along with a detailed description.

Credits#