Module to set predefined allowed values for a variable
Project description
Enumy
The problem with Python's "Enum" module is that it is not a reasonable way to restrict variables to a predefined set of values.
Installation
pip install --user enumy
First start
from enumy import Enumy
test = Enumy(("Value 1", "Value 2"), str)
test = "Value 2" # Working
test = 123 # Exception
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
enumy-1.0.1.tar.gz
(1.8 kB
view hashes)
Built Distribution
enumy-1.0.1-py3-none-any.whl
(2.0 kB
view hashes)