ActiveRecord support for Flask-SQLAlchemy models
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.activerecord import patch_model
# patch model first
patch_model()
app = Flask(__name__)
db = SQLAlchemy(app)
# example model
class User(db.Model):
__attribute_filters__ = {
'accessible': ('fullname', 'country'),
'protected': ('id', 'email', 'password')
'hidden': ('password', )
}
email = db.Column(db.String, unique=True)
password = db.Column(db.String, unique=True)
fullname = db.Column(db.String)
country = db.Column(db.String(2))
Release files for Flask-ActiveRecord 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Flask-ActiveRecord-0.2.3.tar.gz | 6.5 kB | Details |
Release files / Flask-ActiveRecord-0.2.3.tar.gz
| Download URL | Flask-ActiveRecord-0.2.3.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3e8d73c5d1be0f142debbce8f94fe27fa57b75d05e81e1344ebd62b0163a77b
|
|
BLAKE2b-256 checksum How to use checksums |
7f9addd4d25e877b6cef93ed56910612061ae95e9af75096b470b5b27b941508
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |