Yet Another Enumerator is an enum module that supports three different types of enumerations:
sequence enums (0, 1, 2, 3, etc.)
base 2 bitmask enums (0, 1, 2, 4, 8, etc.)
string enums (‘top’,’bottom’,’left’,’right’, etc.)
Each Enumeration is its own class, with instances of that class being singletons. Besides being a value, enum instances can also have their own behavior (use case, anyone?).
Creating an enum is as simple as:
from yaenum import Enum, BitMaskEnum, UniqueEnum, enum
Enum.create('Color', 'red green blue', export=globals())
or:
class Color(BitMaskEnum): # python 3+ only
black
red
green
blue
and if that’s too magical for you:
class Color(BitMaskEnum):
black = enum() # python 2: enum(value=0) etc.
red = enum()
green = enum()
blue = enum()
Metadata
Release files for yaenum 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yaenum-0.1.zip | 12.6 kB | Without provenance | Details for yaenum-0.1.zip | |
| yaenum-0.1.tar.gz | 8.3 kB | Without provenance | Details for yaenum-0.1.tar.gz |
Release files / yaenum-0.1.zip
| Download URL | yaenum-0.1.zip |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6fd7bcdaf52cb2e8f7958c72e24cea28cc202f4cfe5e5ee64d2020055131ee9
|
|
BLAKE2b-256 checksum How to use checksums |
7ed2bdff4b33b47f225fd7f6ad8d5902a6fd9db57f1969b2cfd9d364d8b43d34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / yaenum-0.1.tar.gz
| Download URL | yaenum-0.1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee17c20c43145a26a39fd55fbdfbe16d98649b977bd73ae652218ad5c920a6bb
|
|
BLAKE2b-256 checksum How to use checksums |
774ab9d03edf9500c003ceeb1409cdaf4bd3e3fc47a68d08489c77a7cc97b03a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for yaenum 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.