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

This library has been deprecated in favour of Odin

A JSON based notation for resources that can be easily converted into object graphs.

Note

Official location of this project is now GitHub (for Travis-CI support), the BitBucket repository may not contain the latest code.

Highlights

  • Class based declarative style
  • Support for all JSON primitive types (including JavaScript Date)
  • Fields for building composite resources
  • Field and Resource level validation
  • Easy extension to support custom fields
  • Python 2.7+ and Python 3.3+ supported

Upcoming features

In development

  • Customisable generation of documentation of resources (for integration into Sphinx)
  • Complete documentation (around 70-80% complete for current features)

Planning

  • Integration with other libraries (ie Django Models/Forms)

Requires

  • six

Optional

  • jinja2 >= 2.7 - For documentation generation
  • simplejson - Performance improvements

Example

With definition:

import jsrn

class Author(jsrn.Resource):
    name = jsrn.StringField()

class Publisher(jsrn.Resource):
    name = jsrn.StringField()

class Book(jsrn.Resource):
    title = jsrn.StringField()
    authors = jsrn.ArrayOf(Author)
    publisher = jsrn.ObjectAs(Publisher)
    genre = jsrn.StringField()
    num_pages = jsrn.IntegerField()
>>> b = Book(
        title="Consider Phlebas",
        genre="Space Opera",
        publisher=Publisher(name="Macmillan"),
        num_pages=471
    )
>>> b.authors.append(Author(name="Iain M. Banks"))
>>> jsrn.dumps(b, pretty_print=True)
{
    "$": "Book",
    "authors": [
        {
            "$": "Author",
            "name": "Iain M. Banks"
        }
    ],
    "genre": "Space Opera",
    "num_pages": 471,
    "publisher": {
        "$": "Publisher",
        "name": "Macmillan"
    },
    "title": "Consider Phlebas"
}
Release History

Release History

0.3.2

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

0.3.1

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

0.2.0

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
jsrn-0.3.2.tar.gz (13.7 kB) Copy SHA256 Checksum SHA256 Source Jul 16, 2013

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