{ "info": { "author": "Mahdi Ghane.g", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python :: 3 :: Only", "Topic :: Documentation", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Documentation" ], "description": "# RESTiro\n\n[![Build Status](\n https://travis-ci.org/meyt/restiro.svg?branch=master\n)](\n https://travis-ci.org/meyt/restiro\n) \n[![Coverage Status](\n https://coveralls.io/repos/github/meyt/restiro/badge.svg?branch=master\n)](\n https://coveralls.io/github/meyt/restiro?branch=master\n)\n\nRESTful API documentation generator (inline documentation + tests)\n\n\n## Features\n\n- [x] Inline documentation parser\n- [x] Example recorder middleware\n- [x] Generate documentation in Markdown \n- [x] Generate documentation in HTML \n[[restiro-spa-material](https://github.com/meyt/restiro-spa-material)]\n\n\n## Install\n\n```\n pip install restiro\n```\n\n## Usage\n\n1. Describe the request in comments, e.g:\n \n controller/shelf.py\n ```python\n class ShelfController:\n \n def post(self):\n \"\"\"\n @api {post} /shelf/:shelfId/book Add book into shelf\n \n @apiVersion 1\n @apiGroup Book\n @apiPermission Noneres\n \n @apiParam {String} title\n @apiParam {String} author\n @apiParam {DateTime} [publishDate]\n \n @apiDescription \n Here is some description\n with full support of markdown.\n \n - watch this!\n - and this!\n - there is a list!\n \"\"\"\n return [11, 22, 33]\n ```\n \n\n2. Attach `restiro` middleware to your WSGI/HTTP verifier\n (currently `webtest` supported), e.g:\n \n Your project tests initializer:\n \n ```python\n from restiro.middlewares.webtest import TestApp\n from restiro import clean_examples_dir\n \n from my_project import wsgi_app\n \n clean_examples_dir()\n test_app = TestApp(wsgi_app)\n \n ```\n\n3. Define responses to capture, e.g:\n\n ```python\n \n def test_shelf(test_app):\n test_app.get('/shelf/100/book')\n \n test_app.delete('/shelf/121/book')\n \n test_app.doc = True\n test_app.post(\n '/shelf/100/book',\n json={\n 'title': 'Harry Potter',\n 'author': 'JK. Rowling'\n }\n )\n \n test_app.doc = True\n test_app.post(\n '/shelf/100/book',\n json={\n 'title': 'Harry Potter2'\n },\n status=400\n )\n ```\n \n4. Run tests\n5. Build documentation \n \n ```\n $ restiro a_library\n ```\n\n Response will be something like: \n \n shelf-{shelf_id}-book-post.md\n ```markdown\n # Add book into shelf\n \n ## `POST` `/shelf/:shelfId/book`\n \n Here is some description\n with full support of markdown.\n \n - watch this!\n - and this!\n - there is a list!\n \n \n ## Parameters\n \n ### Form parameters\n \n Name | Type | Required | Default | Example | enum | Pattern | MinLength | MaxLength | Minimum | Maximum | Repeat | Description\n --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---\n title | String | `True` | | | | | | | | | `False` | \n author | String | `True` | | | | | | | | | `False` | \n publishDate | DateTime | `False` | | | | | | | | | `False` | \n \n ## Examples\n \n ### 200 OK\n \n #### Request: \n \n ```\n POST /shelf/100/book\n Content-Type: application/x-www-form-urlencoded\n ```\n ```\n title=Harry Potter\n author=JK. Rowling\n ```\n \n #### Response: \n \n ```\n Content-Type: application/json\n ```\n ```\n [11, 22, 33]\n ```\n \n \n ### 400 Bad Request, missed parameter `author`\n \n #### Request: \n \n ```\n POST /shelf/100/book\n Content-Type: application/x-www-form-urlencoded\n ```\n ```\n title=Harry Potter2\n ```\n \n #### Response: \n \n ```\n Content-Type: application/json\n ```\n ```\n {\"message\": \"Missed parameter `author`\"}\n ```\n \n ---\n ```\n \n \n## CLI\n\n```\nusage: restiro [-h] [-t TITLE] [-o OUTPUT] [-b BASE_URI]\n [-g {markdown,json,spa_material,mock}] [-l LOCALES]\n [--build-gettext [BUILD_GETTEXT]]\n src\n\nRestiro Builder\n\npositional arguments:\n src Project module name\n\noptional arguments:\n -h, --help show this help message and exit\n -t TITLE, --title TITLE\n Project title\n -o OUTPUT, --output OUTPUT\n Output directory\n -b BASE_URI, --base-uri BASE_URI\n Base URI\n -g {markdown,json,spa_material,mock}, --generator {markdown,json,spa_material,mock}\n Generator, default: markdown\n -l LOCALES, --locales LOCALES\n Locales directory\n --build-gettext [BUILD_GETTEXT]\n Build .POT templates\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/meyt/restiro", "keywords": "api_documentation api document_generator", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "restiro", "package_url": "https://pypi.org/project/restiro/", "platform": "", "project_url": "https://pypi.org/project/restiro/", "project_urls": { "Homepage": "http://github.com/meyt/restiro" }, "release_url": "https://pypi.org/project/restiro/0.19.1/", "requires_dist": null, "requires_python": "", "summary": "RESTful API documentation generator", "version": "0.19.1" }, "last_serial": 5576121, "releases": { "0.10.0": [ { "comment_text": "", "digests": { "md5": "b4666102d592567e923270bf9dc11e47", "sha256": "f5b1216a6d5f3c31867413c51fbce0002f4b323a8dc0adba3cf1cf68814b94e1" }, "downloads": -1, "filename": "restiro-0.10.0.tar.gz", "has_sig": false, "md5_digest": "b4666102d592567e923270bf9dc11e47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19487, "upload_time": "2019-04-22T07:33:30", "url": "https://files.pythonhosted.org/packages/bc/d1/43e9fd8c5d0beae7e6345472170b88beb3f7656649bfe57da0718ea92113/restiro-0.10.0.tar.gz" } ], "0.11.0": [ { "comment_text": "", "digests": { "md5": "85212c1a88f4b4a23301744f4c69c0c6", "sha256": "d0b3849c8138802bc94dc53793be0d8381f7ae6db76f9fb0f55896b9f9ce535d" }, "downloads": -1, "filename": "restiro-0.11.0.tar.gz", "has_sig": false, "md5_digest": "85212c1a88f4b4a23301744f4c69c0c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19388, "upload_time": "2019-04-22T08:40:52", "url": "https://files.pythonhosted.org/packages/6b/db/ee70ee0a8f7fbd7f4273738b4ec38a5ea970ec7110cfdae26adcb23c7619/restiro-0.11.0.tar.gz" } ], "0.12.0": [ { "comment_text": "", "digests": { "md5": "1a985b9f4393e87621a17913c4f0753b", "sha256": "cfd51da4a8120a89e2717ab02a71ea9ed7898f4b4eb387d9e689e6f2f5e9d9ad" }, "downloads": -1, "filename": "restiro-0.12.0.tar.gz", "has_sig": false, "md5_digest": "1a985b9f4393e87621a17913c4f0753b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19407, "upload_time": "2019-04-24T06:53:54", "url": "https://files.pythonhosted.org/packages/59/15/29245d2a20a0801f3689dec4ecd9024c91a0acb6293f69dc79586a182642/restiro-0.12.0.tar.gz" } ], "0.13.0": [ { "comment_text": "", "digests": { "md5": "809a078bb0c4651f8a85a25f99070b22", "sha256": "0f3dbb5e0fc64c3a86b4f84f9ec515a8cd7ece25be24d27767362bdf57932c2b" }, "downloads": -1, "filename": "restiro-0.13.0-py3-none-any.whl", "has_sig": false, "md5_digest": "809a078bb0c4651f8a85a25f99070b22", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27052, "upload_time": "2019-06-08T21:10:05", "url": "https://files.pythonhosted.org/packages/05/92/979817c0668242ed13be4f54657d294f218ebfcd7e474319c01b8f9df2bf/restiro-0.13.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00a69ba2cfd0ba267f8ed9c8f314a6b5", "sha256": "c29f1263703ad34f58cf67436164018cdcbea0d9386387888fd1fa7d01ea88c0" }, "downloads": -1, "filename": "restiro-0.13.0.tar.gz", "has_sig": false, "md5_digest": "00a69ba2cfd0ba267f8ed9c8f314a6b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21051, "upload_time": "2019-06-08T21:10:11", "url": "https://files.pythonhosted.org/packages/ac/71/59235b2214e453eba67aba8e8c14469b08f5479b1e60e9ec01bbb7fc1bf0/restiro-0.13.0.tar.gz" } ], "0.14.0": [ { "comment_text": "", "digests": { "md5": "3bd5107d45921155f7321cfd17c34e25", "sha256": "65ff3eb2c03090e8c28c3dce57f9c51528f2a7afabeddd79e240cbb7d5937314" }, "downloads": -1, "filename": "restiro-0.14.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3bd5107d45921155f7321cfd17c34e25", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27242, "upload_time": "2019-06-11T05:58:47", "url": "https://files.pythonhosted.org/packages/08/ef/90f4eedc694eac2205f18e39f17d3abf5231df027b746ac3fe70df03b146/restiro-0.14.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9668cc748443ae723fcfeb869a73bd69", "sha256": "e0d23f372366be38a6d7cafb20d111791a665b365f0479853403f2e8a510a478" }, "downloads": -1, "filename": "restiro-0.14.0.tar.gz", "has_sig": false, "md5_digest": "9668cc748443ae723fcfeb869a73bd69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21204, "upload_time": "2019-06-11T05:58:49", "url": "https://files.pythonhosted.org/packages/f5/2f/ca178880db910aba502a33daac60f1cace1f9c0b5c4f3ef32e8ce85f10db/restiro-0.14.0.tar.gz" } ], "0.15.0": [ { "comment_text": "", "digests": { "md5": "c884ed50637506abec31edf0ce56fc7e", "sha256": "e97aecd4a19bbec7630a0f715de484a540f55abbdf4ca2e2e3461950806cee44" }, "downloads": -1, "filename": "restiro-0.15.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c884ed50637506abec31edf0ce56fc7e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28053, "upload_time": "2019-06-12T08:56:06", "url": "https://files.pythonhosted.org/packages/0d/4a/de759d73bf149d6542a2ae4533664a1bfb7c737717a75d3eeea1d1ac77ca/restiro-0.15.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c7d5944bfcec751fdcc0c67f397c0972", "sha256": "1f025c70f22ff2518a089de753986ebd870326da6a675f6bebb9a92e984ffb85" }, "downloads": -1, "filename": "restiro-0.15.0.tar.gz", "has_sig": false, "md5_digest": "c7d5944bfcec751fdcc0c67f397c0972", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21615, "upload_time": "2019-06-12T08:56:09", "url": "https://files.pythonhosted.org/packages/ac/83/591877500ff3412c1259f5865d0c4f3384d8b4dca35fa15466c593a29f30/restiro-0.15.0.tar.gz" } ], "0.16.0": [ { "comment_text": "", "digests": { "md5": "024a3df8f7b28c46e500f926b2733133", "sha256": "4da60221f60b255adffd33e298bf5e9f09067c30bc057934ee39c1b71a7a8055" }, "downloads": -1, "filename": "restiro-0.16.0-py3-none-any.whl", "has_sig": false, "md5_digest": "024a3df8f7b28c46e500f926b2733133", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28016, "upload_time": "2019-07-06T04:58:43", "url": "https://files.pythonhosted.org/packages/71/89/5af5a1bd1d904449ebdc3832a56c22703941281579916a14746030814703/restiro-0.16.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "193283904824c40b1c55e2202cdae9b5", "sha256": "d1601896e1a7a3d5b5702e67a05e372a9156faa363a3630f4f9bc36b28cbb954" }, "downloads": -1, "filename": "restiro-0.16.0.tar.gz", "has_sig": false, "md5_digest": "193283904824c40b1c55e2202cdae9b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21582, "upload_time": "2019-07-06T04:58:45", "url": "https://files.pythonhosted.org/packages/7f/e9/2f3576ecf379df2c61a2a8cbce73421830cf7d0d2c73da95ce053a146b52/restiro-0.16.0.tar.gz" } ], "0.17.0": [ { "comment_text": "", "digests": { "md5": "62350b0f0f430263f8f30390fe0ba26a", "sha256": "f87c8179a648257c5088560432b6262452e6f57ab81794a631303e532cf79ce9" }, "downloads": -1, "filename": "restiro-0.17.0-py3-none-any.whl", "has_sig": false, "md5_digest": "62350b0f0f430263f8f30390fe0ba26a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28055, "upload_time": "2019-07-06T06:45:11", "url": "https://files.pythonhosted.org/packages/93/c1/f056d618611e691bb91ec4ffe016576dccf47dd094f770aa173b160b9c21/restiro-0.17.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3188d5870f89bbe69cb7ec1c95e54540", "sha256": "ebf237255cdc8e423139149f25e1d0ce456354e88d27dfa97b076f69b55f8f41" }, "downloads": -1, "filename": "restiro-0.17.0.tar.gz", "has_sig": false, "md5_digest": "3188d5870f89bbe69cb7ec1c95e54540", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21617, "upload_time": "2019-07-06T06:45:13", "url": "https://files.pythonhosted.org/packages/68/a4/4dac63edf93ee0bdfbb40ef74867dcdde77115f72b3fa5bd74e7a89be6a4/restiro-0.17.0.tar.gz" } ], "0.19.1": [ { "comment_text": "", "digests": { "md5": "81607b69955a3be0e479cf15bd00d790", "sha256": "fb9b7083fc0b5aff83abfe5a59015c4cddd9762c2e94d34dbddc569aa971f2a3" }, "downloads": -1, "filename": "restiro-0.19.1.tar.gz", "has_sig": false, "md5_digest": "81607b69955a3be0e479cf15bd00d790", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20468, "upload_time": "2019-07-24T06:45:14", "url": "https://files.pythonhosted.org/packages/29/67/d38869a30917fd80a875fc04de8aea30e45349a67d1c8db66fc22cef2955/restiro-0.19.1.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "597fc765b7f56cbdfdc14e06000713f6", "sha256": "ede79a9e5685ec645b61185170848ba27ccaf09dbaa758962304f3e1bccd4f0a" }, "downloads": -1, "filename": "restiro-0.7.0.tar.gz", "has_sig": false, "md5_digest": "597fc765b7f56cbdfdc14e06000713f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17244, "upload_time": "2019-02-28T07:59:57", "url": "https://files.pythonhosted.org/packages/ec/20/cb30e1f836ce211608f295531db5f822cdd7c00451301029c33c1d53f230/restiro-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "c15152dc2e0d56d48f519c27f0e15af7", "sha256": "e793e8ca9f1b36110b10089f9e5205f9c21c436ab43e45dce86f0978d5d9ccec" }, "downloads": -1, "filename": "restiro-0.8.0.tar.gz", "has_sig": false, "md5_digest": "c15152dc2e0d56d48f519c27f0e15af7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18443, "upload_time": "2019-04-11T17:06:00", "url": "https://files.pythonhosted.org/packages/a1/80/07b2ddd28663d44d4c56b5b1faa947d98888aeb81f0e5a808b3c40ba3baf/restiro-0.8.0.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "02f39cfc425885787c22bd5b6f55caaf", "sha256": "60dfcf17c606a721c88c9d6d708f099c1457aa2a0abc493f0317cd177ca15bfe" }, "downloads": -1, "filename": "restiro-0.9.0.tar.gz", "has_sig": false, "md5_digest": "02f39cfc425885787c22bd5b6f55caaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18748, "upload_time": "2019-04-18T05:03:34", "url": "https://files.pythonhosted.org/packages/44/ba/ac46ef302a6ee616c704a8c1f0a31bcbaa22447cbbd17661065f24327034/restiro-0.9.0.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "60e1b485cadd3e72e3c16559e2a66bb2", "sha256": "ab863f7c40a067c110ff6c3dd7bad55897fa58d685d144b63fca7380caf28fea" }, "downloads": -1, "filename": "restiro-0.9.1.tar.gz", "has_sig": false, "md5_digest": "60e1b485cadd3e72e3c16559e2a66bb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19687, "upload_time": "2019-04-22T05:36:04", "url": "https://files.pythonhosted.org/packages/59/00/ed7bb8c8a75cdf0b34daf730c235d6407bd8ae27e8c849f46acb58432972/restiro-0.9.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "81607b69955a3be0e479cf15bd00d790", "sha256": "fb9b7083fc0b5aff83abfe5a59015c4cddd9762c2e94d34dbddc569aa971f2a3" }, "downloads": -1, "filename": "restiro-0.19.1.tar.gz", "has_sig": false, "md5_digest": "81607b69955a3be0e479cf15bd00d790", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20468, "upload_time": "2019-07-24T06:45:14", "url": "https://files.pythonhosted.org/packages/29/67/d38869a30917fd80a875fc04de8aea30e45349a67d1c8db66fc22cef2955/restiro-0.19.1.tar.gz" } ] }