{ "info": { "author": "Santiago Fraire Willemoes", "author_email": "santiwilly@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP" ], "description": "==================\nStarlette APISpec\n==================\n\n Easy APISpec integration for Starlette\n\n.. image:: https://img.shields.io/travis/Woile/starlette-apispec.svg?style=flat-square\n :alt: Travis\n :target: https://travis-ci.org/Woile/starlette-apispec\n\n.. image:: https://img.shields.io/codecov/c/github/Woile/starlette-apispec.svg?style=flat-square\n :alt: Codecov\n :target: https://codecov.io/gh/Woile/starlette-apispec\n\n.. image:: https://img.shields.io/pypi/v/starlette-apispec.svg?style=flat-square\n :alt: PyPI\n :target: https://pypi.org/project/starlette-apispec/\n\n.. image:: https://img.shields.io/pypi/pyversions/starlette-apispec.svg?style=flat-square\n :alt: PyPI - Python Version\n :target: https://pypi.org/project/starlette-apispec/\n\n.. contents::\n :depth: 2\n\n.. code-block:: python\n\n from apispec import APISpec\n from apispec.ext.marshmallow import MarshmallowPlugin\n from starlette.applications import Starlette\n from starlette_apispec import APISpecSchemaGenerator\n\n app = Starlette()\n\n schemas = APISpecSchemaGenerator(\n APISpec(\n title=\"Example API\",\n version=\"1.0\",\n openapi_version=\"3.0.0\",\n info={\"description\": \"explanation of the api purpose\"},\n plugins=[MarshmallowPlugin()],\n )\n )\n\n @app.route(\"/schema\", methods=[\"GET\"], include_in_schema=False)\n def schema(request):\n return schemas.OpenAPIResponse(request=request)\n\n\nInstallation\n============\n\n::\n\n pip install -U starlette-apispec\n\nAlternatively you can do\n\n::\n\n poetry add starlette-apispec\n\nAbout\n-----\n\nThis library helps you easily document your REST API built with starlette.\n\nStarlette_ is a is a lightweight ASGI framework/toolkit,\nwhich is ideal for building high performance asyncio services.\n\nAPISpec_ supports the `OpenApi Specification `_\nand it has some useful plugins like marshmallow_ support.\n\nVersion supported: :code:`^1.0.0`\n\n\nUsage\n=====\n\n\nThis example includes marshmallow_ integration\n\n.. code-block:: python\n\n from apispec import APISpec\n\n from starlette.applications import Starlette\n from starlette.endpoints import HTTPEndpoint\n from starlette.testclient import TestClient\n\n from starlette_apispec import APISpecSchemaGenerator\n\n\n app = Starlette()\n\n schemas = APISpecSchemaGenerator(\n APISpec(\n title=\"Example API\",\n version=\"1.0\",\n openapi_version=\"3.0.0\",\n info={\"description\": \"explanation of the api purpose\"},\n )\n )\n\n\n @app.websocket_route(\"/ws\")\n def ws(session):\n \"\"\"ws\"\"\"\n pass # pragma: no cover\n\n\n @app.route(\"/users\", methods=[\"GET\", \"HEAD\"])\n def list_users(request):\n \"\"\"\n responses:\n 200:\n description: A list of users.\n examples:\n [{\"username\": \"tom\"}, {\"username\": \"lucy\"}]\n \"\"\"\n pass # pragma: no cover\n\n\n @app.route(\"/users\", methods=[\"POST\"])\n def create_user(request):\n \"\"\"\n responses:\n 200:\n description: A user.\n examples:\n {\"username\": \"tom\"}\n \"\"\"\n pass # pragma: no cover\n\n\n @app.route(\"/orgs\")\n class OrganisationsEndpoint(HTTPEndpoint):\n def get(self, request):\n \"\"\"\n responses:\n 200:\n description: A list of organisations.\n examples:\n [{\"name\": \"Foo Corp.\"}, {\"name\": \"Acme Ltd.\"}]\n \"\"\"\n pass # pragma: no cover\n\n def post(self, request):\n \"\"\"\n responses:\n 200:\n description: An organisation.\n examples:\n {\"name\": \"Foo Corp.\"}\n \"\"\"\n pass # pragma: no cover\n\n\n @app.route(\"/schema\", methods=[\"GET\"], include_in_schema=False)\n def schema(request):\n return schemas.OpenAPIResponse(request=request)\n\nMore documentation\n==================\n\nThis package is basically a proxy, so if you wonder how to do something,\nhere are the sources you need:\n\n`Starlette documentation`_\n\n`APISpec documentation`_\n\n\nTesting\n=======\n\n1. Clone the repo\n2. Activate venv ``. venv/bin/activate``\n3. Install dependencies\n\n::\n\n poetry install\n\n4. Run tests\n\n::\n\n ./scripts/test\n\n\nContributing\n============\n\n**PRs are welcome!**\n\n\n.. _marshmallow: https://marshmallow.readthedocs.io/\n.. _APISpec: https://apispec.readthedocs.io/en/stable/\n.. _Starlette: https://www.starlette.io/\n.. _`Starlette documentation`: https://www.starlette.io/\n.. _`APISpec documentation`: https://apispec.readthedocs.io/en/stable/\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Woile/starlette-apispec", "keywords": "openapi,api,swagger", "license": "BSD-3-Clause", "maintainer": "Santiago Fraire Willemoes", "maintainer_email": "santiwilly@gmail.com", "name": "starlette-apispec", "package_url": "https://pypi.org/project/starlette-apispec/", "platform": "", "project_url": "https://pypi.org/project/starlette-apispec/", "project_urls": { "Homepage": "https://github.com/Woile/starlette-apispec" }, "release_url": "https://pypi.org/project/starlette-apispec/1.0.2/", "requires_dist": [ "apispec (>=1.0.0,<2.0.0)", "starlette (>=0.11)", "pyyaml (>=5.1,<6.0)" ], "requires_python": ">=3.6,<4.0", "summary": "APISpec support for starlette", "version": "1.0.2" }, "last_serial": 5392031, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "90b14267cdc9da3f8ca2385bfca10f28", "sha256": "86ed783ef25de22730f6f0089b65bb2ec4351bded80b6b8c64db575db2322566" }, "downloads": -1, "filename": "starlette_apispec-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "90b14267cdc9da3f8ca2385bfca10f28", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 5648, "upload_time": "2018-11-23T17:21:10", "url": "https://files.pythonhosted.org/packages/c7/1b/eff2fc452d638fee22cf93c34c57a0a40d575c3f29b860d90753c38fe043/starlette_apispec-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1c07f235b6b55e86ccc9753c30f13fa", "sha256": "0ca5d0d2a80048d4b14d18a2dcf54a49125e5aeb52f3539e01ddc5c4c668982b" }, "downloads": -1, "filename": "starlette-apispec-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c1c07f235b6b55e86ccc9753c30f13fa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4572, "upload_time": "2018-11-23T17:21:08", "url": "https://files.pythonhosted.org/packages/02/09/fa994b7989f8104d566d6d8726892880551ec5170a301e74bff19da6ee28/starlette-apispec-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b5ce0d42adaa7ff7c4b5ac2616e37a2d", "sha256": "6eaf67cd521c6ff2c7f9e752df189250c43f662a53e4459159001873b46130a7" }, "downloads": -1, "filename": "starlette_apispec-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b5ce0d42adaa7ff7c4b5ac2616e37a2d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 5651, "upload_time": "2018-11-23T17:59:09", "url": "https://files.pythonhosted.org/packages/c1/a0/44721f602d323784c19234f92138316cec7b293e4ffd6a81ca0e94b64653/starlette_apispec-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ecfa6b6bb891b90203f6b4ecfb5dc03e", "sha256": "306c4efb6cec776adf0687caec44a2a6860ad5718e28f30dbd189105b6fcebcb" }, "downloads": -1, "filename": "starlette-apispec-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ecfa6b6bb891b90203f6b4ecfb5dc03e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4574, "upload_time": "2018-11-23T17:59:07", "url": "https://files.pythonhosted.org/packages/4c/98/d7fcbcdec122f3daec6782e27eb2624f35d20249641ae2d878ef3c21d98d/starlette-apispec-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "53cd64cae77c85c6c774d21294ecc2c5", "sha256": "ef7563c294a1186585345f3c67da532684ec8fb21215e24bc76a9940ab8c664e" }, "downloads": -1, "filename": "starlette_apispec-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "53cd64cae77c85c6c774d21294ecc2c5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 5648, "upload_time": "2018-12-18T15:20:32", "url": "https://files.pythonhosted.org/packages/c2/f1/3d2f1e27736bff3ac66c4b330063e160d337363ac43f09f4ac22de141d67/starlette_apispec-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ffcc355225295154b261034246d962bc", "sha256": "77847d999a69ffb7fc5f9aeedb5af020127dd237ff00aabc0ac4ee46e2473c1a" }, "downloads": -1, "filename": "starlette-apispec-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ffcc355225295154b261034246d962bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4579, "upload_time": "2018-12-18T15:20:29", "url": "https://files.pythonhosted.org/packages/4e/d9/18b59b6ca325d806c166f8586b8bfe8be1bb3e8456a46da80a885f7ccbde/starlette-apispec-0.1.3.tar.gz" } ], "1.0.0b1": [ { "comment_text": "", "digests": { "md5": "8702e925baed4ee629f2870a5bdf17ea", "sha256": "41be11173e5ab021df674432ee4c4fef90144ff5600e980190ab3e1e64c71141" }, "downloads": -1, "filename": "starlette_apispec-1.0.0b1-py3-none-any.whl", "has_sig": false, "md5_digest": "8702e925baed4ee629f2870a5bdf17ea", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 5692, "upload_time": "2019-01-03T14:16:39", "url": "https://files.pythonhosted.org/packages/ae/74/1c69fdac4e6f992b8eab93defc434e4eabd22c48ad7f303719ae5e6103fc/starlette_apispec-1.0.0b1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ae7d011e3fc68e9faca8e9d8256c4dc", "sha256": "541483204b06f343c4979183520155de0a02acef092a74f1c486c83bdea29083" }, "downloads": -1, "filename": "starlette-apispec-1.0.0b1.tar.gz", "has_sig": false, "md5_digest": "4ae7d011e3fc68e9faca8e9d8256c4dc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4585, "upload_time": "2019-01-03T14:16:38", "url": "https://files.pythonhosted.org/packages/6c/12/e11b10caa47d6e4d1a8f31de09364a78e9ad9620947f316043464d90906b/starlette-apispec-1.0.0b1.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "a8d357c4e64c874e723f3b87f1cfe428", "sha256": "181de975ff02f9c6f0da17743056edc7812a9033fff1cb41cbfc6bd041b2769e" }, "downloads": -1, "filename": "starlette_apispec-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a8d357c4e64c874e723f3b87f1cfe428", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 5682, "upload_time": "2019-02-16T10:55:57", "url": "https://files.pythonhosted.org/packages/63/f3/95ba98a9ddc97f53d5c9765cf301317935b1f714f5f9068e2cc37cfe0e57/starlette_apispec-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a1dc987828fd8386a6e5dc0c30dea5b", "sha256": "fe2c7035a1727739d004f3937942750796b9652b2ddf329c50e135a12ed6e138" }, "downloads": -1, "filename": "starlette-apispec-1.0.1.tar.gz", "has_sig": false, "md5_digest": "3a1dc987828fd8386a6e5dc0c30dea5b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4634, "upload_time": "2019-02-16T10:55:56", "url": "https://files.pythonhosted.org/packages/23/77/2be9171d98b714fbf62c1f3c72ce107741463d8a36ce97160e0fcd64b8c1/starlette-apispec-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "8e581d20fca99093d8e0b6bf0d0c7316", "sha256": "e1dc1e22c6b84fcb1a97a69db49ad436e03839b7ed7fbbf797bdc9cbd2984be0" }, "downloads": -1, "filename": "starlette_apispec-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8e581d20fca99093d8e0b6bf0d0c7316", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 5655, "upload_time": "2019-06-12T16:49:26", "url": "https://files.pythonhosted.org/packages/0c/b4/109767d718d619c3b7a5be028e4d63847afe61734e4e681f6ec542ee1f88/starlette_apispec-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "10c2f78867b72e9991ac394b6f3c91a8", "sha256": "cb505f5737725b3cb0e3d636206b9ace417813ebab9f67523b1738f02e48b1e3" }, "downloads": -1, "filename": "starlette-apispec-1.0.2.tar.gz", "has_sig": false, "md5_digest": "10c2f78867b72e9991ac394b6f3c91a8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4650, "upload_time": "2019-06-12T16:49:24", "url": "https://files.pythonhosted.org/packages/1f/23/ffb9ec7df07665df60efa2648656a9d6cb44be22fd542be015d3563f7eaa/starlette-apispec-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e581d20fca99093d8e0b6bf0d0c7316", "sha256": "e1dc1e22c6b84fcb1a97a69db49ad436e03839b7ed7fbbf797bdc9cbd2984be0" }, "downloads": -1, "filename": "starlette_apispec-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8e581d20fca99093d8e0b6bf0d0c7316", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 5655, "upload_time": "2019-06-12T16:49:26", "url": "https://files.pythonhosted.org/packages/0c/b4/109767d718d619c3b7a5be028e4d63847afe61734e4e681f6ec542ee1f88/starlette_apispec-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "10c2f78867b72e9991ac394b6f3c91a8", "sha256": "cb505f5737725b3cb0e3d636206b9ace417813ebab9f67523b1738f02e48b1e3" }, "downloads": -1, "filename": "starlette-apispec-1.0.2.tar.gz", "has_sig": false, "md5_digest": "10c2f78867b72e9991ac394b6f3c91a8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4650, "upload_time": "2019-06-12T16:49:24", "url": "https://files.pythonhosted.org/packages/1f/23/ffb9ec7df07665df60efa2648656a9d6cb44be22fd542be015d3563f7eaa/starlette-apispec-1.0.2.tar.gz" } ] }