{"id":24922832,"url":"https://github.com/gorzechowski/flask-restly","last_synced_at":"2025-04-09T19:15:53.013Z","repository":{"id":57430669,"uuid":"152603330","full_name":"gorzechowski/flask-restly","owner":"gorzechowski","description":"Library to build REST API with Flask","archived":false,"fork":false,"pushed_at":"2020-01-16T08:01:30.000Z","size":95,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T21:11:16.422Z","etag":null,"topics":["flask","json","protobuf","python","rest-api"],"latest_commit_sha":null,"homepage":"","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/gorzechowski.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-11T14:16:34.000Z","updated_at":"2023-04-05T09:22:29.000Z","dependencies_parsed_at":"2022-09-13T15:20:40.527Z","dependency_job_id":null,"html_url":"https://github.com/gorzechowski/flask-restly","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorzechowski%2Fflask-restly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorzechowski%2Fflask-restly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorzechowski%2Fflask-restly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorzechowski%2Fflask-restly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gorzechowski","download_url":"https://codeload.github.com/gorzechowski/flask-restly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557748,"owners_count":20958047,"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","json","protobuf","python","rest-api"],"created_at":"2025-02-02T11:33:50.205Z","updated_at":"2025-04-09T19:15:52.966Z","avatar_url":"https://github.com/gorzechowski.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask-RESTly\n\n[![Build Status](https://travis-ci.org/gorzechowski/flask-restly.svg?branch=master)](https://travis-ci.org/gorzechowski/flask-restly)\n[![Latest version](https://img.shields.io/pypi/v/flask-restly.svg)](https://pypi.org/project/flask-restly)\n[![Python versions](https://img.shields.io/pypi/pyversions/flask-restly.svg)](https://pypi.org/project/flask-restly)\n[![Coverage Status](https://coveralls.io/repos/github/gorzechowski/flask-restly/badge.svg?branch=master)](https://coveralls.io/github/gorzechowski/flask-restly?branch=master)\n\n## Quick start\n\n```\npip install flask-restly\n```\n\nBy default `flask-restly` uses JSON serializer.\n\n```python\nfrom flask import Flask\nfrom flask_restly import FlaskRestly\nfrom flask_restly.decorator import resource, get, delete\n\n\napp = Flask(__name__)\n\nrest = FlaskRestly(app)\nrest.init_app(app)\n\n\n@resource(name='employees')\nclass EmployeesResource:\n    @get('/\u003cid\u003e')\n    def get_employee(self, id):\n        return dict(id=int(id))\n\n    @get('/')\n    def get_employees(self):\n        return dict(entites=[\n            dict(id=1),\n            dict(id=2)\n        ])\n\n    @delete('/\u003cid\u003e')\n    def delete_employee(self, **kwargs):\n        return\n\n\nwith app.app_context():\n    EmployeesResource()\n\nif __name__ == \"__main__\":\n    app.run(host='127.0.0.1', port=5001, debug=True)\n```\n\n```bash\n$ python main.py\n* Serving Flask app \"main\" (lazy loading)\n* Environment: production\n  WARNING: Do not use the development server in a production environment.\n  Use a production WSGI server instead.\n* Debug mode: on\n* Restarting with stat\n* Debugger is active!\n* Debugger PIN: 210-167-642\n* Running on http://127.0.0.1:5001/ (Press CTRL+C to quit)\n```\n\n## Features\n\n* Decorators-based routing\n* JSON and Protobuf built-in serialization\n* Custom serializer support\n* Authorization and authentication decorators\n* Automatic REST-like response codes\n* API versioning\n* Rating limits\n\n## Todo\n\n* HATEOAS/HAL\n\n## Usage\n\nPlease see [examples](/examples) for more details.\n\n### Settings\n\n| Name                                                          | Default value                |\n| -----------------------------------------------------------:  | :--------------------------- |\n| RESTLY_SERIALIZER: `\u003cflask_restly.serializer.SerializerBase\u003e` | flask_restly.serializer.json |\n| RESTLY_API_PREFIX: `\u003cstr\u003e`                                    | /api/rest                    |\n| RESTLY_PROTOBUF_MIMETYPE: `\u003cstr\u003e`                             | application/x-protobuf       |\n| RESTLY_RATE_LIMIT_REQUESTS_AMOUNT: `\u003cint\u003e`                    | 100                          |\n| RESTLY_RATE_LIMIT_WINDOW_SECONDS: `\u003cint\u003e`                     | 60                           |\n\n### Docs\n\n* [Authentication](/docs/Authentication.md)\n* [Authorization](/docs/Authorization.md)\n* [Decorators](/docs/Decorators.md)\n* [Exceptions](/docs/Exceptions.md)\n* [Protobuf](/docs/Protobuf.md)\n* [RateLimits](/docs/RateLimits.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgorzechowski%2Fflask-restly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgorzechowski%2Fflask-restly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgorzechowski%2Fflask-restly/lists"}