Skip to main content

Get python's text codecs

Project description

Get text codecs

Python library for encodings.

A single get_text_codecs method is used for returning a python dict with all available codec names for encoding or decoding text. Dictionary keys are the default codec names and each entry contains a single list with all aliases, if any.

Installation & Usage

pip install

pip3 install 'gettextcodecs>=0.0.3' --upgrade

Usage

After installing the "library" you can import it and use it with:

from gettextcodecs.methods import get_text_codecs
codec_names = get_text_codecs()

Variable codec_names now contains all available codec names as dictionary keys and a list of their aliases as their value. The list will be empty if no aliases exist.

Parameters

  • as_list: Optional. Get a single list with all possible codec names.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gettextcodecs-0.0.3.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

gettextcodecs-0.0.3-py3-none-any.whl (15.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page