Metadata-Version: 2.1
Name: Flask-RESTy
Version: 4.0.0
Summary: Building blocks for REST APIs for Flask
Home-page: https://github.com/4Catalyzer/flask-resty
Author: 4Catalyzer
Author-email: tesrin@gmail.com
License: MIT
Keywords: rest flask
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Flask
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: docs
Provides-Extra: jwt
Provides-Extra: tests
Provides-Extra: dev
License-File: LICENSE

# Flask-RESTy [![Travis][build-badge]][build] [![Codecov][codecov-badge]][codecov] [![PyPI][pypi-badge]][pypi] [![marshmallow 3 compatible][marshmallow-badge]][marshmallow-upgrading]

Flask-RESTy provides building blocks for creating REST APIs with [Flask](http://flask.pocoo.org/), [SQLAlchemy](https://www.sqlalchemy.org/), and [marshmallow](https://marshmallow.readthedocs.io/).

```python
from flask_resty import Api, GenericModelView

from . import app, models, schemas


class WidgetViewBase(GenericModelView):
    model = models.Widget
    schema = schemas.WidgetSchema()


class WidgetListView(WidgetViewBase):
    def get(self):
        return self.list()

    def post(self):
        return self.create()


class WidgetView(WidgetViewBase):
    def get(self, id):
        return self.retrieve(id)

    def patch(self, id):
        return self.update(id, partial=True)

    def delete(self, id):
        return self.destroy(id)


api = Api(app, "/api")
api.add_resource("/widgets", WidgetListView, WidgetView)
```

## Documentation

Documentation is available at https://flask-resty.readthedocs.io/.

## License

MIT Licensed. See the bundled [LICENSE](https://github.com/4Catalyzer/flask-resty/blob/master/LICENSE) file for more details.

[build-badge]: https://img.shields.io/travis/4Catalyzer/flask-resty/master.svg
[build]: https://travis-ci.org/4Catalyzer/flask-resty
[pypi-badge]: https://img.shields.io/pypi/v/Flask-RESTy.svg
[pypi]: https://pypi.python.org/pypi/Flask-RESTy
[codecov-badge]: https://img.shields.io/codecov/c/github/4Catalyzer/flask-resty/master.svg
[codecov]: https://codecov.io/gh/4Catalyzer/flask-resty
[marshmallow-badge]: https://badgen.net/badge/marshmallow/3
[marshmallow-upgrading]: https://marshmallow.readthedocs.io/en/latest/upgrading.html


