Skip to content

thejpanganiban/restify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A RESTful interface for Mongodb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages