Skip to main content

No project description provided

Project description

CI PyPI Dependencies

unicodedata-reader

This package reads and parses the Unicode Character Database files.

Many of them are available in the unicodedata module, or in other 3rd party modules. When the desired data is not in any existing modules, such as the Line_Break property or the Vertical_Orientation property, this package can read the data files at https://www.unicode.org/Public/UNIDATA/.

This package can also generate JavaScript functions that can read the property values of the Unicode Character Database in browsers. Please see the JavaScript section below.

Install

pip install unicodedata-reader

If you want to clone and install using poetry:

git clone https://github.com/kojiishi/unicodedata-reader
cd unicodedata-reader
poetry install
poetry shell

Python

import unicodedata_reader

reader = unicodedata_reader.UnicodeDataReader.default
lb = reader.line_break()
print(lb[0x41])

The example above prints AL, the Line_Break property value for U+0041. Please also see line_break_test.py for more usages.

JavaScript

The UnicodeDataCompressor class in this package can generate JavaScript functions that can read the property values of the Unicode Character Database in browsers.

Following examples are available in the "js" directory:

The following command generates a JavaScript file for the Line_Break property using js/template.js as the template file:

unicodedata-reader lb -t js/template.js

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

unicodedata_reader-1.3.5.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

unicodedata_reader-1.3.5-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file unicodedata_reader-1.3.5.tar.gz.

File metadata

  • Download URL: unicodedata_reader-1.3.5.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/6.5.0-1016-azure

File hashes

Hashes for unicodedata_reader-1.3.5.tar.gz
Algorithm Hash digest
SHA256 af9e396c0bee58a32993dfe0fbabdcfac9bb9284a765be98fab32095deb62965
MD5 baf91aacc9e552a9bfb512a0697ec8ec
BLAKE2b-256 20ba1f4887656770274ce84f3906ad453aa1379e82b1d6a70cfb8f855498b19f

See more details on using hashes here.

File details

Details for the file unicodedata_reader-1.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for unicodedata_reader-1.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5eea3eccbf6a004b0fd61e02e9a8e4b76918920ffa17f8b0c80eb129a38acbf6
MD5 af9fadeecbf807d1fde4fa2bc2b245d5
BLAKE2b-256 8db5761e135eb1b72640c5fd8d845b3d2eba521eea8adfe34eb57f8b397ba98c

See more details on using hashes here.

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