Skip to main content

Simplifies the encoding and decoding of Regional Indicator Symbols.

Project description

RISify

RISify is a Python library that provides functions for encoding and decoding Regional Indicator Symbols (RIS), which are Unicode characters used to represent flags of countries and regions.

Installation

You can install RISify via pip:

pip install RISify

Usage

from ris import RIS

# decode a country code to RIS
pt = RIS.decode("PT")
print(pt) # 🇵🇹

# decode HTML-symbols to RIS
de = RIS.decode("🇩🇪", encoding="html")
print(de) # 🇩🇪

# encode a RIS to country code
nl = RIS("🇳🇱")
print(nl.encode()) # NL

# encode a RIS to HTML-safe symbols
fo = RIS("🇫🇴")
print(fo.encode(encoding="html")) # 🇫🇴

Note that RISify also provides functions for encoding and decoding RIS as HTML-safe symbols, which can be useful for ensuring that the symbols are markup-safe when used in HTML

Contributing

Contributions are welcome! If you find a bug or have an idea for a new feature, please open an issue on the GitLab repository. If you would like to contribute code, please fork the repository and submit a pull request.

License

RISify is released under the GPLv3 license. See LICENSE for details.

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

RISify-1.0.0.tar.gz (15.4 kB view hashes)

Uploaded Source

Built Distribution

RISify-1.0.0-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

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