Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Master Slave Support For PeeWee

Project description


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

The source code is locate at github .

Build Status


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)

class BaseModel(Model):
    class Meta:
        database = db

class Person(BaseModel):
    name = CharField()
    birthday = DateField()
    is_relative = BooleanField()

Project details

Download files

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

Files for pwmd, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size pwmd-0.2-py2.7.egg (6.8 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size pwmd-0.2.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page