Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Powerful Enumeration System

Project Description

MakeObj is a module to help create powerful enumeration classes with support to attributes specific for each element.

This module is compatible with Python versions 2.6+ and 3.0+

Usage:

>>> from makeobj import Obj, keys, attr
>>> class RGBColors(Obj):
...     red, green, blue = keys(3)
...     hex = attr('ff0000', '00ff00', '0000ff')
...
>>> RGBColors
<Object: RGBColors -> [red:0, green:1, blue:2]>
>>> RGBColors.red
<Value: RGBColors.red = 0>
>>> RGBColors.blue.hex
'0000ff'

Using the custom Enum Language:

@obj RGBColors =:
    @keys = 'red', 'green', 'blue'
    @attr hex = 'ff0000', '00ff00', '0000ff'

Then you can parse it:

>>> from makeobj import parse
>>> RGBColors = parse(text)
>>> RGBColors.red
<Value: RGBColors.red = 0>

.

Release History

This version
History Node

0.8

History Node

0.7

History Node

0.6

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2

History Node

0.0.5

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
makeobj-0.8.tar.gz
(10.4 kB) Copy SHA256 Hash SHA256
Source None Jan 6, 2013
makeobj-0.8.zip
(13.5 kB) Copy SHA256 Hash SHA256
Source None Jan 6, 2013

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting