PyByle
PyByle is a small library for easy interaction with file and string encodings.
The library currently uses python 3.10 and supports 97 possible encodings The next version of python 3.11 supports all the same encodings as python 3.10 You can learn more about the list of encodings for different versions of the interpreter here: https://docs.python.org/3.10/library/codecs.html#standard-encodings
Installing
pip install pybyle
Getting a complete list of supported characters in a given encoding.
import pybyle
pybyle.get_charset('ascii') # ['\x00', '\x01', '\x02', '\x03', '\x04', ...]
Converting a string from one encoding to another. Attention! All unsupported characters will be replaced with the set character!
import pybyle
pybyle.convert_encoding('Привет, мир! Hello, world!', encoding='ascii') # ??????, ???! Hello, world!
pybyle.convert_encoding('Привет, мир! Hello, world!', encoding='ascii', substitute='_') # ______, ___! Hello, world!
Specifies the encoding of the binary string.
import pybyle
pybyle.detect_bytes_encoding(b'\xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82') # utf-8
Determining the encoding for a given file.
import pybyle
pybyle.detect_file_encoding('example_utf_8_file.txt') # utf-8
pybyle.detect_file_encoding('example_cp037_file.txt') # cp037
Metadata
Release files for pybyle 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybyle-1.0.0.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybyle-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.7 kB
Release files / pybyle-1.0.0.tar.gz
| Download URL | pybyle-1.0.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f4d99c63199ed7ce978c41c7d6d8d660949e2a4c4fe8d0e3c80f0ed7f8b0497
|
|
BLAKE2b-256 checksum How to use checksums |
909fa63d1639e36c98ae45d2966bfdab4d9d88e0c830fa72a9c22c54ce367bc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.10.0 Windows/10
|
Release files / pybyle-1.0.0-py3-none-any.whl
| Download URL | pybyle-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d43f5c4c4b8cb59da7dfa042495fc67096feca89e739ace3fd5e93dab6d4d264
|
|
BLAKE2b-256 checksum How to use checksums |
5ac343ef00d6756af420ce6c711c9e398d9fa88cf79fbd84f04e64386a551066
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.10.0 Windows/10
|