Skip to content

Latest commit

 

History

History
68 lines (42 loc) · 1.08 KB

README.md

File metadata and controls

68 lines (42 loc) · 1.08 KB

Restify

A Mongodb RESTful interface

Requirements

  • Mongodb
  • Python
  • flask
  • pymongo

Usage

Querying:

curl -X GET \
     <host>/classes/<class_name>

or

curl -X GET \
     <host>/classes/<class_name>?where=<mongodb_query>

example mongodb query

curl -X GET \
     <host>/classes/<class_name>?where={'name': 'Jesse'}

Creating objects:

curl -X POST \
     -H "Content-Type: application/json" \
     -d '{"name": "Jesse", "age": 21}' \
     <host>/classes/<class_name>

Updating objects:

curl -X PUT \
     -H "Content-Type: application/json" \
     -d '{"$set": {"name": "Jesse Panganiban"}}' \
     <host>/classes/<class_name>/<object_id>

Deleting objects:

curl -X DELETE \
     <host>/classes/<class_name>/<object_id>

See http://www.mongodb.org for queries and updating objects (modifiers).

TODO

Here's a list of things to do. Fork me! :)

  • Authentication
  • ACL (Access Control List)
  • Controller Tests
  • Multiple DBs in single instance
  • Use gevent.pywsgi (Check if pymongo is gevent safe)