Skip to main content

Extension for Flask-SQLALchemy that include validation for models, a easier way to query and more new features.

Project description

Flask-model-validation

Flask-model-validation is an extension for Flask-SQLAlchemy that adds support for validating the model before commit it to the database. It adds new functions to query and save the model easily.

Installation

Install using pip

pip install Flask-model-validation

Setup the extension

It should be initialized like Flask-SQLAlchemy extension.

For more information see the Flask-SQLAlchemy documentation

from flask import Flask
from flask_model_validation import SQLAlchemyModelValidation

app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite://"
db = SQLAlchemyModelValidation()
db.init_app(app)

Features

Flask-model-validation includes several new features.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_model_validation-0.1.0.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

flask_model_validation-0.1.0-py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page