Skip to main content

Booby: data modeling and validation library

https://secure.travis-ci.org/jaimegildesagredo/booby.png?branch=master

Booby is a standalone data modeling and validation library written in Python. Booby is under active development and licensed under the Apache2 license, so feel free to contribute and report errors and suggestions.

See the sample code below to get an idea of the main features.

from booby import *

class Token(Model):
    key = StringField()
    secret = StringField()

class User(Model):
    login = StringField(required=True)
    name = StringField()
    email = EmailField()
    token = EmbeddedField(Token, required=True)

jack = User(
    login=u'jacko',
    name=u'Jack',
    email=u'jack@example.com',
    token={
        'key': u'vs7df...',
        'secret': u'ds5ds4...'
    }
)

try:
    jack.validate()
except ValidationError:
    pass
else:
    print jack.to_json()

'{"email": "jack@example.com", "login": "jacko", "token": {"secret": "ds5ds4...", "key": "vs7df..."}, "name": "Jack"}'

Installation

You can install the last stable release of Booby from PyPI using pip or easy_install.

$ pip install booby

Also you can install the latest sources from Github.

$ pip install -e git+git://github.com/jaimegildesagredo/booby.git

Tests

To run the Booby test suite you should install the development requirements and then run nosetests.

$ pip install -r requirements-devel.txt
$ nosetests tests/unit
$ nosetests tests/integration

Documentation

Booby docs are hosted on Read The Docs.

Release files for booby 0.2

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

Source distribution (sdist)

Source distribution for booby 0.2
File Size Uploaded
booby-0.2.tar.gz 5.7 kB Details

Release files / booby-0.2.tar.gz

Download URL booby-0.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d89568a91a806c5dbf4f1a964a190a0548f16c7438e2ed1e1428fd1104479b88
BLAKE2b-256 checksum
How to use checksums
63af98a12775799b49d95cba82f0c59ed3cee19ec3c3e0d463b52e15bf870ab6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.7.0

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

This release

0.2 This release

1 release file

0.1.4

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