Skip to main content

'uniprop' provides the Unicode properties of codepoints similar to those of the unicodedata module.

Project description

Summary

This module reports the Unicode properties of codepoints, beyond what Python’s unicodedata module provides.

Unicode

This module supports Unicode 14.0.0.

Examples

>>> import uniprop
>>> uniprop.script('A')
'Latin'
>>> uniprop.script('\N{GREEK SMALL LETTER ALPHA}')
'Greek'
>>> uniprop.block('A')
'Basic_Latin'
>>> uniprop.block('\N{GREEK SMALL LETTER ALPHA}')
'Greek_And_Coptic'
>>> uniprop.numeric_value('\N{VULGAR FRACTION ONE THIRD}')
'1/3'
>>> uniprop.numeric_value('A')
'NaN'
>>> uniprop.numeric_type('\N{VULGAR FRACTION ONE THIRD}')
'Numeric'
>>> uniprop.numeric_type('A')
'None'

Please note that all of the results are strings. This differs from the unicodedata module where numeric_value returns a float.

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

uniprop-1.7.tar.gz (124.4 kB view hashes)

Uploaded Source

Built Distributions

uniprop-1.7-cp39-cp39-win_amd64.whl (91.3 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

uniprop-1.7-cp39-cp39-win32.whl (90.3 kB view hashes)

Uploaded CPython 3.9 Windows x86

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