Skip to content
eponvert edited this page Mar 27, 2012 · 4 revisions

Automation

Mesh can auto-generate API documentation using Sphinx, a documentation package written in Python. The generation of documentation will eventually be itself automated, so along with manual documentation we always have timely, canonical API docs.

Mesh can also auto-generate client interfaces for both Python and Javascript, in both cases using an associated model API framework.

Python Model

example = Example.create(name='name')
example.description = 'description'
try:
    example.save()
except InvalidError:
    print 'invalid'
example.destroy()
try:
    Example.get(example.id)
except GoneError:
    print 'gone'

Javascript Model

var example = Example({id: 1});
example.refresh().done(function() {
    example.set({name: 'name'});
    example.save().done(function() {
        // ...
    });
});
Clone this wiki locally