Metadata-Version: 2.4
Name: worldref
Version: 1.1.1
Summary: Every country in Arabic, English, or both: names, nationalities, dial codes, phone validation, currencies, subdivisions.
License: MIT
Project-URL: Homepage, https://arj-89.github.io/worldref
Project-URL: Source, https://github.com/arj-89/worldref
Project-URL: Issues, https://github.com/arj-89/worldref/issues
Project-URL: Changelog, https://github.com/arj-89/worldref/blob/main/CHANGELOG.md
Keywords: countries,arabic,bilingual,nationality,phone-number,dial-codes,iso-3166,i18n,dataset
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: Arabic
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Internationalization
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# worldref (Python)

242 countries and territories in Arabic and English: names, aliases, phone plans, currencies, geo, locale, subdivisions, plus search, sorting and phone parsing. Standard library only, Python 3.9 or newer.

## Install

```sh
pip install worldref
```

## Usage

```python
from worldref import countries, by_iso2, search, sort_countries, parse_phone, subdivisions

sa = by_iso2("sa")
print(sa.name_ar, sa.name_en, sa.flag)                  # السعودية Saudi Arabia 🇸🇦
print([c.iso2 for c in search(countries(), "سعودية", "ar")][:3])
print([c.name_en for c in sort_countries(countries(), "en", first="SA")][:3])
p = parse_phone("0501234567", sa, countries())
print(p.e164, p.valid, p.mobile)                        # +966501234567 True True
print(len(subdivisions("SA")))
```
