{ "info": { "author": "UNKNOWN", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3 :: Only", "Topic :: Documentation", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Documentation", "Topic :: Software Development :: Testing", "Topic :: Text Processing :: Markup", "Topic :: Utilities" ], "description": "okapi\n=====\n\n.. image:: https://circleci.com/gh/Team-Zeus/okapi/tree/master.svg?style=svg&circle-token=71c675badd691f1e9e51bee3633b8fcf105497d6\n :target: https://circleci.com/gh/Team-Zeus/okapi/tree/master\n\n**To have API documentation OK.**\n\nOkapi is a simple tool to create **documentation for your API** and **cover\nit with tests**. It is based on *reStructuredText* format and very easy to learn.\n\n\n----\n\n.. contents:: **Contents:**\n\n----\n\n\n.. image:: https://c1.staticflickr.com/9/8050/8429119812_884f135860_b.jpg\n :alt: Okapi\n :width: 25%\n :align: right\n\n\nRequirements\n------------\n\n- Python **3.4**\n\nFor developing install requirements from ``requirements.txt``.\n\n.. code:: bash\n\n pip install -r requirements.txt\n\n\nInstallation\n------------\n\n.. code:: bash\n\n sudo pip3 install tz-okapi\n\n\nInstall from sources:\n\n.. code:: bash\n\n python setup.py install\n\n\nInstall from package:\n\n.. code:: bash\n\n pip install wheel\n pip install tz_okapi-*.whl\n\n\nOn Windows you might add Python to paths::\n\n setx path \"%path%;C:\\Python34;C:\\Python34\\Scripts;\"\n\n\nUsage\n-----\n\n::\n\n okapi\n\n Usage:\n okapi [ -cdo --url= --config= --headers= -v --prototype]\n\n Options:\n -c Enable persistent cache for responses.\n -d Allow debug mode.\n -o Output directory\n -v Verbosity level [default: 2]\n 0 - no output\n 1 - summary\n 2 - failed tests\n 3 - all\n\n --url= URL against the requests are made\n --headers= Custom headers sent to API, not visible in doc.\n (Comma separated).\n --config= Config file. [default: okapi.cfg]\n --prototype Run in prototype mode (no requests are made).\n\n Example:\n okapi notebook.rst -o index.html --url=http://www.notebook.com/\n\n\nExample configuration file\n**************************\n\n.. code:: ini\n\n [base]\n file = notebook-api.rst\n output = docs/api\n url = http://www.mynotebook/\n cache = 1\n templates = docs/api/templates\n verbosity = 2\n\n\n\nExample\n-------\n\n.. code:: rst\n\n Notebook API documentation\n ==========================\n\n Notebook is a project to create and read notes.\n\n In every request, it should be sent this headers:\n\n .. code:: headers\n\n Accept-Type: application/json\n Accept-Language: en,fr\n\n\n Create new note\n ---------------\n\n To create new note use this POST method. Note can be created\n only with authenticated user.\n\n .. code:: request\n\n POST /api/note/create/\n Authentication: johnsmith:topsecretpass\n\n {\n \"title\": \"My Note Title\",\n \"text\": \"Very long text...\"\n }\n\n > status_code == 201\n > 'id' in json()\n\n If user is not successfully authenticated, status code ``401``\n is returned:\n\n .. code:: request\n\n POST /api/note/create/\n\n > status_code == 401\n\n\n Get note detail\n ---------------\n\n To get note detail, you have to provide its ``id``.\n\n For example:\n\n .. code:: request\n\n GET /api/note/{id:1}/\n\n > status_code == 200\n > 'title' in json()\n > 'text' in json()\n\n\n Get notes list\n --------------\n\n To get all notes use this request:\n\n .. code:: request\n\n GET /api/notes/\n\n > status_code == 200\n\n It is possible to filter by creation date:\n\n .. code:: request\n\n GET /api/notes/?date=2015-01-01\n\n > status_code == 200\n\n\nNot enough? Continue in reading...\n\nMotivation\n----------\n\nWe were long time looking for a tool to create documentation for APIs of\nour projects. We tried `Apiary `_, we tried\n`Swagger `_ and more and more tools, but none has satisfied us.\n\nWe needed tool, which would be:\n\n- **DRY.** We are lazy to repeat our selves. Repeating is a way do many mistakes.\n- **KISS.** Every member of team should be able to edit it without knowing some\n special syntax or rules. So super stupid simple.\n- **Changeable.** It means, that man wouldn't edit documentation for hours after\n every small change in API.\n- **Readable** in raw format.\n- Usable for **non-REST APIs** (but for REST API, too, of course).\n- **Testable.** Documentation not covered with tests is hard to maintance.\n\n\nSpecification\n-------------\n\nheaders\n*******\n\nBlock used at the beginning of document to set common headers sent with\nrequest and disabled headers hidden from response. It should be used only\nonce.\n\n::\n\n .. code:: headers\n\n [HEADER_NAME: HEADER_VALUE]\n ...\n\n\nrequest\n*******\n\nBlock to describe API request. It has four parts:\n\n1. method and url (required)\n2. headers (optional)\n3. payload (optional)\n4. tests (recommended)\n\n::\n\n .. code:: request\n\n (GET|POST|PUT|PATCH|DELETE|OPTIONS|HEAD|TRACE|CONNECT) (URL) [HTTP_VERSION]\n [HEADER_NAME: HEADER_VALUE]\n ...\n\n [{ ... json payload ... }]\n\n [\n > tests\n > ..\n ]\n\n\nurl\n****\n\nURL cannot contain any space. Use encoded strings (``%20`` or ``+``).\n\nURLs can be with described params:\n\n::\n\n {NAME:VALUE}\n\neg.::\n\n /api/note/{typeId:1}/{noteId:3}/\n\n\n\nChange log\n==========\n\nRelease 0.2.10 (2015/09/24)\n---------------------------\n\n- Disable redirects in API requests.\n\nRelease 0.2.9 (2015/09/22)\n--------------------------\n\n- Fix UnicodeEncodeError during saving output.\n\nRelease 0.2.8 (2015/08/05)\n--------------------------\n\n- #32 - Add MIT license\n- #33 - Fix bad interpreter error.\n\nRelease 0.2.7 (2015/08/04)\n--------------------------\n\n- #12 - Fix path with using of include directive.\n\nRelease 0.2.6 (2015/08/04)\n--------------------------\n\n- #30 - Added ``--prototype`` option to run in prototype mode. Prototype mode\n doesn't execute any request, responses are faked.\n\n- #31 - Added automatically generated sidebar TOC to default template.\n\nRelease 0.2.5 (2015/07/27)\n--------------------------\n\n- #27 - Added *click on scroll* functionality. Request and response are not\n scrollable by default, user has to click on them.\n\n- #26 - Fixed default template to show response status code even if response\n is empty.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Team-Zeus/okapi", "keywords": "api,rest,restructuredtext,rst", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "tz-okapi", "package_url": "https://pypi.org/project/tz-okapi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tz-okapi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Team-Zeus/okapi" }, "release_url": "https://pypi.org/project/tz-okapi/0.2.10/", "requires_dist": null, "requires_python": null, "summary": "Okapi is a simple tool to create documentation for your API and cover\nit with tests. It is based on reStructuredText format and very easy to learn.", "version": "0.2.10" }, "last_serial": 1735928, "releases": { "0.2.0": [], "0.2.1": [ { "comment_text": "", "digests": { "md5": "79bdfa2bcf574d9093cf1205277bae89", "sha256": "24c21a9b2cf967c2373825895dc87cc28e8fa8e740ff6d670795b27d86ee323e" }, "downloads": -1, "filename": "tz_okapi-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "79bdfa2bcf574d9093cf1205277bae89", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 30957, "upload_time": "2015-07-16T11:49:13", "url": "https://files.pythonhosted.org/packages/c0/27/f59b78f35d2e411b5e1b1bba6a1ee4d6feab10b6e391b733f85a60a38463/tz_okapi-0.2.1-py3-none-any.whl" } ], "0.2.10": [ { "comment_text": "", "digests": { "md5": "066541ef60e0e6a50a1312b7733d1bc2", "sha256": "04c9478c7e00e507e23a9e207a824f167ca7cb08f2eac8d639d7c247476a9dda" }, "downloads": -1, "filename": "tz_okapi-0.2.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "066541ef60e0e6a50a1312b7733d1bc2", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 32452, "upload_time": "2015-09-24T08:11:36", "url": "https://files.pythonhosted.org/packages/ae/4d/4fbf1293555ba99aa261066fc5517c4ac60d14c0815db821c892ae566914/tz_okapi-0.2.10-py2.py3-none-any.whl" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "e59f54177ee42a02747c0df986a53722", "sha256": "8e834f276e18fcffa3172a5ee71ad0e7ac5b5b84520f1f9d41d447c2c6c8cbc5" }, "downloads": -1, "filename": "tz_okapi-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e59f54177ee42a02747c0df986a53722", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 30940, "upload_time": "2015-07-21T09:00:06", "url": "https://files.pythonhosted.org/packages/68/a3/b0592fc9bcd4f1af346ddd7100beb23a9d9705a7dc937a0e035c496feed3/tz_okapi-0.2.2-py3-none-any.whl" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "7ec253fcaccabe19ab2dac42915f8baf", "sha256": "f92a530b5e22d2b29a5ef99aeaa18fbcb784b57236a5cffd3442abca6b0b9d3a" }, "downloads": -1, "filename": "tz_okapi-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7ec253fcaccabe19ab2dac42915f8baf", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 31312, "upload_time": "2015-07-23T13:39:04", "url": "https://files.pythonhosted.org/packages/fc/45/f71e05b0e4f5b2ba9745783112c8c0e601d74b6f1c1be3c2d1cfcb6e7cc7/tz_okapi-0.2.3-py3-none-any.whl" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "d78c47ff2f50e3a73fe5303ae9a0b1b6", "sha256": "2ca96fd49965b1abb93f4e2c047ef0e3ceca2121065d7f2ec92a39dd57db7570" }, "downloads": -1, "filename": "tz_okapi-0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "d78c47ff2f50e3a73fe5303ae9a0b1b6", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 31315, "upload_time": "2015-07-23T13:46:42", "url": "https://files.pythonhosted.org/packages/e2/d1/caf30ebe3be4005f241987b7acd1661f4d02e801af1a31d36ada2459a751/tz_okapi-0.2.4-py3-none-any.whl" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "169440d0472522a02e34d09b93e3d0f2", "sha256": "4634ac0e1c5670879fc770f09fcb531e55aec9b034616a876a2dd044f9ec776d" }, "downloads": -1, "filename": "tz_okapi-0.2.5-py2-none-any.whl", "has_sig": false, "md5_digest": "169440d0472522a02e34d09b93e3d0f2", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 31094, "upload_time": "2015-07-31T19:29:00", "url": "https://files.pythonhosted.org/packages/2d/2a/43a6e90350c0135412f9a104bd36ffad70ff24760f42d01e512902483ab8/tz_okapi-0.2.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57220e162f9e18ec47caac93e19cdc27", "sha256": "a2f919350958a776a248d1d94a3e41adba4ce8e6cd95401732ca5cc767aea17e" }, "downloads": -1, "filename": "tz_okapi-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "57220e162f9e18ec47caac93e19cdc27", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 31538, "upload_time": "2015-07-27T12:44:28", "url": "https://files.pythonhosted.org/packages/08/0a/75f279e7ab74c02d6ca82b2da7e5b5e3b985f57c14d409fd0bbc432006dd/tz_okapi-0.2.5-py3-none-any.whl" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "bec9fceb7f4e51f8f98533d756ca45ff", "sha256": "01662f47a356bdf87676975dc11cce8981fdd755895ef2c369fe5420c2ce48f7" }, "downloads": -1, "filename": "tz_okapi-0.2.6-py3-none-any.whl", "has_sig": false, "md5_digest": "bec9fceb7f4e51f8f98533d756ca45ff", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 33285, "upload_time": "2015-08-04T12:52:42", "url": "https://files.pythonhosted.org/packages/9e/53/d2b978e63edf0dff6aba7cc888461c407a20c3c15175e22ccecab6e63404/tz_okapi-0.2.6-py3-none-any.whl" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "3d29bdb4db974698eab95e890c623eba", "sha256": "6b557db791188cdd36faf9995b7d0d8b8023c0391600772b26d7f2510a2b5e19" }, "downloads": -1, "filename": "tz_okapi-0.2.7-py3-none-any.whl", "has_sig": false, "md5_digest": "3d29bdb4db974698eab95e890c623eba", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 33418, "upload_time": "2015-08-04T13:55:39", "url": "https://files.pythonhosted.org/packages/91/ed/5955c63aecda94a30e71eb78fbfce72b7a77bc6de12915f2f7504a3b8c78/tz_okapi-0.2.7-py3-none-any.whl" } ], "0.2.8": [], "0.2.8.post1": [ { "comment_text": "", "digests": { "md5": "b6d89864fbc5e01dd30edcf238c18d8c", "sha256": "05e09f22ffc6b18754251ac43014bcdd43d0fbd6c1494af5da720dcefa96a58e" }, "downloads": -1, "filename": "tz_okapi-0.2.8.post1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b6d89864fbc5e01dd30edcf238c18d8c", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 33628, "upload_time": "2015-08-05T11:29:10", "url": "https://files.pythonhosted.org/packages/b7/8d/3034946eda133b4b2742c11e8869df6353eeb98b751803d011169fd21636/tz_okapi-0.2.8.post1-py2.py3-none-any.whl" } ], "0.2.9": [ { "comment_text": "", "digests": { "md5": "a402d6fac7bef3740cb58316e3f55e6e", "sha256": "b37e3b27a0a1157b2779b71f94414f2f3c2b7dcfdf05db7f0a5433a8d6ef2dbc" }, "downloads": -1, "filename": "tz_okapi-0.2.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a402d6fac7bef3740cb58316e3f55e6e", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 32362, "upload_time": "2015-09-22T06:29:24", "url": "https://files.pythonhosted.org/packages/0d/54/8fe09f37e256fe99fc38ba4a64626172c68c323eaaa703dbe92746e73545/tz_okapi-0.2.9-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "066541ef60e0e6a50a1312b7733d1bc2", "sha256": "04c9478c7e00e507e23a9e207a824f167ca7cb08f2eac8d639d7c247476a9dda" }, "downloads": -1, "filename": "tz_okapi-0.2.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "066541ef60e0e6a50a1312b7733d1bc2", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 32452, "upload_time": "2015-09-24T08:11:36", "url": "https://files.pythonhosted.org/packages/ae/4d/4fbf1293555ba99aa261066fc5517c4ac60d14c0815db821c892ae566914/tz_okapi-0.2.10-py2.py3-none-any.whl" } ] }