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 details)
File details
Details for the file flask-pony-3.0.1.tar.gz
.
File metadata
- Download URL: flask-pony-3.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ec6fca4e1ecf4bd3f7a1ad26c47b2eadea381f15661da9278304f8f4f32deef |
|
MD5 | 58e351927b1af77cc7629ce8c70d175d |
|
BLAKE2b-256 | deb7d1292418a7f968bd7e310051c90eb0bfb0431fde35c4e6116bf894e91eb2 |