Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

This package provides a robust enumerated data type for Python.

An enumeration object is created with a sequence of string arguments to the Enum() function:

>>> from enum import Enum
>>> Colour = Enum('red', 'blue', 'green')
>>> Weekday = Enum('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun')

The return value is a new object with attributes for each of the string arguments; these attributes act as unique values within the enumeration:

>>> pixel_colour = Colour.blue

Enumeration objects are immutable, and can iterate their values. The values are constants that can be compared only with other values from the same enumeration, but can be coerced to simple strings matching the original arguments to Enum().

The design is based in part on Zoran Isailovski’s recipe, “First Class Enums in Python” in the ASPN Python Cookbook <URL:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413486>.

Release files for enum 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for enum 0.1.1
File Size Uploaded
enum-0.1.1.tar.gz 4.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for enum 0.1.1
File Interpreter ABI Platform
enum-0.1.1-py2.4.egg Legacy Egg format - - Details
enum-0.1.1-py2.3.egg Legacy Egg format - - Details

Total release size: 13.9 kB

Release files / enum-0.1.1.tar.gz

Download URL enum-0.1.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e6469b807ba4ba68d1823cc85faa5703cea0ffb18220ff5df7e4f4395b3a6a29
BLAKE2b-256 checksum
How to use checksums
5ce2630fc2ce1ce462260aaf5c6e3da496c00c2585bf57bf3852f753a9821ee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / enum-0.1.1-py2.4.egg

Download URL enum-0.1.1-py2.4.egg
Size 4.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
078b71339466fbcf0f412452440aa4a63956ef471aec23377e8df624659176dc
BLAKE2b-256 checksum
How to use checksums
1151da4ffb0bf0f08060ac91641fb8f18d5dc1376b72034a07f1b9abf4b33fb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / enum-0.1.1-py2.3.egg

Download URL enum-0.1.1-py2.3.egg
Size 4.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
3aa9cb3a6e3c5608c92b4ef6132d72dff32bcee3fd75027276125c6eb2ae330d
BLAKE2b-256 checksum
How to use checksums
3b320a2084bed5a5001655af751e28a419797ebcf8e4e95481659ff7ccb6a040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page