skip to navigation
skip to content

attr 0.2.0

Simple decorator to set attributes of target function or class in a DRY way.

Usage example:

# Django proposes:
def my_calculated_field(...
my_calculated_field.short_description = 'Field'
my_calculated_field.admin_order_field = 'real_field'

# DRY:
@attr(short_description='Field', admin_order_field='real_field')
def my_calculated_field(...

Get it:

sudo pip install attr
from attr import attr
File Type Py Version Uploaded on Size
attr-0.2.0.tar.gz (md5) Source 2017-01-31 1KB