This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# Figurine

**Simple, structure only models with inheritance**

Figurine is intended for dumb models. In other words, data only, no methods.
For web apps, view models come to mind, or anywhere you would like a model that
does nothing but represent data.

Currently run on Python 2.6+, 3.x will be supported shortly.

**What about namedtuples?**

Yes, you could just use namedtuple for this, and that might even be better.
If you want your model defs to look more like traditional python objects however,
Figurine can help.

It still may be that namedtuples are a better solution, though you may
need a factory function to start them off with defaults of your choosing.

The base of a figuerine object is a dict, which is a bit better, for my need, for
JSON serialization if needed, which you could also just do with namedtuple._asdict
if you really wanted to use a namedtuple.

### Using Figurine

import figurine

class FacebookData(figurine.Model):
def __init__(self):
self.posts = ['facebook']

class TwitterData(figurine.Model):
def __init__(self):
self.tweets = ['twitter']

class SocialData(FacebookData, TwitterData):

class SimplePage(figurine.Model):

def __init__(self):
self.title = ""
self.stylesheets = []
self.javascript = []
self.meta = {}
self.value = 1

class HomePage(SimplePage, SocialData):

def __init__(self):
self.username = "lucy_the_dog"

model1 = HomePage()
# {'username': 'lucy_the_dog', 'title': '', 'javascript': [], 'posts': ['facebook'], 'value': 1, 'stylesheets': [], 'meta': {}, 'tweets': ['twitter']}

# kwarg overrides or init
model2 = HomePage(title="My Great Title",

# {'username': 'lucy_the_dog', 'title': 'My Great Title', 'javascript': [], 'posts': ['facebook'], 'value': 2, 'stylesheets': [], 'meta': {}, 'tweets': ['twitter']}
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
figurine-0.1.tar.gz (3.6 kB) Copy SHA256 Checksum SHA256 Source Sep 26, 2012

Supported By

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