Skip to main content

Simple ORM BaseModel for Flask depends on SqlAlchemy

Project description


Using CoModel to make SqlAlchemy's ORM even simpler for humans, develop with Flask/Django/OtherWebFrames.

note: 不管在使用任何 web 框架, 我都希望能有统一的 ORM 查询接口, 且易于在不同的数据库间迁移.



  • flask
from pyco_sqlalchemy._flask import BaseModel, db

class User(db.Model, BaseModel):
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.String(32))
    email = db.Column(db.String(64), unique=True)

form = dict(name="dev")
u1 = User.insert(form, email="")
u3 = User.upsert_one(form, email="")
assert ==

Project details

Download files

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

Files for pyco-sqlalchemy, version 1.2.1
Filename, size File type Python version Upload date Hashes
Filename, size pyco_sqlalchemy-1.2.1.tar.gz (7.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page