Skip to main content

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


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

Uploaded Source

Built Distribution

pwmd-0.2-py2.7.egg (6.8 kB view details)

Uploaded Source

File details

Details for the file pwmd-0.2.tar.gz.

File metadata

  • Download URL: pwmd-0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pwmd-0.2.tar.gz
Algorithm Hash digest
SHA256 26a5a88cdcd6d800891b9293115d4165ee8c0d40ff51b68eadce14e395126ae5
MD5 1b1537c4417edaea4db66a7b08702811
BLAKE2b-256 69199019dd94b7dabc7ebcff785efa4dcb741f526bb1060cbf1466eaba935df8

See more details on using hashes here.

File details

Details for the file pwmd-0.2-py2.7.egg.

File metadata

  • Download URL: pwmd-0.2-py2.7.egg
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pwmd-0.2-py2.7.egg
Algorithm Hash digest
SHA256 86fda4d0c3ced5c4e753606dfdaf8c26d2a3e7357d86d80f35c05ca077b21de3
MD5 19fef329bc59ba1eb50e69eeb87826eb
BLAKE2b-256 2e9bb9893bfcdb0d2ae4a0ab37562c80e9a845a263ca772c1027ce8dde48dc81

See more details on using hashes here.

Supported by

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