{ "info": { "author": "Cristian Schuszter", "author_email": "cristian.schuszter@cern.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Software Distribution" ], "description": "==============\nFlask RestPlus\n==============\n\n.. image:: https://secure.travis-ci.org/noirbizarre/flask-restplus.svg?branch=master\n :target: https://travis-ci.org/noirbizarre/flask-restplus?branch=master\n :alt: Build status\n.. image:: https://coveralls.io/repos/noirbizarre/flask-restplus/badge.svg?branch=master\n :target: https://coveralls.io/r/noirbizarre/flask-restplus?branch=master\n :alt: Code coverage\n.. image:: https://readthedocs.org/projects/flask-restplus/badge/?version=latest\n :target: https://flask-restplus.readthedocs.io/en/latest/\n :alt: Documentation status\n.. image:: https://img.shields.io/pypi/l/flask-restplus.svg\n :target: https://pypi.org/project/flask-restplus\n :alt: License\n.. image:: https://img.shields.io/pypi/pyversions/flask-restplus.svg\n :target: https://pypi.org/project/flask-restplus\n :alt: Supported Python versions\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n :alt: Join the chat at https://gitter.im/noirbizarre/flask-restplus\n :target: https://gitter.im/noirbizarre/flask-restplus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\nFlask-RESTPlus is an extension for `Flask`_ that adds support for quickly building REST APIs.\nFlask-RESTPlus encourages best practices with minimal setup.\nIf you are familiar with Flask, Flask-RESTPlus should be easy to pick up.\nIt provides a coherent collection of decorators and tools to describe your API\nand expose its documentation properly using `Swagger`_.\n\n\nCompatibility\n=============\n\nFlask-RestPlus requires Python 2.7 or 3.4+.\n\n\nInstallation\n============\n\nYou can install Flask-Restplus with pip:\n\n.. code-block:: console\n\n $ pip install flask-restplus\n\nor with easy_install:\n\n.. code-block:: console\n\n $ easy_install flask-restplus\n\n\nQuick start\n===========\n\nWith Flask-Restplus, you only import the api instance to route and document your endpoints.\n\n.. code-block:: python\n\n from flask import Flask\n from flask_restplus import Api, Resource, fields\n\n app = Flask(__name__)\n api = Api(app, version='1.0', title='TodoMVC API',\n description='A simple TodoMVC API',\n )\n\n ns = api.namespace('todos', description='TODO operations')\n\n todo = api.model('Todo', {\n 'id': fields.Integer(readOnly=True, description='The task unique identifier'),\n 'task': fields.String(required=True, description='The task details')\n })\n\n\n class TodoDAO(object):\n def __init__(self):\n self.counter = 0\n self.todos = []\n\n def get(self, id):\n for todo in self.todos:\n if todo['id'] == id:\n return todo\n api.abort(404, \"Todo {} doesn't exist\".format(id))\n\n def create(self, data):\n todo = data\n todo['id'] = self.counter = self.counter + 1\n self.todos.append(todo)\n return todo\n\n def update(self, id, data):\n todo = self.get(id)\n todo.update(data)\n return todo\n\n def delete(self, id):\n todo = self.get(id)\n self.todos.remove(todo)\n\n\n DAO = TodoDAO()\n DAO.create({'task': 'Build an API'})\n DAO.create({'task': '?????'})\n DAO.create({'task': 'profit!'})\n\n\n @ns.route('/')\n class TodoList(Resource):\n '''Shows a list of all todos, and lets you POST to add new tasks'''\n @ns.doc('list_todos')\n @ns.marshal_list_with(todo)\n def get(self):\n '''List all tasks'''\n return DAO.todos\n\n @ns.doc('create_todo')\n @ns.expect(todo)\n @ns.marshal_with(todo, code=201)\n def post(self):\n '''Create a new task'''\n return DAO.create(api.payload), 201\n\n\n @ns.route('/')\n @ns.response(404, 'Todo not found')\n @ns.param('id', 'The task identifier')\n class Todo(Resource):\n '''Show a single todo item and lets you delete them'''\n @ns.doc('get_todo')\n @ns.marshal_with(todo)\n def get(self, id):\n '''Fetch a given resource'''\n return DAO.get(id)\n\n @ns.doc('delete_todo')\n @ns.response(204, 'Todo deleted')\n def delete(self, id):\n '''Delete a task given its identifier'''\n DAO.delete(id)\n return '', 204\n\n @ns.expect(todo)\n @ns.marshal_with(todo)\n def put(self, id):\n '''Update a task given its identifier'''\n return DAO.update(id, api.payload)\n\n\n if __name__ == '__main__':\n app.run(debug=True)\n\n\n\n\nDocumentation\n=============\n\nThe documentation is hosted `on Read the Docs `_\n\n\n.. _Flask: http://flask.pocoo.org/\n.. _Swagger: http://swagger.io/\n\nChangelog\n=========\n\n\n\nCurrent\n-------\n\n- Ensure `basePath` is always a path\n\n0.12.1 (2018-09-28)\n-------------------\n\n- Fix missing changelog inprevious release\n- Ensure definitions with both `$ref` and description (or other property) output is valid (using `allOf`)\n- Added initial specifications schemas and validation support\n- Ensure empty enums are not serialized (to have a valid specification)\n\n0.12.0 (2018-09-27)\n-------------------\n\n- Fix Namespace decorators (`#475 `_)\n- Do not serialize empty tags descriptions\n- Ensure `consumes` is properly set when using form parameters on classes\n- Ensure parameters are not duplicated (`#164 `_, `#196 `_, `#234 `_)\n- Publish sources distribution (`#500 `_, `#515 `_)\n- Fix late resources registeration (`#483 `_)\n- Don't include namespaces without resources to the SWAGGER documentation (`#470 `_)\n- Add support for checkbox validation input + consistent behavior between inputs and fields. (`#461 `_)\n- Fix missing `enum34` dependency (`#444 `_)\n\n0.11.0 (2018-05-16)\n-------------------\n\n- Add authorizations parsing to namespace (`#403 `_)\n- Add vendor extensions support (`#97 `_)\n- ``RequestParser`` arguments now support the ``split`` action\n- Ensure default boolean value as `False` works with ``RequestParser`` (`#199 `_)\n- Schema errors are not longuer hidden by `AttributeError: Api does not have __schema__ attribute` (`#194 `_)\n- Add a new ``URL`` validator, more flexible and precise.\n- Fix error bundling (`#175 `_, `#144 `_)\n- Help message is now added to source error message instead of string interpolation (`#147 `_)\n- Use pytest instead of nosetests\n- Upgrade to Swagger-UI 3.4.0\n- Fix typo in comments\n- Add an optional key argument, ``skip_none``, in ``marshal_with`` and ``marshal``\n- Fix masks not working correctly with Python 2.7 (`#217 `_)\n- Fixed typos in doc/scaling\n- Add docs for `allow_null` and ``Nested``\n- Add Namespace.payload\n- **Breaking**: everything is unordered by default because ordering has a serious impact on performances:\n - ``Api`` and ``Namespace`` now accept an optionnal ``ordered`` parameter\n - ``marshal_with`` and ``marshal`` now accept an optionnal ``ordered`` parameter\n\nBreaking changes\n~~~~~~~~~~~~~~~~\n\n- Drop python 2.6 support\n- Improve header handling (`#119 `_):\n - `@api.header` only document response headers on all responses\n - `@api.response` accept an optionnal `headers` argument to document response specific headers\n - request header are handled by the `@api.expect` decorator\n\n0.10.1 (2017-03-04)\n-------------------\n\n- Fix a typo in ``__init__`` breaking ``from flask_restplus import *`` (`#242 `_)\n- Basic support for custom URL converters (`#243 `_)\n- Support custom response classes inheriting from ``BaseResponse`` (`#245 `_)\n- Allow models to preserve order (`#135 `_)\n\n0.10.0 (2017-02-12)\n-------------------\n\n- Allows to specify a custom mount path on namespace registration\n- Allow to express models as raw schemas\n- Upgraded to Swagger-UI 2.2.6\n- Support Swagger-UI translations\n- Fix prefix trailing slash stripping in Postman doc generation (`#232 `_)\n- Add validation for lists in the expect decorator (`#231 `_)\n\n0.9.2 (2016-04-22)\n------------------\n\n- Same version but a PyPI bug force reupload.\n\n0.9.1 (2016-04-22)\n------------------\n\n- Added some Swagger-UI Oauth configurations:\n - `SWAGGER_UI_OAUTH_CLIENT_ID`\n - `SWAGGER_UI_OAUTH_REALM`\n - `SWAGGER_UI_OAUTH_APP_NAME`\n- Expose ``type: object`` in Swagger schemas (`#157 `_)\n- Fix an issue with error handlers (`#141 `_)\n- Fix an issue with Postman export when using OAuth (`#151 `_)\n- Miscellenaous code and documentation fixes\n- Remove last flask-restful references (unless needed) and add missing attributions\n\n0.9.0 (2016-02-22)\n------------------\n\n- Make ``Namespace`` behave like ``Blueprint`` for ``Flask``\n- Deprecated ``parser`` and ``body`` parameters for ``expect`` in ``doc`` decorator\n- Deprecated ``Model.extend`` in favor of ``Model.clone``\n- Added the ``param`` decorator\n- Honour method restrictions in Swagger documentation (`#93 `_)\n- Improved documentation\n\n0.8.6 (2015-12-26)\n------------------\n\n- Handle callable on API infos\n- Handle documentation on error handlers\n- Drop/merge flask_restful ``flask_restful.RequestParser``\n- Handle ``RequestParser`` into ``expect`` decorator\n- Handle schema for ``inputs`` parsers\n- Added some inputs:\n - ``email``\n - ``ip``\n - ``ipv4``\n - ``ipv6``\n\n\n0.8.5 (2015-12-12)\n------------------\n\n- Handle mask on ``Polymorph`` field\n- Handle mask on inherited models\n- Replace `flask_restful.abort` by ``flask_restplus.errors.abort``\n- Replace `flask_restful.unpack` by ``flask_restplus.utils.unpack``\n- **Breaking changes**:\n - Renamed ``ApiModel`` into ``Model``\n - Renamed ``ApiNamespace`` into ``Namespace``\n\n\n0.8.4 (2015-12-07)\n------------------\n\n- Drop/merge `flask_restful.Resource` resolving a recursion problem\n- Allow any `callable` as field `default`, `min`, `max`...\n- Added ``Date`` field\n- Improve error handling for inconsistent masks\n- Handle model level default mask\n- support colons and dashes in mask field names\n- **Breaking changes**:\n - Renamed `exceptions` module into `errors`\n - Renamed `RestException` into ``RestError``\n - Renamed `MarshallingException` into ``MarshallingError``\n - ``DateTime`` field always output datetime\n\n0.8.3 (2015-12-05)\n------------------\n\n- Drop/merge flask-restful fields\n- Drop/merge flask-restplus inputs\n- Update Swagger-UI to version 2.1.3\n- Use minified version of Swagger-UI if ``DEBUG=False``\n- Blueprint subdomain support (static only)\n- Added support for default fields mask\n\n0.8.2 (2015-12-01)\n------------------\n\n- Skip unknown fields in mask when applied on a model\n- Added `*` token to fields mask (all remaining fields)\n- Ensure generated endpoints does not collide\n- Drop/merge flask-restful `Api.handler_error()`\n\n0.8.1 (2015-11-27)\n------------------\n\n- Refactor Swagger UI handling:\n - allow to register a custom view with ``@api.documentation``\n - allow to register a custom URL with the ``doc`` parameter\n - allow to disable documentation with ``doc=False``\n- Added fields mask support through header (see: `Fields Masks Documentation `_)\n- Expose ``flask_restful.inputs`` module on ``flask_restplus.inputs``\n- Added support for some missing fields and attributes:\n - ``host`` root field (filed only if ``SERVER_NAME`` config is set)\n - custom ``tags`` root field\n - ``exclusiveMinimum`` and ``exclusiveMaximum`` number field attributes\n - ``multipleOf`` number field attribute\n - ``minLength`` and ``maxLength`` string field attributes\n - ``pattern`` string field attribute\n - ``minItems`` and ``maxItems`` list field attributes\n - ``uniqueItems`` list field attribute\n- Allow to override the default error handler\n- Fixes\n\n\n0.8.0\n-----\n\n- Added payload validation (initial implementation based on jsonschema)\n- Added ``@api.deprecated`` to mark resources or methods as deprecated\n- Added ``@api.header`` decorator shortcut to document headers\n- Added Postman export\n- Fix compatibility with flask-restful 0.3.4\n- Allow to specify an exemple a custom fields with ``__schema_example__``\n- Added support for ``PATCH`` method in Swagger UI\n- Upgraded to Swagger UI 2.1.2\n- Handle enum as callable\n- Allow to configure ``docExpansion`` with the ``SWAGGER_UI_DOC_EXPANSION`` parameter\n\n\n0.7.2\n-----\n\n- Compatibility with flask-restful 0.3.3\n- Fix action=append handling in RequestParser\n- Upgraded to SwaggerUI 2.1.8-M1\n- Miscellaneous fixes\n\n\n0.7.1\n-----\n\n- Fix ``@api.marshal_with_list()`` keyword arguments handling.\n\n\n0.7.0\n-----\n\n- Expose models and fields schema through the ``__schema__`` attribute\n- Drop support for model as class\n- Added ``@api.errorhandler()`` to register custom error handlers\n- Added ``@api.response()`` shortcut decorator\n- Fix list nested models missing in definitions\n\n\n0.6.0\n-----\n\n- Python 2.6 support\n- Experimental polymorphism support (single inheritance only)\n - Added ``Polymorph`` field\n - Added ``discriminator`` attribute support on ``String`` fields\n - Added ``api.inherit()`` method\n- Added ``ClassName`` field\n\n0.5.1\n-----\n\n- Fix for parameter with schema (do not set type=string)\n\n\n0.5.0\n-----\n\n- Allow shorter syntax to set operation id: ``@api.doc('my-operation')``\n- Added a shortcut to specify the expected input model: ``@api.expect(my_fields)``\n- Added ``title`` attribute to fields\n- Added ``@api.extend()`` to extend models\n- Ensure coherence between ``required`` and ``allow_null`` for ``NestedField``\n- Support list of primitive types and list of models as body\n- Upgraded to latest version of Swagger UI\n- Fixes\n\n\n0.4.2\n-----\n\n- Rename apidoc blueprint into restplus_doc to avoid collisions\n\n\n0.4.1\n-----\n\n- Added ``SWAGGER_VALIDATOR_URL`` config parameter\n- Added ``readonly`` field parameter\n- Upgraded to latest version of Swagger UI\n\n\n0.4.0\n-----\n\n- Port to Flask-Restful 0.3+\n- Use the default Blueprint/App mecanism\n- Allow to hide some ressources or methods using ``@api.doc(False)`` or ``@api.hide``\n- Allow to globally customize the default operationId with the ``default_id`` callable parameter\n\n0.3.0\n-----\n\n- Switch to Swagger 2.0 (Major breakage)\n - ``notes`` documentation is now ``description``\n - ``nickname`` documentation is now ``id``\n - new responses declaration format\n- Added missing ``body`` parameter to document ``body`` input\n- Last release before Flask-Restful 0.3+ compatibility switch\n\n\n0.2.4\n-----\n\n- Handle ``description`` and ``required`` attributes on ``fields.List``\n\n0.2.3\n-----\n\n- Fix custom fields registeration\n\n0.2.2\n-----\n\n- Fix model list in declaration\n\n0.2.1\n-----\n\n- Allow to type custom fields with ``Api.model``\n- Handle custom fields into ``fieds.List``\n\n0.2\n---\n\n- Upgraded to SwaggerUI 0.2.22\n- Support additional field documentation attributes: ``required``, ``description``, ``enum``, ``min``, ``max`` and ``default``\n- Initial support for model in RequestParser\n\n0.1.3\n-----\n\n- Fix ``Api.marshal()`` shortcut\n\n0.1.2\n-----\n\n- Added ``Api.marshal_with()`` and ``Api.marshal_list_with()`` decorators\n- Added ``Api.marshal()`` shortcut\n\n\n0.1.1\n-----\n\n- Use ``zip_safe=False`` for proper packaging.\n\n\n0.1\n---\n\n- Initial release\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/saibot94/flask-restplus", "keywords": "flask restplus rest api swagger openapi", "license": "BSD-3-Clause", "maintainer": "", "maintainer_email": "", "name": "flask-restplus-oauth-redirect", "package_url": "https://pypi.org/project/flask-restplus-oauth-redirect/", "platform": "", "project_url": "https://pypi.org/project/flask-restplus-oauth-redirect/", "project_urls": { "Homepage": "https://github.com/saibot94/flask-restplus" }, "release_url": "https://pypi.org/project/flask-restplus-oauth-redirect/0.13.0/", "requires_dist": [ "aniso8601 (>=0.82)", "jsonschema", "Flask (>=0.8)", "pytz", "six (>=1.3.0)", "enum34 ; python_version < \"3.4\"", "alabaster (==0.7.10) ; extra == 'doc'", "Sphinx (==1.6.5) ; extra == 'doc'", "sphinx-issues (==0.3.1) ; extra == 'doc'", "blinker ; extra == 'test'", "mock (==2.0.0) ; extra == 'test'", "pytest (==3.2.3) ; extra == 'test'", "pytest-benchmark (==3.1.1) ; extra == 'test'", "pytest-cov (==2.5.1) ; extra == 'test'", "pytest-faker (==2.0.0) ; extra == 'test'", "pytest-flask (==0.10.0) ; extra == 'test'", "pytest-mock (==1.6.3) ; extra == 'test'", "pytest-profiling (==1.2.11) ; extra == 'test'", "pytest-sugar (==0.9.0) ; extra == 'test'", "tzlocal ; extra == 'test'" ], "requires_python": "", "summary": "Fully featured framework for fast, easy and documented API development with Flask", "version": "0.13.0" }, "last_serial": 5003090, "releases": { "0.13.0": [ { "comment_text": "", "digests": { "md5": "8da32eb08e93fd62496afb0dafc49e37", "sha256": "e7f7a543090d2c02909c8560c3fdd302172fdbf0535d144c78607e2f92a4d422" }, "downloads": -1, "filename": "flask_restplus_oauth_redirect-0.13.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8da32eb08e93fd62496afb0dafc49e37", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2495434, "upload_time": "2019-03-29T12:47:53", "url": "https://files.pythonhosted.org/packages/99/38/4f6569c4f77debce59f4268f31bfcf93b08386fee6f99d6da5a136e7d481/flask_restplus_oauth_redirect-0.13.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "07731bae36c74adc4ba85fb2a488fa38", "sha256": "6a4a330d0392726d7fa9eb2b0d1d827efb0f7f4e48de5def76d1df039d54109e" }, "downloads": -1, "filename": "flask-restplus-oauth-redirect-0.13.0.tar.gz", "has_sig": false, "md5_digest": "07731bae36c74adc4ba85fb2a488fa38", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2473811, "upload_time": "2019-03-29T12:47:58", "url": "https://files.pythonhosted.org/packages/58/d3/4ec0444c1777862fd12725ae01130201473d06e72c1582c2c158c59f1be6/flask-restplus-oauth-redirect-0.13.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8da32eb08e93fd62496afb0dafc49e37", "sha256": "e7f7a543090d2c02909c8560c3fdd302172fdbf0535d144c78607e2f92a4d422" }, "downloads": -1, "filename": "flask_restplus_oauth_redirect-0.13.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8da32eb08e93fd62496afb0dafc49e37", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2495434, "upload_time": "2019-03-29T12:47:53", "url": "https://files.pythonhosted.org/packages/99/38/4f6569c4f77debce59f4268f31bfcf93b08386fee6f99d6da5a136e7d481/flask_restplus_oauth_redirect-0.13.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "07731bae36c74adc4ba85fb2a488fa38", "sha256": "6a4a330d0392726d7fa9eb2b0d1d827efb0f7f4e48de5def76d1df039d54109e" }, "downloads": -1, "filename": "flask-restplus-oauth-redirect-0.13.0.tar.gz", "has_sig": false, "md5_digest": "07731bae36c74adc4ba85fb2a488fa38", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2473811, "upload_time": "2019-03-29T12:47:58", "url": "https://files.pythonhosted.org/packages/58/d3/4ec0444c1777862fd12725ae01130201473d06e72c1582c2c158c59f1be6/flask-restplus-oauth-redirect-0.13.0.tar.gz" } ] }