{"id":13421547,"url":"https://github.com/noirbizarre/flask-restplus","last_synced_at":"2025-04-29T14:29:38.426Z","repository":{"id":19699809,"uuid":"22954701","full_name":"noirbizarre/flask-restplus","owner":"noirbizarre","description":"Fully featured framework for fast, easy and documented API development with Flask","archived":false,"fork":false,"pushed_at":"2023-03-22T17:28:05.000Z","size":1316,"stargazers_count":2741,"open_issues_count":372,"forks_count":507,"subscribers_count":105,"default_branch":"master","last_synced_at":"2025-04-29T04:06:09.080Z","etag":null,"topics":["api","flask","json","python","rest","restful","restplus","swagger"],"latest_commit_sha":null,"homepage":"http://flask-restplus.readthedocs.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"comyar/Sol","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noirbizarre.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-08-14T13:26:03.000Z","updated_at":"2025-04-28T18:12:47.000Z","dependencies_parsed_at":"2022-07-13T13:20:25.711Z","dependency_job_id":"9220289e-a3a9-407a-b433-25e21eb6ddf4","html_url":"https://github.com/noirbizarre/flask-restplus","commit_stats":{"total_commits":605,"total_committers":90,"mean_commits":6.722222222222222,"dds":0.3305785123966942,"last_synced_commit":"1fe65ddae4c04315bd88535e3c2eaff381436270"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noirbizarre%2Fflask-restplus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noirbizarre%2Fflask-restplus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noirbizarre%2Fflask-restplus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noirbizarre%2Fflask-restplus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noirbizarre","download_url":"https://codeload.github.com/noirbizarre/flask-restplus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251518450,"owners_count":21602148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","flask","json","python","rest","restful","restplus","swagger"],"created_at":"2024-07-30T23:00:24.791Z","updated_at":"2025-04-29T14:29:38.393Z","avatar_url":"https://github.com/noirbizarre.png","language":"Python","readme":"==============\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\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n\n**IMPORTANT NOTICE**:\n\nThis project has been **forked** to `Flask-RESTX \u003chttps://github.com/python-restx/flask-restx\u003e`_\nand will be maintained by by the `python-restx \u003chttps://github.com/python-restx\u003e`_\norganization. **Flask-RESTPlus should be considered unmaintained**.\n\nThe community has decided to fork the project due to lack of response from the\noriginal author @noirbizarre. We have been discussing this eventuality for\nalmost `a year \u003chttps://github.com/noirbizarre/flask-restplus/issues/593\u003e`_.\n\nThings evolved a bit since that discussion and a few of us have been granted\nmaintainers access to the github project, but only the original author has\naccess rights on the PyPi project. As such, we been unable to make any actual\nreleases. To prevent this project from dying out, we have forked it to continue\ndevelopment and to support our users.\n\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('/\u003cint:id\u003e')\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\nContributors\n============\n\nFlask-RESTPlus is brought to you by @noirbizarre. Since early 2019 @SteadBytes,\n@a-luna, @j5awry, @ziirish volunteered to help @noirbizarre keep the project up\nand running.\nOf course everyone is welcome to contribute and we will be happy to review your\nPR's or answer to your issues.\n\n\nDocumentation\n=============\n\nThe documentation is hosted `on Read the Docs \u003chttp://flask-restplus.readthedocs.io/en/latest/\u003e`_\n\n\n.. _Flask: http://flask.pocoo.org/\n.. _Swagger: http://swagger.io/\n\n\nContribution\n============\nWant to contribute! That's awesome! Check out `CONTRIBUTING.rst! \u003chttps://github.com/noirbizarre/flask-restplus/blob/master/CONTRIBUTING.rst\u003e`_\n","funding_links":[],"categories":["Framework","Python","HarmonyOS","介绍"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoirbizarre%2Fflask-restplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoirbizarre%2Fflask-restplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoirbizarre%2Fflask-restplus/lists"}