peewee 2.9.2

Peewee is a minimalistic but expressive ORM library for Python. It comes in a single module and file, but supports SQLite, Mysql and Postgres, and comes with extensive documentation. It simplifies model declarations, result set iteration, and provides a rather pythonic way of query building through operator overloading.

Tags python orm flask developers python-module
License MITL
State stable

Recent Releases

2.9.208 Apr 2017 07:25 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affectinsert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (anddocid) columns. Thanks for alerting me to the and providing a. Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized parameter to the Flask co
2.9.113 Mar 2017 10:05 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affectinsert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (anddocid) columns. Thanks for alerting me to the and providing a. Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized parameter to the Flask co
2.9.007 Mar 2017 06:45 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affectinsert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (anddocid) columns. Thanks for alerting me to the and providing a. Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized parameter to the Flask co
2.8.802 Mar 2017 06:05 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affectinsert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (anddocid) columns. Thanks for alerting me to the and providing a. Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized parameter to the Flask co
2.8.723 Feb 2017 03:25 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affectinsert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (anddocid) columns. Thanks for alerting me to the and providing a. Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized parameter to the Flask co
2.8.507 Oct 2016 11:45 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affect. Insert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (and. Docid) columns. Thanks for alerting me to the and providing a Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. . #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized
2.8.403 Oct 2016 19:05 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affect. Insert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (and. Docid) columns. Thanks for alerting me to the and providing a Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. . #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized
2.8.326 Aug 2016 03:16 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affect. Insert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (and. Docid) columns. Thanks for alerting me to the and providing a Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. . #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized
2.8.210 Aug 2016 19:05 minor feature: #820 - some related to the Cython extension build process. #858 - allow blanks and perform type conversion when using the db_url. Extension. #895 - added the ability to query using the _id attribute. #922 - ensure that peewee.OperationalError is raised consistently when. Using the RetryOperationalError mixin. #929 - ensure that pwiz will import the appropriate extensions when. Vendor-specific fields are used. #930 - ensure that pwiz-generated models containing UnknownField. Placeholders do not blow up when you instantiate them. #932 - correctly limit the length of automatically-generated index names. #933 - where BlobField could not be used if it's parent model. Pointed to an uninitialized database Proxy. #935 - greater consistency with the conversion to Python data-types when. Performing aggregations, annotations, or calling scalar(). #939 - ensure the correct data-types are used when initializing a connection. Pool. #947 - where Signal subclasses were not returning rows affected on. Save. #948 - added documentation about SQLite limits and how they affect. Insert_many. #951 - better warnings regarding C extension compilation, thanks @dhaase-de. #968 - where table names starting with numbers generated invalid. Table names when using pwiz. #971 - where parameter was not being used. Thanks @jberkel. #974 - the way SqliteExtDatabase handles the automatic rowid (and. Docid) columns. Thanks for alerting me to the and providing a Failing test case @jberkel. #976 - obscure relating to cloning foreign key fields twice. #981 - allow set instances to be used on the right-hand side of IN exprs. #983 - behavior where the default id primary key was inherited. Regardless. When users would inadvertently include it in their queries, it Would use the table alias of it's parent class. #992 - add support for db_column in djpeewee. . #995 - the behavior of truncate_date with Postgresql. Thanks @Zverik. #1009 - allow DATABASE_URL as a recognized
2.8.106 May 2016 00:45 minor feature: travis-ci builds now include MySQL and Python 3.5. Dropped support for Python 3.2 and 3.3. Builds also will run the C-extension code. C extension speedups now enabled by default, includes faster implementations for dict and tuple QueryResultWrapper classes, faster date formatting, and a faster field and model sorting. C implementations of SQLite functions is now enabled by default. SQLite extension is now compatible with APSW and can be used in standalone form directly from Python. See SqliteExtDatabase for more details. SQLite C extension now supports murmurhash2. UUIDField is now supported for SQLite and MySQL, using text and varchar respectively, thanks @foxx!. Added BinaryField, thanks again, @foxx!. Added PickledField to playhouse.fields. ManyToManyField now accepts a list of primary keys when adding or removing values from the through relationship. Added support for SQLite table-valued functions using the sqlite-vtfunc library. Significantly simplified the build process for compiling the C extensions. Instead of using a Proxy for defining circular foreign key relationships, you now need to use DeferredRelation. Instead of using a Proxy for defining many-to-many through tables, you now need to use DeferredThroughModel. SQLite Virtual Models must now use Meta.extension_module and Meta.extension_options to declare extension and any options. For more details, see VirtualModel. MySQL database will now COMMIT statements for SELECT queries. This was not necessary, but added due to an influx of confused users creating GitHub. Hint: learn to user your damn database, it's not magic!. with PasswordField and Python3. Fuck Python 3. SortedFieldList and remove_field(). Thanks @klen!. clarified docs for APSW. added docs for request hooks in Pyramid (who uses Pyramid, by the way?). prefetch() only loads first ForeignKeyField for a given relation. typo in docs. foreign keys were not correctly handling coercing to the appropriate python value. cleaned up some
2.8.015 Jan 2016 13:05 minor feature: travis-ci builds now include MySQL and Python 3.5. Dropped support for Python 3.2 and 3.3. Builds also will run the C-extension code. C extension speedups now enabled by default, includes faster implementations for dict and tuple QueryResultWrapper classes, faster date formatting, and a faster field and model sorting. C implementations of SQLite functions is now enabled by default. SQLite extension is now compatible with APSW and can be used in standalone form directly from Python. See SqliteExtDatabase for more details. SQLite C extension now supports murmurhash2. UUIDField is now supported for SQLite and MySQL, using text and varchar respectively, thanks @foxx!. Added BinaryField, thanks again, @foxx!. Added PickledField to playhouse.fields. ManyToManyField now accepts a list of primary keys when adding or removing values from the through relationship. Added support for SQLite table-valued functions using the sqlite-vtfunc library. Significantly simplified the build process for compiling the C extensions. Instead of using a Proxy for defining circular foreign key relationships, you now need to use DeferredRelation. Instead of using a Proxy for defining many-to-many through tables, you now need to use DeferredThroughModel. SQLite Virtual Models must now use Meta.extension_module and Meta.extension_options to declare extension and any options. For more details, see VirtualModel. MySQL database will now COMMIT statements for SELECT queries. This was not necessary, but added due to an influx of confused users creating GitHub. Hint: learn to user your damn database, it's not magic!. with PasswordField and Python3. Fuck Python 3. SortedFieldList and remove_field(). Thanks @klen!. clarified docs for APSW. added docs for request hooks in Pyramid (who uses Pyramid, by the way?). prefetch() only loads first ForeignKeyField for a given relation. typo in docs. foreign keys were not correctly handling coercing to the appropriate python value. cleaned up some
2.7.404 Dec 2015 16:05 minor feature: Check json1 installed. Convert unicode to bytes. Remove get_field methods. _SortedFieldList, Model._meta.remove_field. Keep `order by` clause when prefetching. Automatically clean search queries. Doc clarification re #771. Rename `validate` to `validate_model`, cc @stas. Pyramid docs. Additional assertion. Allow multiple return values from rel_for_model, refs #775. multiple fk prefetch. Move the OR-logic in one level. Proper key helps. Delete deps. Fuck python3. test reverse multi fk prefetching. UUIDField support for sqlite, shuffling tests. Support for additional db url providers. Docs for #781. Compile pysqlite extension if possible.
2.7.325 Nov 2015 10:25 minor feature: install docs update. Update gitignore. Add JSONField to `sqlite_ext`. Updates and docs for JSONField. No unicode literals. Corrections to sorting. 2.7.3.
2.7.221 Nov 2015 08:25 minor feature: PasswordField that uses the bcrypt module. Added new Model Meta.only_save_dirty flag to, by default, only save fields that have been modified. Added support for upsert() on MySQL (in addition to SQLite). Implemented SQLite ranking functions (rank and bm25) in Cython, and changed both the Cython and Python APIs to accept weight values for every column in the search index. This more ly aligns with the APIs provided by FTS5. In fact, made the APIs for FTS4 and FTS5 result ranking compatible. Major changes to the :ref:sqlite_ext module. Function callbacks implemented in Python were implemented in Cython (e.g. date manipulation and regex processing) and will be used if Cython is available when Peewee is installed. Support for the experimental new FTS5 SQLite search extension. Added :py:class:SearchField for use with the SQLite FTS extensions. Added :py:class:RowIDField for working with the special rowid column in SQLite. Added a model class validation hook to allow model subclasses to perform any validation after class construction. This is currently used to ensure that FTS5Model subclasses do not violate any rules required by the FTS5 virtual table. some very broken behavior in the MySQL migrator code. Added more tests. added a RetryOperationalError mixin that will try automatically reconnecting after a failed query. There was a in the previous error handler implementation that made this impossible, which is also. column name regular expression in SQLite migrator. NULL handling with the Postgresql JSONField. added __module__ attribute to DoesNotExist classes. removed the commit_select logic for MySQL databases. added documentation for Meta.order_by API. added cast() method for casting JSON field values. added docs and method override to indicate that SQLite does not support adding foreign key constraints after table creation. Check whether pysqlite or libsqlite were compiled with BerkeleyDB support when using the :py:class:BerkeleyDatabase. Clean up th
2.6.422 Sep 2015 12:25 minor feature: a with the Cython speedups not being included in package. Documented how to create models with no primary key. Allow bare INSERT statements. Regarding foreign key / one-to-one relationships. Allow ArrayField to accept tuples in addition to lists. Regarding unsaved relations. Refactored QueryResultWrapper to allow multiple independent iterations over the same underlying result cache. With multiple joins to same table + eager loading. When connection fails while using an execution context. Use correct column names with non-standard django foreign keys. Return datetime.time instead of timedelta for MySQL time fields. SQLite migrator regular expressions. Thanks @sroebert. #647, #649, #650, added support for RETURNING clauses. Update, Insert and Delete queries can now be called with RETURNING to retrieve the rows that were affected. See docs. Added web request hook docs. Allowed arbitrary model attributes and methods to be serialized by model_to_dict(). Docs. Allow model_to_dict() to introspect query for which fields to serialize. Moved custom fields into their own playhouse module. Docs. Added backend-agnostic truncate_date() implementation. Added a CharField which uses column type CHAR. Added support for arbitrary PRAGMA statements to be run on new SQLite connections. Docs. Removed berkeley_build.sh script. See instructions on my blog instead.
2.6.307 Jul 2015 06:45 minor feature: #641, fixed bug with exception wrapping and Python 2.6. #634, fixed bug where correct query result wrapper was not being used for certain composite queries. #625, cleaned up some example code. #614, fixed bug with aggregate_rows() when there are multiple joins to the same table.
2.6.204 Jul 2015 02:05 minor bugfix: Fixed bug with exception wrapping and Python 2.6. Fixed bug where correct query result wrapper was not being used for certain composite queries. Cleaned up some example code. Fixed bug with aggregate_rows() when there are multiple joins to the same table.
2.6.131 May 2015 01:05 minor feature: Support self-referential joins with prefetch and aggregate_rows() methods. Accomodate changes in SQLite's PRAGMA index_list() return value. Fixed bug where pwiz was not passing table names to introspector. Fixed bug with handling of named cursors in older psycopg2 version. Removed some cruft from the APSWDatabase implementation.
2.6.022 Apr 2015 05:45 minor feature: get_or_create() now returns a 2-tuple consisting of the model instance and a boolean indicating whether the instance was created. The function now behaves just like the Django equivalent. better support for setting the character encoding on Postgresql database connections. Thanks @klen!. Improved implementation of get_or_create().
2.5.106 Apr 2015 20:05 minor bugfix: Fixed a bug regarding parentheses around compound SELECT queries (i.e. UNION, INTERSECT, etc). Fixed unreported bug where table aliases were not generated correctly for compound SELECT queries. Add option to preserve original column order with pwiz. Fixed unreported bug where selecting all columns from a ModelAlias does not use the appropriate FieldAlias objects. Added an option for bulk insert queries to return the list of auto-generated primary keys. See docs for InsertQuery.return_id_list. Added parse function to the playhouse.db_url module. Added hacks section to the docs. Please contribute your hacks! Calls to Node.in_() and Node.not_in() do not take *args anymore and instead take a single argument.
2.5.022 Mar 2015 08:45 major feature: Docs updates. Fixed regression in aggregate_rows(). Fixes bug in pwiz overwriting columns. Correctly cast foreign keys in prefetch(). Simplifies queries issued when doing recursive deletes. Fix cloning of Field objects. Aggregate rows now correctly preserves ordering of joined instances. Unreported, fixed bug to not leave expired connections sitting around in the pool. Added support for Postgresql's jsonb type with BinaryJSONField. Add some basic Flask helpers. Add support for UNION ALL queries. Add SqlCipherExtDatabase, which combines the sqlcipher database with the sqlite extensions. Add option to print metadata when generating code with pwiz.
2.4.705 Feb 2015 09:45 minor feature: #504, Docs updates. #506, Fixed regression in aggregate_rows() #510, Fixes bug in pwiz overwriting columns. #514, Correctly cast foreign keys in prefetch(). #515, Simplifies queries issued when doing recursive deletes. #516, Fix cloning of Field objects. #519, Aggregate rows now correctly preserves ordering of joined instances. Unreported, fixed bug to not leave expired connections sitting around in the pool. . Added support for Postgresql's jsonb type with BinaryJSONField. Add some basic Flask helpers. Add support for UNION ALL queries in #512 Add SqlCipherExtDatabase, which combines the sqlcipher database with the sqlite extensions. Add option to print metadata when generating code with pwiz.
2.4.622 Jan 2015 06:45 minor feature: #503, fixes behavior of aggregate_rows() when used with a CompositeKey. #498, fixes value coercion for field aliases. #492, fixes bug with pwiz and composite primary keys. #486, correctly handle schemas with reflection module. . Peewee has a new ManyToManyField available in the playhouse.shortcuts module. Peewee now has proper support for NOT IN queries through the Node.not_in() method. Models now support iteration. This is equivalent to Model.select().
2.4.523 Dec 2014 11:45 minor feature: #471, #482 and #484, all of which had to do with how joins were handled by the aggregate_rows() query result wrapper. #472 removed some needless special-casing in Model.save(). #466 fixed case-sensitive issues with the SQLite migrator. #474 fixed a handful of bugs that cropped up migrating foreign keys with SQLite. #475 fixed the behavior of the SQLite migrator regarding auto-generated indexes. #479 fixed a bug in the code that stripped extra parentheses in the SQL generator. Fixed a handful of bugs in the APSW extension. . Added connection abstraction called ExecutionContext (see docs). Made all context managers work as decorators (atomic, transaction, savepoint, execution_context). Added explicit methods for IS NULL and IS NOT NULL queries. The latter was actually necessary since the behavior is different from NOT IS NULL (...). Allow disabling backref validation (#465) Made quite a few improvements to the documentation, particularly sections on transactions. Added caching to the DataSet extension, which should improve performance. Made the SQLite migrator smarter with regards to preserving indexes when a table copy is necessary.
2.4.403 Dec 2014 08:05 minor feature: #466, table names are case sensitive in the SQLite migrations module. #465, added option to disable backref validation. #462, use the schema name consistently with postgres reflection. . New model Meta option to disable backref validation. See validate_backrefs. Added documentation on ordering by calculated values. Added basic PyPy compatibility. Added logic to close cursors after they have been exhausted. Structured and consolidated database metadata introspection, including improvements for introspecting indexes. Added support to prefetch for traversing up the query tree. Added introspection option to skip invalid models while introspecting. Added option to limit the tables introspected. Added closed connection detection to the MySQL connection pool. Enhancements to passing options to creating virtual tables with SQLite. Added factory method for generating Closure tables for use with the transitive_closure SQLite extension. Added support for loading SQLite extensions. Numerous test-suite enhancements and new test-cases.
2.4.324 Nov 2014 03:15 minor feature: #466, table names are case sensitive in the SQLite migrations module. #465, added option to disable backref validation. #462, use the schema name consistently with postgres reflection. . New model Meta option to disable backref validation. See validate_backrefs. Added documentation on ordering by calculated values. Added basic PyPy compatibility. Added logic to close cursors after they have been exhausted. Structured and consolidated database metadata introspection, including improvements for introspecting indexes. Added support to prefetch for traversing up the query tree. Added introspection option to skip invalid models while introspecting. Added option to limit the tables introspected. Added closed connection detection to the MySQL connection pool. Enhancements to passing options to creating virtual tables with SQLite. Added factory method for generating Closure tables for use with the transitive_closure SQLite extension. Added support for loading SQLite extensions. Numerous test-suite enhancements and new test-cases.
2.4.220 Nov 2014 03:16 minor feature: #449, typo in the db_url extension, thanks to @malea for the fix. #457 and #458, fixed documentation deficiences. . Added support for importing data when using the DataSet extension. Added an encrypted diary app to the examples. Better index reconstruction when altering columns on SQLite databases with the migrate module. Support for multi-column primary keys in the reflection module. Close cursors more aggressively when executing SELECT queries.
2.3.102 Sep 2014 22:13 minor bugfix: Bugfix release for version 2.3.0 which added: New and improved documentation Added aggregate_rows() method for mitigating N+1 queries. Query compiler performance improvements and rewrite of table alias internals ( 51d82fc and d8d55df ). Added context-managers and decorators for counting queries and asserting query counts. Allow UPDATE queries to contain subqueries for values (example). Support for INSERT INTO / SELECT FROM queries (docs). Allow SqliteDatabase to set the database's journal mode. Added method for concatenation (docs). Moved UUIDField out of the playhouse and into peewee Added pskel script. Documentation for BerkeleyDB.
2.2.501 Aug 2014 04:40 minor bugfix: It's possible to create reusable window definitions now. Support for DISTINCT ON (...) was added, and a BerkeleyDB-extended SQLite build script introduced. UUIDField handling of None values was fixed together with various errors in the example app.