Skip to main content

Provides the Greek Alphabet and utility functions to manipulate it

Project description

Greek Alphabet

A Python module for working with the Greek alphabet.

Usage

Importing the module

from greek_alphabet import Alphabet

Getting a list of all Greek alphabet characters

alphabet_list = Alphabet.get_list()

Getting a dictionary of all Greek alphabet characters

alphabet_dict = greek_alphabet.Alphabet.get_dict()

The get_dict() method takes two optional parameters:

  • key: a function that takes an AlphabetChar object and returns a string to use as the dictionary key. By default, the Greek name of the character is used.
  • value: a function that takes an AlphabetChar object and returns the value to use in the dictionary. By default, the AlphabetChar object is used.

Converting between upper and lower case

# Convert a lower case letter to upper case
upper_case_char = greek_alphabet.Alphabet.upper('a')

# Convert an upper case letter to lower case
lower_case_char = greek_alphabet.Alphabet.lower('Γ')

AlphabetChar class

The AlphabetChar class represents a single character of the Greek alphabet. It has the following attributes:

  • char: the character itself
  • capitalized: the capitalized version of the character
  • name: the name of the character in Greek
  • lower: the lower case equivalent of the character

License

This module is released under the MIT License. See LICENSE for more information.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greek_alphabet-1.0.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file greek_alphabet-1.0.tar.gz.

File metadata

  • Download URL: greek_alphabet-1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for greek_alphabet-1.0.tar.gz
Algorithm Hash digest
SHA256 dd8111046bb0d54cf248ccc30da12da93730ff58bbd1409d887af5c5baba5e31
MD5 4a1fbdaff627a23ac0c844a428a9b154
BLAKE2b-256 7b00955c266787c2e3949ca7eab6f01b583638dddade1a4c424db75b97da64ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page