Adds SQLAlchemy support to a Flask-Smorest REST API
Project description
Flask REST API without the cruft
This packages builds upon flask-smorest and SQLAlchemy, to provide ORM integration and a boilerplate-free REST implementation with:
CRUD endpoints
[To do] Access Authorisation
[To do] Authentication
Install
pip install flask-smorest-sql
Quickstart
With a Flask-Smorest api object registered:
class Test(db.Model): """Test model.""" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(128)) with app.app_context(): db.create_all() bp = CRUDBlueprint("Test", __name__, db=db, url_prefix="/test", model_class=TestModel) api.register_blueprint(bp)
Will create all CRUD endpoints for resource Test at URL /test.
Documentation
Full documentation is available at http://flask-smorest-sqla.readthedocs.io/.
License
MIT licensed. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for flask_smorest_sqla-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2709b6026b5b16b01cb73a2d5fde06b13afc1c78d95016a5542261f378ac0ab6 |
|
MD5 | 535e0d4413008c637e6c41c03d26a96d |
|
BLAKE2b-256 | 2b1c64364eb07acdeb392fd00d3e08fdd18abef429f4548e2ceefaa9e86f2987 |