Skip to main content

PonyORM for your Flask application

Project description

Latest Version Apache 2.0 STARS

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


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.0.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file flask-pony-3.0.0.tar.gz.

File metadata

  • Download URL: flask-pony-3.0.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for flask-pony-3.0.0.tar.gz
Algorithm Hash digest
SHA256 d34c7e25cde5d1bf3d219ad62078d79eb19fe4950d8f1c791a5ac97e014cccc5
MD5 14d7df51e5f47f2d47f10557e9dadecb
BLAKE2b-256 63b67417302596b0229b975689f040c18e933f09ed79e168fe0105fb7fd24b66

See more details on using hashes here.

Supported by

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