Skip to main content

A tiny utility to get the Unicode block of a character

Project description

tinyunicodeblock

A tiny utility to get the Unicode block of a character

Code style Pylint License PyPi Pipeline status

This module provides only one ability that is absent from the built-in module unicodedata.
It contains one function, block(), which returns the name of a Unicode block that a character belongs to.

Table of contents


📦 Installation

tinyunicodeblock is available on PyPi. It requires a Python version of at least 3.7.0. and depends on no packages.

To install with pip:

python -m pip install tinyunicodeblock

To install through Git:

python -m pip install git+https://gitlab.com/whoatemybutter/tinyunicodeblock.git

🛠 Usage

Only one function is publicly available, block(character). It will return the name of a Unicode block that character belongs to.

>>> import tinyunicodeblock
>>> tinyunicodeblock.block("a")
'Basic Latin'
>>> tinyunicodeblock.block("\ufdfd")
'Arabic Presentation Forms-A'
>>> tinyunicodeblock.block("\ue845")
'Private Use Area'
>>> tinyunicodeblock.block("\ue845")
'Private Use Area'
>>> tinyunicodeblock.block("\U0009FFFF")
'No Block'

📰 Changelog

The changelog is at CHANGELOG.md.


📜 License

tinyunicodeblock is licensed under GNU General Public License 3.0 or later.

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

tinyunicodeblock-1.0.0.tar.gz (19.6 kB view hashes)

Uploaded Source

Built Distribution

tinyunicodeblock-1.0.0-py3-none-any.whl (20.1 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