lazr.enumEnums with zope.schema vocabulary support and database-friendly conveniences | |
Download |
lazr.enum Ranking & Summary
Advertisement
- License:
- LGPL v3
- Publisher Name:
- LAZR Developers
- Publisher web site:
- https://launchpad.net/~lazr-developers
lazr.enum Tags
lazr.enum Description
Enums with zope.schema vocabulary support and database-friendly conveniences lazr.enum is a Python module that contains enums with zope.schema vocabulary support and database-friendly conveniences.Enumerated types are used primarily in two distinct places in the Launchpad code: selector types; and database types.Simple enumerated types do not have values, whereas database enumerated types are a mapping from an integer value to something meaningful in the code. >>> from lazr.enum import ( ... EnumeratedType, DBEnumeratedType, Item, DBItem, use_template)The enum values of EnumeratedTypes are instances of Item. >>> class Fruit(EnumeratedType): ... "A choice of fruit." ... APPLE = Item('Apple') ... PEAR = Item('Pear') ... ORANGE = Item('Orange') Requirements: · Python What's New in This Release: · Added case insensitivity to getting the term by the token value (lp:154556).
lazr.enum Related Software