Metadata-Version: 2.4
Name: polyglossa
Version: 2026.11.6
Summary: English Wiktionary's languages, language families and scripts.
Author: Fenakhay
License-Expression: MIT
Project-URL: Homepage, https://github.com/fenakhay/polyglossa
Project-URL: Source, https://github.com/fenakhay/polyglossa
Keywords: wiktionary,languages,language codes,scripts,linguistics
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Dynamic: license-file

# Polyglossa

English Wiktionary's languages, language families and scripts for Python: every code Wiktionary uses,
what it calls each one, and how they relate, bundled with the package so nothing is asked of the wiki.

```python
from polyglossa import Language, LanguageFamily, Script

english = Language["en"]
english.name                              # 'English'
english.family.name                       # 'Anglic'
[a.name for a in english.ancestors]       # ['Early Modern English']
english.scripts[0].name                   # 'Latin'
Language.get("xx")                        # None: no such language
Language.named("Old English").code        # 'ang'
"ang" in Language                         # True
Language["en-ear"].full                   # English, for an etymology-only variety

LanguageFamily["ine"].proto_language.name # 'Proto-Indo-European'
Script.named("Arabic").direction          # ScriptDirection.RIGHT_TO_LEFT
Script["Deva"].name_for(Language["mr"])   # 'Balbodh'
```

`Language["xx"]` raises `UnknownLanguageError`, a `KeyError`; `Language.get("xx")` returns `None`. It
needs Python 3.11 or later and nothing else.

The version is the day the data was exported from Wiktionary. The data is English Wiktionary's, under
CC BY-SA 4.0; the code is under the MIT licence. See https://github.com/fenakhay/polyglossa.
