Master Slave Support For PeeWee
Project description
pwmd
Master/Slave Support For PeeWee. Now only support mysql.
The source code is locate at github .
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.2.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pwmd-0.2-py2.7.egg
(6.8 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26a5a88cdcd6d800891b9293115d4165ee8c0d40ff51b68eadce14e395126ae5
|
|
| MD5 |
1b1537c4417edaea4db66a7b08702811
|
|
| BLAKE2b-256 |
69199019dd94b7dabc7ebcff785efa4dcb741f526bb1060cbf1466eaba935df8
|
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: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86fda4d0c3ced5c4e753606dfdaf8c26d2a3e7357d86d80f35c05ca077b21de3
|
|
| MD5 |
19fef329bc59ba1eb50e69eeb87826eb
|
|
| BLAKE2b-256 |
2e9bb9893bfcdb0d2ae4a0ab37562c80e9a845a263ca772c1027ce8dde48dc81
|