Here you can see the full list of changes between each Flask-Restless release. Version 1.0.0 saw a major overhaul of Flask-Restless to make it compliant with JSON API, so changes from prior versions may not be relevant to more recent versions.
Numbers following a pound sign (#) refer to GitHub issues.
This is a beta release; these changes will appear in the 1.0.0 release.
Not yet released.
- Eliminates all documentation build warnings for bad references.
- Changes serialization/deserialization to class-based implementation instead of a function-based implementation. This also adds support for serialization of heterogeneous collections.
- Removes mimerender as a dependency.
- #7: allows filtering before function evaluation.
- #49: deserializers now expect a complete JSON API document.
- #200: be smarter about determining the
collection_namefor polymorphic models defined with single-table inheritance.
- #253: don’t assign to callable attributes of models.
- #268: adds top-level endpoint that exposes API schema.
- #479: removes duplicate (and sometimes conflicting) Content-Type header in responses.
- #481, #488: added negation (
not) operator for search.
- #492: support JSON API recommended “simple” filtering.
- #508: flush the session before postprocessors, and commit after.
- #534: when updating a resource, give a clearer error message if the resource ID in the JSON document is not a JSON string.
- #536: adds support for single-table inheritance.
- #540: correctly support models that don’t have a column named “id”.
- #545: refactors implementation of
DefaultDeserializerso that it is easier for subclasses to override different subprocedures.
- #546: adds support for joined table inheritance.
- #548: requests can now use the
- #559: fixes bug that stripped attributes with JSON API reserved names (like “type”) when deserializing resources.
- #583: fixes failing tests when using simplejson.
- #590: allows user to specify a custom operator for filters.
- #599: fixes unicode bug using
urlparse.urljoin()with the future library in resource serialization.
- #625: adds schema metadata to root endpoint.
- #626: allows the client to request case-insensitive sorting.
This is a beta release; these changes will appear in the 1.0.0 release.
Released on April 2, 2016.
- #255: adds support for filtering by PostgreSQL network operators.
- #257: ensures additional attributes specified by the user actually exist on the model.
- #363 (partial solution): don’t use
COUNTon requests that don’t require pagination.
- #404: Major overhaul of Flask-Restless to support JSON API.
- Increases minimum version requirement for
python-dateutilto be strictly greater than 2.2 to avoid parsing bug.
- #331, #415: documents the importance of URL encoding when using the
likeoperator to filter results.
- #376: add a
not_likeoperator for filter objects.
- #431: adds a
url_prefixkeyword argument to the
APIManagerconstructor, so one can specify a URL prefix once for all created APIs.
- #449: roll back the session on any SQLAlchemy error, not just a few.
- #432, #462: alias relation names when sorting by multiple attributes on a relationship.
- #436, #453: use
__tablename__to infer the collection name for the SQLAlchemy model.
- #440, #475: uses the serialization function provided at the time of
APIManager.create_api()to serialize each resource correctly, depending on its type.
- #474: include license files in built wheel for distribution.
- #501: allows empty string for url_prefix keyword argument to
- #476: use the primary key provided at the time of invoking
APIManager.create_api()to build resource urls in responses.
As of version 0.13.0, Flask-Restless supports Python 2.6, 2.7, and 3. Before that, it supported Python 2.5, 2.6, and 2.7.
As of version 0.6, Flask-Restless supports both pure SQLAlchemy and Flask-SQLAlchemy models. Before that, it supported only Elixir models.
Released on February 17, 2015.
- Corrects bug to allow delayed initialization of multiple Flask applications.
- #167: allows custom serialization/deserialization functions.
- #198: allows arbitrary Boolean expressions in search query filters.
- #226: allows creating APIs before initializing the Flask application object.
- #274: adds the
url_for()function for computing URLs from models.
- #379: improves datetime parsing in search requests.
- #398: fixes bug where DELETE_SINGLE processors were not actually used.
- #400: disallows excluding a primary key on a POST request.
Released on February 3, 2015.
- #237: allows bulk delete of model instances via the
- #313, #389:
APIManager.init_app()now can be correctly used to initialize multiple Flask applications.
- #327, #391: allows ordering searches by fields on related instances.
- #353: allows search queries to specify
- #365: allows preprocessors to specify return values on GET requests.
- #385: makes the include_methods keywords argument respect model properties.
Released on January 2, 2015.
Released on October 30, 2014.
- #320: detect settable hybrid properties instead of raising an exception.
- #350: allows exclude/include columns to be specified as SQLAlchemy column objects in addition to strings.
- #356: rollback the SQLAlchemy session on a failed PATCH request.
- #368: adds missing documentation on using custom queries (see Custom queries)
Released on September 2, 2014.
Released on August 26, 2014.
Released on August 12, 2014.
- Fixes bug where primary key specified by user was not being checked in some POST requests and some search queries.
- #223: documents CORS example.
- #280: don’t expose raw SQL in responses on database errors.
- #299: show error message if search query tests for
NULLusing comparison operators.
- #315: check for query object being
- #324: DELETE should only return 204 No Content if something is actuall deleted.
- #325: support
- #328: enable automatic testing for Python 3.4.
- #333: enforce limit in
- #338: catch validation exceptions when attempting to update relations.
- #339: use user-specified primary key on PATCH requests.
- #344: correctly encodes Unicode fields in responses.
Released on April 21, 2014.
- #304: fixes mimerender bug due to how Python 3.4 handles decorators.
Released on April 6, 2014.
- Allows universal preprocessors or postprocessors; see Universal preprocessors and postprocessors.
- Allows specifying which primary key to use when creating endpoint URLs.
- Requires SQLAlchemy version 0.8 or greater.
- #17: use Flask’s
flask.Request.jsonto parse incoming JSON requests.
- #29: replace custom
jsonify_status_codefunction with built-in support for
return jsonify(), status_codestyle return statements (new in Flask 0.9).
- #51: Use mimerender to render dictionaries to JSON format.
- #247: adds support for making POST requests to dictionary-like association proxies.
- #249: returns 404 Not Found if a search reveals no matching results.
- #254: returns 404 Not Found if no related field exists for a request with a related field in the URL.
- #256: makes search parameters available to postprocessors for GET and PATCH requests that access multiple resources.
- #263: Adds Python 3.3 support; drops Python 2.5 support.
- #267: Adds compatibility for legacy Microsoft Internet Explorer versions 8 and 9.
- #270: allows the
queryattribute on models to be a callable.
- #282: order responses by primary key if no order is specified.
- #284: catch
ProgrammingErrorexceptions when bad data are sent to the server.
- #286: speed up paginated responses by using optimized count() function.
- #293: allows
sqlalchemy.types.Timefields in JSON responses.
Released on December 1, 2013.
- #222: on POST and PATCH requests, recurse into nested relations to get or create instances of related models.
- #246: adds pysqlite to test requirements.
- #260: return a single object when making a GET request to a relation sub-URL.
- #264: all methods now execute postprocessors after setting headers.
- #265: convert strings to dates in related models when making POST requests.
Released on August 8, 2013.
- #188: provides metadata as well as normal data in JSONP responses.
- #193: allows DELETE requests to related instances.
- #215: removes Python 2.5 tests from Travis configuration.
- #216: don’t resolve Query objects until pagination function.
- #217: adds missing indices in format string.
- #220: fix bug when checking attributes on a hybrid property.
- #227: allows client to request that the server use the current date and/or time when setting the value of a field.
- #228 (as well as #212, #218, #231): fixes issue due to a module removed from Flask version 0.10.
Released on May 18, 2013.
- Requests that require a body but don’t have
Content-Type: application/jsonwill cause a 415 Unsupported Media Type response.
- Responses now have
- #180: allow more expressive
- #195: convert UUID objects to strings when converting an instance of a model to a dictionary.
- #202: allow setting hybrid properties with expressions and setters.
- #203: adds the
include_methodskeyword argument to
APIManager.create_api(), which allows JSON responses to include the result of calling arbitrary methods of instances of models.
- #204, 205: allow parameters in
Released on May 8, 2013.
Released on April 30, 2013.
- #2: adds basic GET access to one level of relationship depth for models.
- #113: interpret empty strings for date fields as
- #115: use Python’s built-in assert statements for testing
- #128: allow disjunctions when filtering search queries.
- #130: documentation and examples now more clearly show search examples.
- #135: added support for hybrid properties.
- #139: remove custom code for authentication in favor of user-defined pre- and postprocessors (this supercedes the fix from #154).
- #141: relax requirement for version of python-dateutil to be not equal to 2.0 if using Python version 2.6 or 2.7.
- #146: preprocessors now really execute before other code.
- #148: adds support for SQLAlchemy association proxies.
- #154 (this fix is irrelevant due to :issue:`139`): authentication function now may raise an exception instead of just returning a Boolean.
- #157: POST requests now receive a response containing all fields of the created instance.
- #162: allow pre- and postprocessors to indicate that no change has occurred.
- #164, #172, #173: PATCH requests update fields on related instances.
- #165: fixed bug in automatic exposing of URLs for related instances.
- #170: respond with correct HTTP status codes when a query for a single instance results in none or multiple instances.
- #174: allow dynamically loaded relationships for automatically exposed URLs of related instances.
- #176: get model attribute instead of column name when getting name of primary key.
- #182: allow POST requests that set hybrid properties.
- #152: adds some basic server-side logging for exceptions raised by views.
Released on February 4, 2013.
Released on February 4, 2013.
Released on January 17, 2013.
Released on January 16, 2013.
- Removed ability to provide a
Sessionclass when initializing
APIManager; provide an instance of the class instead.
- Changes some dynamically loaded relationships used for testing and in examples to be many-to-one instead of the incorrect one-to-many. Versions of SQLAlchemy after 0.8.0b2 raise an exception when the latter is used.
- #105: added ability to set a list of related model instances on a model.
- #107: server responds with an error code when a PATCH or POST request specifies a field which does not exist on the model.
- #108: dynamically loaded relationships should now be rendered
correctly by the
views._to_dict()function regardless of whether they are a list or a single object.
- #109: use sphinxcontrib-issuetracker to render links to GitHub issues in documentation.
- #110: enable
results_per_pagequery parameter for clients, and added
max_results_per_pagekeyword argument to
- #114: fix bug where string representations of integers were converted to integers.
- #117: allow adding related instances on PATCH requests for one-to-one relationships.
- #123: PATCH requests to instances which do not exist result in a 404 Not Found response.
Released on November 19, 2012.
Released on October 9, 2012.
- Added working
excludefunctionality to the
exclude_columnskeyword argument to
- #79: attempted to access attribute of
Nonein constructor of
- #83: allow POST requests with one-to-one related instances.
- #86: allow specifying include and exclude for related models.
- #91: correctly handle POST requests to nullable
- #93: Added a
total_pagesmapping to the JSON response.
- #98: GET requests to the function evaluation endpoint should not have a data payload.
views._to_dict()function now correctly excludes requested fields from the returned dictionary.
Released on June 20, 2012.
- Added support for accessing model instances via arbitrary primary keys,
instead of requiring an integer column named
- Added example which uses curl as a client.
- Added support for pagination of responses.
- Fixed issue due to symbolic link from
pip bundle foobar Flask-Restless.
- Separated API blueprint creation from registration, using
- Added support for pure SQLAlchemy in addition to Flask-SQLAlchemy.
- #74: Added
post_form_preprocessorkeyword argument to
- #77: validation errors are now correctly handled on PATCH requests.
Released on April 10, 2012.
- Dual-licensed under GNU AGPLv3+ and 3-clause BSD license.
- Added capturing of exceptions raised during field validation.
examples/separate_endpoints.py, showing how to create separate API endpoints for a single model.
include_columnskeyword argument to
APIManager.create_api()method to allow users to specify which columns of the model are exposed in the API.
- Replaced Elixir with Flask-SQLAlchemy. Flask-Restless now only supports Flask-SQLAlchemy.
Released on March 29, 2012.
- Added Python 2.5 and Python 2.6 support.
- Allow users to specify which HTTP methods for a particular API will require authentication and how that authentication will take place.
- Created base classes for test cases.
- Moved the
evaluate_functionsfunction out of the
flask_restless.searchmodule and corrected documentation about how function evaluation works.
- Added allow_functions keyword argument to
- Fixed bug where we weren’t allowing PUT requests in
collection_namekeyword argument to
APIManager.create_api()to allow user provided names in URLs.
allow_patch_manykeyword argument to
APIManager.create_api()to allow enabling or disabling the PATCH many functionality.
- Disable the PATCH many functionality by default.
Released on March 4, 2012.
- Initial release in Flask extension format.