Installing and Testing¶
Most users will want to simply install the latest version, hosted on PyPI:
pip install peewee
Peewee has optional Sqlite C extensions which are not bundled as part of the wheel. If you wish to use these, you can install Peewee via source distribution:
pip install peewee --no-binary :all:
Installing with git¶
The project is hosted at https://github.com/coleifer/peewee and can be installed using git:
git clone https://github.com/coleifer/peewee.git
cd peewee
pip install .
Running tests¶
You can test your installation by running the test suite.
python runtests.py
You can test specific features or specific database drivers using the
runtests.py script. To view the available test runner options, use:
python runtests.py --help
Note
To run tests against Postgres or MySQL you need to create a database named “peewee_test”. To test the Postgres extension module, you will also want to install the HStore extension in the postgres test database:
-- install the hstore extension on the peewee_test postgres db.
CREATE EXTENSION hstore;
Driver support¶
Database |
Driver |
Implementation |
|---|---|---|
Sqlite |
|
|
Postgres |
|
|
Postgres |
|
|
MySQL |
|
|
Sqlite (async) |
|
|
Postgres (async) |
|
|
MySQL (async) |
|
|
Sqlite (alternate) |
|
|
Sqlite (alternate) |
|
|
SqlCipher |
|
|
MySQL (alternate) |
|
|
MariaDB (alternate) |
|