Multi Database Support For PeeWee
Project description
pwmd
Multi Database Support For PeeWee. Now only support mysql.
Usage
from peewee import Model, CharField, DateField, BooleanField from pwmd import MultiMySQLDatabase DATABASE = {'master': 'mysql://root@localhost/test_app', 'slaves': ['mysql://root@localhost/test_app']} db = MultiMySQLDatabase(DATABASE) db.connect() class BaseModel(Model): class Meta: database = db class Person(BaseModel): name = CharField() birthday = DateField() is_relative = BooleanField()
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
pwmd-0.1.tar.gz
(3.2 kB
view hashes)
Built Distribution
pwmd-0.1-py2.7.egg
(6.7 kB
view hashes)