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 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.1-py2.7.egg
(6.7 kB
view details)
File details
Details for the file pwmd-0.1.tar.gz.
File metadata
- Download URL: pwmd-0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e885c0c109c4250cf884d15095dcce90367b581c39b6f7d637385f03e1490887
|
|
| MD5 |
71b996f89b500dea41287408227549bc
|
|
| BLAKE2b-256 |
8502742efe1d02f31317da24dcfa54c91744c3a8cf6e0e0db2b67f27375af33a
|
File details
Details for the file pwmd-0.1-py2.7.egg.
File metadata
- Download URL: pwmd-0.1-py2.7.egg
- Upload date:
- Size: 6.7 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2687559fdc847e1fd4e6fa98d67bd2ce47c78dfefe6874791509e04b9934db9
|
|
| MD5 |
284aaa7fb4e0a1505b4f49fc1727c5e6
|
|
| BLAKE2b-256 |
0f9005ae9ca66927555e6331e9d3214a27dce6f8b785a792ab3fc9e44f437ac0
|