Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Master Slave Support For PeeWee

Project description

pwmd

Master/Slave Support For PeeWee. Now only support mysql.

The source code is locate at github .

Build Status

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

This version
History Node

0.2

History Node

0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pwmd-0.2-py2.7.egg (6.8 kB) Copy SHA256 hash SHA256 Egg 2.7 Dec 18, 2012
pwmd-0.2.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None Dec 18, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page