{ "info": { "author": "Asdine El Hrychy", "author_email": "asdine.elhrychy@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Madame\n======\n\nMadame is a dynamic RESTful API for MongoDB based on Flask.\n\n\n:Author: Asdine El Hrychy\n:Version: 0.1\n\nFeatures\n--------\n- **REST-compliant**\n- **HATEOAS**\n- **Dynamic collections**\n- **JSON Schemas separated from code**\n- **JSON Validation**\n- **Cache**\n- **Versioning**\n- **Read-only by default**\n\nCRUD\n----\nMadame supports built-in CRUD operations.\n\n ======= ======\n Action Method\n ======= ======\n Create POST\n Read GET\n Update PATCH\n Update* POST\n Delete DELETE\n ======= ======\n\n*Update method can use POST or PATCH, whether the user updates the entire document or not.\n\nSchemas\n-------\nMadame keeps database schemas separated from code, and uses JSON to describe them.\nTo validate the data, it uses the strong schema validation library : `Validictory `_. ::\n\n {\n \"contacts\": {\n \"title\" : \"Contacts\",\n \"description\" : \"My contact list\",\n \"schema\" : {\n \"type\" : \"object\",\n \"properties\" : {\n \"firstname\" : {\n \"type\" : \"string\",\n \"minLength\" : 1,\n \"maxLength\" : 10\n },\n \"lastname\" : {\n \"type\" : \"string\",\n \"minLength\" : 1,\n \"maxLength\" : 15,\n \"required\" : true\n },\n \"phone-number\" : {\n \"type\" : \"string\",\n \"format\": \"phone\"\n }\n }\n }\n }\n }\n\n\nDynamic\n-------\nYou can add and delete new schemas without turning the servers off and use them immediatly. ::\n\n >>> import requests, json\n\n >>> data = {\n \"pets\" :\n {\n \"title\": \"Pets\",\n \"description\" : \"My pets\",\n \"schema\" :\n {\n \"type\" : \"object\",\n \"properties\" : {\n \"name\" : {\n \"type\" : \"string\",\n \"minLength\" : 1,\n \"maxLength\" : 15,\n \"required\" : True\n }\n }\n }\n }\n }\n >>> headers = {'content-type': 'application/json'}\n >>> r = requests.post('http://localhost:5000/', data=json.dumps(data), headers=headers)\n >>> print r.status_code\n 201\n\nYou can then add new pets on your collection. ::\n\n $ curl -i -d '{ \"name\" : \"Betise\" }' -H \"Content-Type: application/json\" http://localhost:5000/pets/\n HTTP/1.0 201 CREATED\n Content-Type: application/json\n Content-Length: 263\n ETag: \"17c62e0fd3f85bf0f7db76fc2c90027f3309a83c\"\n Server: Werkzeug/0.8.3 Python/2.7.3\n Date: Fri, 04 Jan 2013 15:36:00 GMT\n\n {\n \"title\": \"Document created\",\n \"links\":\n [\n {\n \"methods\": [\"GET\", \"POST\", \"DELETE\"],\n \"href\": \"http://localhost:5000/pets/\",\n \"description\": \"You are here.\",\n \"rel\": \"self\",\n \"title\": \"Pets\"\n },\n {\n \"href\": \"http://localhost:5000/pets/50e6f6e00ef3c414fcf66b45\",\n \"rel\": \"item\"\n }\n ],\n }\n\n\nFiltering and sorting\n---------------------\nMadame uses MongoDB options for filtering and sorting. ::\n\n $ curl http://localhost:5000/pets/?limit=1&skip=20\n\nInstallation\n------------\n::\n\n $ pip install madame\n\nUsage\n-----\n::\n\n from madame import Madame\n\n app = Madame()\n app.run()\n\n\nVersioning\n----------\n::\n\n from madame import Madame\n\n app = Madame('/v1')\n app.run()\n\n\nFlask and Ajax\n--------------\nUse Madame as an Ajax extension of your website.\nAs Madame is built on Flask, you can still use it as a normal website.\n::\n\n from madame import Madame\n from flask import render_template\n\n app = Madame('/ajax')\n\n @app.route('/')\n def index():\n return render_template('index.html')\n\n if __name__ == \"__main__\":\n app.run()\n\n\nFuture\n------\n- Highly customizable\n- Authentication\n- Pagination\n- ``GET //``\n\nand so on.\n\nFeedback\n--------\nAny comment or advice would be highly appreciated!\n\nDocumentation\n-------------\nComplete documentation is available at `https://madame.readthedocs.org `_\n\nLicense\n-------\nMadame is MIT licensed. See the `LICENSE `_ for details.\n\nCredits\n-------\n`Flask `_\n\n`Pymongo `_\n\n`Validictory `_\n\nAuthors\n-------\nMadame is developped by Asdine El Hrychy.\nSee the `AUTHORS `_ for details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/asdine/madame", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "madame", "package_url": "https://pypi.org/project/madame/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/madame/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/asdine/madame" }, "release_url": "https://pypi.org/project/madame/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "RESTful API for MongoDB built on Flask", "version": "0.1.2" }, "last_serial": 794441, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "500460b3e142579b5ce35ee77f9b94dc", "sha256": "804bbadaeffa47bcca855b670ec9a9ed5cf817f39c04fbe07feaca3e813adb76" }, "downloads": -1, "filename": "madame-0.1.tar.gz", "has_sig": false, "md5_digest": "500460b3e142579b5ce35ee77f9b94dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4532, "upload_time": "2013-01-03T02:43:00", "url": "https://files.pythonhosted.org/packages/11/26/4b35967677c33dbc46ec41f0a1fe169dd44d9565bc54833cf584b3f597fb/madame-0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "5cfb4752df5d73bca15cba6e9098701a", "sha256": "10769ad3d89ca16330adc4c9cd08defabba1ae1a3b3fa79e1ec470166d7ba572" }, "downloads": -1, "filename": "madame-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5cfb4752df5d73bca15cba6e9098701a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6879, "upload_time": "2013-01-03T02:49:15", "url": "https://files.pythonhosted.org/packages/ab/93/014b9233b70bb390e73ea125ba989f6fc88ad80950fd213411fd4201d0d6/madame-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "05c3ba27993334957c0946f3e0b1b8c3", "sha256": "8d205dff3eddf8609b8d8a314a05ee673706ef33555cd9ad40c208d7f882d899" }, "downloads": -1, "filename": "madame-0.1.1.tar.gz", "has_sig": false, "md5_digest": "05c3ba27993334957c0946f3e0b1b8c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8881, "upload_time": "2013-01-05T14:01:37", "url": "https://files.pythonhosted.org/packages/fc/62/03b1635cc7ddc9c495d5cc060ad6eba86cb299bd5c18f259709135aee43d/madame-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "9f27d1e99c7e05ed78b366a1a262a578", "sha256": "4dbc41a41160119e84649cfec9eda8bc60be7b68e3f051f1f913af81f3ebb5af" }, "downloads": -1, "filename": "madame-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9f27d1e99c7e05ed78b366a1a262a578", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8877, "upload_time": "2013-01-05T14:03:13", "url": "https://files.pythonhosted.org/packages/8a/02/2c12a22790f095363a84b5d1d1c82a4157a3b721255120cb9d42ced3029d/madame-0.1.2.tar.gz" } ], "0.1.2.a": [ { "comment_text": "", "digests": { "md5": "99e6748da1422ee4556c9ddea87152ef", "sha256": "c2b31c23274b6fd4bfc63643bfe54dc9a8236079f8341b3512fb6664462a77e8" }, "downloads": -1, "filename": "madame-0.1.2.a.tar.gz", "has_sig": false, "md5_digest": "99e6748da1422ee4556c9ddea87152ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8885, "upload_time": "2013-01-05T14:10:28", "url": "https://files.pythonhosted.org/packages/01/6a/5e2b046e476d384bb3c8009b6c3b3c1413519272bcf730a34fbdd728017a/madame-0.1.2.a.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f27d1e99c7e05ed78b366a1a262a578", "sha256": "4dbc41a41160119e84649cfec9eda8bc60be7b68e3f051f1f913af81f3ebb5af" }, "downloads": -1, "filename": "madame-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9f27d1e99c7e05ed78b366a1a262a578", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8877, "upload_time": "2013-01-05T14:03:13", "url": "https://files.pythonhosted.org/packages/8a/02/2c12a22790f095363a84b5d1d1c82a4157a3b721255120cb9d42ced3029d/madame-0.1.2.tar.gz" } ] }