WSGI

Lingwo.ws with Pylons

This is a short addendum to part 1 of my Lingwo.ws tutorial.

Aaron wanted to know how to run Lingwo.ws on WebFaction.  In talking to him later, it turns out he wants to use it inside of a Pylons application.  I have just the code for him!  I'm using Lingwo.ws inside of Lingwo.flashcards which is built on Pylons.

So, quickly, some background: when you create a Pylons application, you end up with a small library of code named like your application.  For example, in Lingwo.flashcards, that app is actually called "lingwo_flashcards".  Anyway, all your code goes in there.  For the rest of this example, we'll pretend that our application is named "myapp", ok?

First, you need to make a function creating your service with all its containers.  We'll put this in myapp/lib/api.py:

from myapp.server import *

Lingwo.ws tutorial, part 1: Creating a service

This is the first part in a four part series on Lingwo.ws.  In this part, we will:

  • Install the reference implementation.
  • Create a simple example service.
  • Use "curl" to experiment using the service.

What is Lingwo.ws?

Lingwo.ws is an open specification for a way to design RESTful web services.  I've described earlier why this is desirable, but to summarize:

  • Shared expectations: RESTful web services can be just about anything, so long as they follow a few design principles.  So, when someone says a service is RESTful, you will still need to read its documentation and learn how specifically that service works.  If a service conforms to Lingwo.ws, however, this means it conforms to a specific design.
Syndicate content