Skip to main content

Unicode properties of codepoints.

Project description

Summary

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

Unicode

This module supports Unicode 11.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.

Files for uniprop, version 1.5
Filename, size File type Python version Upload date Hashes
Filename, size uniprop-1.5-cp34-none-win32.whl (82.6 kB) File type Wheel Python version cp34 Upload date Hashes View
Filename, size uniprop-1.5-cp34-none-win_amd64.whl (84.3 kB) File type Wheel Python version cp34 Upload date Hashes View
Filename, size uniprop-1.5-cp35-none-win32.whl (82.6 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size uniprop-1.5-cp35-none-win_amd64.whl (84.3 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size uniprop-1.5-cp36-none-win32.whl (82.6 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size uniprop-1.5-cp36-none-win_amd64.whl (84.3 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size uniprop-1.5-cp37-none-win32.whl (82.6 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size uniprop-1.5-cp37-none-win_amd64.whl (84.3 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size uniprop-1.5.tar.gz (117.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page