{"id":14974189,"url":"https://github.com/jonarsli/flask-restapi","last_synced_at":"2025-10-27T06:32:01.099Z","repository":{"id":39848313,"uuid":"376734803","full_name":"jonarsli/flask-restapi","owner":"jonarsli","description":"Flask-RESTAPI is an extension for validate and make OpenAPI docs.","archived":false,"fork":false,"pushed_at":"2023-05-03T06:24:19.000Z","size":753,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T03:22:12.284Z","etag":null,"topics":["flask","flask-restapi","openapi3","pydantic","python","python3","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":"https://jonarsli.github.io/flask-restapi/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonarsli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-14T07:07:00.000Z","updated_at":"2024-05-09T06:19:21.000Z","dependencies_parsed_at":"2024-09-23T15:00:39.387Z","dependency_job_id":null,"html_url":"https://github.com/jonarsli/flask-restapi","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":0.06382978723404253,"last_synced_commit":"7356da47700d04cd5f1cefda82c88b493b8f74d0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonarsli%2Fflask-restapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonarsli%2Fflask-restapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonarsli%2Fflask-restapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonarsli%2Fflask-restapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonarsli","download_url":"https://codeload.github.com/jonarsli/flask-restapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238455088,"owners_count":19475376,"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":["flask","flask-restapi","openapi3","pydantic","python","python3","swagger","swagger-ui"],"created_at":"2024-09-24T13:50:07.763Z","updated_at":"2025-10-27T06:31:55.806Z","avatar_url":"https://github.com/jonarsli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask-RESTAPI\n\n[![license](https://img.shields.io/github/license/jonarsli/flask-restapi.svg)](https://github.com/jonarsli/flask-restapi/blob/master/LICENSE)\n[![pypi](https://img.shields.io/pypi/v/flask-restapi.svg)](https://pypi.python.org/pypi/flask-restapi)\n\n\n[Flask-RESTAPI document](https://jonarsli.github.io/flask-restapi/)\n\nFlask-RESTAPI is an extension for Flask that is a database-agnostic framework library for creating REST APIs. It is a lightweight abstraction that works with your existing ORM/libraries.\n\nIt use pydantic to validate and serialize data. OpenAPI document can be automatically generated through the python decorator and it supports swagger ui display.\n\nPydantic are used to validate and serialize parameters. For details, please refer to the [pydantic documentation](https://pydantic-docs.helpmanual.io/).\n\n## Installation\n```bash\npip install flask-restapi\n```\n\n## Example\n```python\nfrom flask import Flask\nfrom flask.views import MethodView\nfrom pydantic import BaseModel\n\nfrom flask_restapi import Api, RequestParametersType\n\napp = Flask(__name__)\napi = Api(app)\n\n\nclass UserGetSpec(BaseModel):\n    name: str\n\n\nclass UserResponseSpec(BaseModel):\n    id: int\n    name: str\n\n\nclass User(MethodView):\n    @api.query(UserGetSpec)\n    @api.response(UserResponseSpec)\n    def get(self, parameters: RequestParametersType):\n        \"\"\"Get a user name and id\"\"\"\n        user_name = parameters.query.name\n        return UserResponseSpec(id=1, name=user_name)\n\n\napp.add_url_rule(\"/user\", view_func=User.as_view(\"user\"))\n\n```\n\n## Swagger API docs\nNow go to http://localhost:5000/docs\n![](docs/images/example.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonarsli%2Fflask-restapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonarsli%2Fflask-restapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonarsli%2Fflask-restapi/lists"}