In a recent project; I used MongoDB with MongoEngine (an ORM/ODM for Python).

This allowed me to specify schema in a central "Model".

My new project I am hosting on Windows Azure; and there is no non-SQL based ORM/ODM wrapper for it in Python.

How would you recommend I proceed:

  • Engineer my own Python ORM/ODM for Windows Azure
  • Or should I not worry about complicated backend business-logic—to reduce computation and transport overhead—and just write routes like this:

    POST /api/u_speced/<noun>/create -d {'type': 'schema', **(JSON_schema)}
    → {'created': true}
    PUT /api/u_speced/<noun>/add -d {'type': 'data', **(JSON validated against JSON_schema)}
    →  {'id': <id>}
    GET /api/u_speced/<noun>/<id>
    →  {JSON representation of record}
  • You are aware that POST and PUT support body content in the request? That's the most natural way to work, rather than wedging stuff into query parameters (which have length restrictions and other issues too). – Donal Fellows Mar 31 '14 at 1:34
  • Yeah; added in a curl style syntax. – A T Mar 31 '14 at 2:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.