Skip to main content
Simple Python 3 module to query Unicode UCD script metadata (see UAX
#24).

| This module is useful for querying if a text is made of Latin
characters,
| Arabic, hiragana, kanji (han), and so on. It works for all scripts
supported
| by the Unicode character database.

| This module is dumb and slow. If you need speed, you probably want to
| implement your own functions.

Sample usage:

::

>>> import uniscripts
>>> uniscripts.is_script('A', 'Latin')
True

# if you pass it a string, all characters must match
>>> uniscripts.is_script('はるはあけぼの', 'Hiragana')
True

>>> uniscripts.is_script('はるはAkebono', 'Hiragana')
False

# ...but by default, it ignores 'Common' characters, such as punctuation.
>>> uniscripts.is_script('はるは:あけぼの', 'Hiragana')
True

>>> uniscripts.is_script('中華人民共和国', 'Han') # 'Han' = kanji or hànzì
True

>>> uniscripts.which_scripts('z')
['Latin']

>>> uniscripts.which_scripts('は')
['Hiragana']

>>> uniscripts.which_scripts('ー') # U+30FC
['Common', 'Katakana', 'Hiragana', 'Hangul', 'Han', 'Bopomofo', 'Yi']

See docstrings for ``is_script()``, ``which_scripts()``.

Metadata

Release files for uniscripts 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uniscripts 1.0.5
File Size Uploaded Provenance Actions
uniscripts-1.0.5.tar.gz 16.1 kB Without provenance Details for uniscripts-1.0.5.tar.gz

Release files / uniscripts-1.0.5.tar.gz

Download URL uniscripts-1.0.5.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ac2e3fab0db570466958eb759d4143b67cae12766484ea98aef8911b31d2e309
BLAKE2b-256 checksum
How to use checksums
83af61a5d4ca443e0bac1ffc11481abdf486f5d1ddba4f665e1e5ab0a091debc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for uniscripts 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page