Metadata-Version: 2.0
Name: eve-peewee
Version: 0.0.3
Summary: Data layer for Eve powered by peewee.
Home-page: https://github.com/stt/eve-peewee
Author: Samuli Tuomola
Author-email: samuli.tuomola@gmail.com
License: BSD
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Dist: Eve (>=0.5)
Requires-Dist: peewee (>=2.6)
Provides-Extra: test
Requires-Dist: mock; extra == 'test'
Requires-Dist: pytest; extra == 'test'

Eve Peewee extension
====================

|Build Status|

A WIP data layer for `Eve <http://python-eve.org/>`__ using
`peewee <http://peewee-orm.com/>`__

Currently peewee creates tables based on settings.py DOMAIN declarations
during start-up and basic Eve CRUD methods work.

Instuctions
^^^^^^^^^^^

-  ``python setup.py install`` or ``pip install eve-peewee``
-  define DATABASE\_URI in settings.py (see examples)
-  Eve(data=EvePeewee).run()

Tested
^^^^^^

-  postgres 9.x, sqlite3
-  python 2.7, 3.5
-  basic eve functionality (filtering, sorting, pagination, timestamps,
   etag/if-match, soft delete)
-  1:m data relationships

Untested/TBD
^^^^^^^^^^^^

-  mysql
-  custom validator
-  constraints (unique)
-  m:m data relationships (atm creates link tables but likely fails to
   query for embedding)
-  versioning fields

Notable caveats
^^^^^^^^^^^^^^^

-  peewee doesn't do auto-migration (if you change domain models, drop
   the tables to get them recreated or apply changes in db manually)
-  peewee specific field properties can be defined in DOMAIN schema
   (requires "transparent\_schema\_rules"), e.g.
   ``'_peewee': { 'primary_key': True }``
-  not all possible error cases are captured to json/xml document,
   default 500 response may happen
-  objectid and media types are unsupported (list and dict types are
   saved as jsonb)
-  many of the mongo centric field properties of eve (anyof, allof etc)
   are silently ignored

.. |Build Status| image:: https://travis-ci.org/stt/eve-peewee.svg
   :target: https://travis-ci.org/stt/eve-peewee


