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 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page