skip to navigation
skip to content

flowdas-meta 1.0.1

Meta: A platform-agnostic library for schema modeling.

Meta: A platform-agnostic library for schema modeling

Meta is a platform-agnostic library for defining, serializing, and validating data structures.

from flowdas import meta

class Author(meta.Entity):
   name = meta.String()

class Book(meta.Entity):
   title = meta.String()
   published = meta.Date()
   authors = Author[1:]()

author1 = Author({'name': 'O'})
author2 = Author()
author2.update(name = 'Flowdas')
book = Book()
book.title = 'Meta'
book.published = '2016-03-15'
book.authors = [author1, author2]
book.published
# datetime.date(2016, 3, 15)
book.validate()
book.dump()
# {'authors': [{'name': 'O'}, {'name': 'Flowdas'}], 'published': '2016-03-15', 'title': 'Meta'}

Install

pip install flowdas-meta

Meta requires Python 2.7, 3.3, 3.4, or 3.5. It also supports PyPy. There is no external dependencies.

Documentation

Documentation is available at http://flowdas.github.io/meta/.

 
File Type Py Version Uploaded on Size
flowdas-meta-1.0.1.tar.gz (md5) Source 2016-03-24 33KB