PonyORM for your Flask application
Project description
PonyORM for your Flask application.
Installation
pip install flask-pony
Quick start
Read the documentation for the pony-database-facade package.
# app.py from flask import Flask from flask_pony import Pony app = Flask(__name__) app.config.from_object('configmodule.Config') pony = Pony(app) from . import models pony.connect()
# models.py from pony.orm import Required from . import pony db = pony.db class Person(db.Entity): username = Required(str, 50)
# configmodule.py class Config(object): PONY = { 'provider': 'mysql', 'user': 'anyone', 'password': 'anykey', 'dbname': 'blog' }
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
flask-pony-3.0.1.tar.gz
(2.8 kB
view hashes)