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

Lightweight test data generation framework

Project Description


YAml Meta Binding microframework

Define schema for YAML documents a-la SQLAlchemy to read, write and manipulate data like a python object.

Basic example

from yamb import Literal, Nested, Collection, YAMBObject

class Address(YAMBObject):
    city = Literal(default='New York')
    street = Literal()

class Person(YAMBObject):
    name = Literal()
    phone = Literal()
    address = Nested(Address)

    def lives_close_to(self, another_person):
        return ==

class Phonebook(YAMBObject):
    title = Literal()
    people = Collection(Person)

friends = Phonebook(title='Friends', people=[])

friends.people.append(Person(name='Sue', phone='+12345', address=Address(street='Some blvd')))
sam = Person(name='Sam', phone='+123456', address=Address(city='London', street='Picadilly'))
friends.people += [sam]

with open('friends.yml', 'w') as f:

parsed = Phonebook._load(open('friends.yml'))

assert parsed.title == 'Friends'
assert parsed.people[0] == 'New York'
assert parsed.people[1].name == 'Sam'

Release History

This version
History Node


History Node


History Node


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
(3.1 kB) Copy SHA256 Hash SHA256
Source None Dec 17, 2014

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