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.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a022fb2ba678f049f123c8e36910c60ead74e947c32439100a95b61e3c071b2f |
|
MD5 | b9cb6ff842715aba9a8c8c2ceb5240f7 |
|
BLAKE2b-256 | dd3e69b476afc710ac3c8b34833be23491db88a99763713f61dd2acf6c02fac3 |