
Python for Google App Engine
By :

Before writing the code, we need to have a neat idea in mind of the resources we are going to make available through the API, the methods we will provide to manipulate such resources, and the response codes we will deliver to the clients. After designing the API, we can start write some code to implement resources representation.
Defining a resource is very similar to defining a model class in an ORM system, and it's not uncommon for them to coincide, like in our case. In fact, we will provide the following resources:
Note
NoteFile
ChecklistItem
Every resource will be identified by a URL. We omit the hostname here for clarity:
The /notes
URL: This identifies a collection of resources of type Note
The /notes/:id
URL: This identifies a single resource of type Note using its ID as the discriminator
The /notefiles
URL: This identifies a collection of resources of type NoteFile
The /notefiles/:id
URL: This identifies a single...