An example using Tornado, Motor and MongoDB GridFS to create a basic RESTful api.
Testing
Lets upload a file:
$ curl -vv --request PUT --form package=@myfile-0.1.tar.gz --form meta=@myfile.yaml http://localhost:8888/packages
Result:
Check it is realy added to mongodb:
$ mongofiles --db automator list
Output:
Execute a GET request::
$ curl -vv --request GET http://localhost:8888/packagesi
Result: