flask-restless v1.0.0.b1 Release Notes

Release Date: 2016-04-14 // over 5 years ago
  • ๐Ÿš€ This is a beta release; these changes will appear in the 1.0.0 release.

    ๐Ÿš€ Released on April 2, 2016.

    • ๐Ÿ‘ :issue:255: adds support for filtering by PostgreSQL network operators.
    • :issue:257: ensures additional attributes specified by the user actually exist on the model.
    • :issue:363 (partial solution): don't use COUNT on requests that don't require pagination.
    • ๐Ÿ‘ :issue:404: Major overhaul of Flask-Restless to support JSON API.
    • Increases minimum version requirement for python-dateutil to be strictly greater than 2.2 to avoid parsing bug.
    • :issue:331,415: documents the importance of URL encoding when using the like operator to filter results.
    • :issue:376: add a not_like operator for filter objects.
    • :issue:431: adds a url_prefix keyword argument to the :class:.APIManager constructor, so one can specify a URL prefix once for all created APIs.
    • :issue:449: roll back the session on any SQLAlchemy error, not just a few.
    • :issue:432,462: alias relation names when sorting by multiple attributes on a relationship.
    • :issue:436,453: use __table__.name instead of __tablename__ to infer the collection name for the SQLAlchemy model.
    • :issue:440,475: uses the serialization function provided at the time of invoking :meth:.APIManager.create_api to serialize each resource correctly, depending on its type.
    • :issue:474: include license files in built wheel for distribution.
    • :issue:501: allows empty string for url_prefix keyword argument to :meth:.APIManager.create_api.
    • :issue:476: use the primary key provided at the time of invoking :meth:.APIManager.create_api to build resource urls in responses.

    Older versions

    .. note::

    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.

    .. note::

    As of version 0.6, Flask-Restless supports both pure SQLAlchemy and Flask-SQLAlchemy models. Before that, it supported only Elixir models.

    ๐Ÿ”– Version 0.17.0

    
    ๐Ÿš€ Released on February 17, 2015.
    
    - Corrects bug to allow delayed initialization of multiple Flask applications.
    - :issue:`167`: allows custom serialization/deserialization functions.
    - :issue:`198`: allows arbitrary Boolean expressions in search query filters.
    - :issue:`226`: allows creating APIs before initializing the Flask application object.
    - :issue:`274`: adds the :func:`.url_for` function for computing URLs from models.
    - ๐Ÿ“œ :issue:`379`: improves datetime parsing in search requests.
    - ๐Ÿ›  :issue:`398`: fixes bug where DELETE_SINGLE processors were not actually used.
    - :issue:`400`: disallows excluding a primary key on a :http:method:`POST` request.
    
    ๐Ÿ”– Version 0.16.0
    

    ๐Ÿš€ Released on February 3, 2015.

    • โœ‚ :issue:237: allows bulk delete of model instances via the allow_delete_many keyword argument.
    • :issue:313,389: :meth:.APIManager.init_app now can be correctly used to initialize multiple Flask applications.
    • :issue:327,391: allows ordering searches by fields on related instances.
    • :issue:353: allows search queries to specify group_by directives.
    • :issue:365: allows preprocessors to specify return values on :http:method:get requests.
    • :issue:385: makes the include_methods keywords argument respect model properties.

    ๐Ÿ”– Version 0.15.1

    
    ๐Ÿš€ Released on January 2, 2015.
    
    - :issue:`367`: catch :exc:`sqlalchemy.exc.IntegrityError`,
      :exc:`sqlalchemy.exc.DataError`, and :exc:`sqlalchemy.exc.ProgrammingError`
      exceptions in all view methods.
    - :issue:`374`: import :class:`sqlalchemy.schema.Column` from
      :mod:`!sqlalchemy` directly, instead of :mod:`!sqlalchemy.sql.schema`.
    
    ๐Ÿ”– Version 0.15.0
    

    ๐Ÿš€ Released on October 30, 2014.

    • ๐Ÿ‘ป :issue:320: detect settable hybrid properties instead of raising an exception.
    • :issue:350: allows exclude/include columns to be specified as SQLAlchemy column objects in addition to strings.
    • โช :issue:356: rollback the SQLAlchemy session on a failed :http:method:patch request.
    • ๐Ÿ“š :issue:368: adds missing documentation on using custom queries (see :ref:customqueries)

    ๐Ÿ”– Version 0.14.2

    
    ๐Ÿš€ Released on September 2, 2014.
    
    - ๐Ÿ›  :issue:`351,355`: fixes bug in getting related models from a model with hybrid
      properties.
    
    ๐Ÿ”– Version 0.14.1
    

    ๐Ÿš€ Released on August 26, 2014.

    • ๐Ÿ“š :issue:210: lists some related projects in the documentation.
    • ๐Ÿ— :issue:347: adds automated build testing for PyPy 3.
    • โœ‚ :issue:354: renames is_deleted to was_deleted when providing keyword arguments to postprocessor for :http:method:delete method in order to match documentation.

    ๐Ÿ”– Version 0.14.0

    
    ๐Ÿš€ Released on August 12, 2014.
    
    - ๐Ÿ›  Fixes bug where primary key specified by user was not being checked in some
      :http:method:`post` requests and some search queries.
    - :issue:`223`: documents CORS example.
    - :issue:`280`: don't expose raw SQL in responses on database errors.
    - โœ… :issue:`299`: show error message if search query tests for ``NULL`` using comparison
      operators.
    - :issue:`315`: check for query object being ``None``.
    - :issue:`324`: :http:method:`delete` should only return :http:statuscode:`204` if
      something is actuall deleted.
    - ๐Ÿ‘ :issue:`325`: support ``null`` inside ``has`` search operators.
    - โœ… :issue:`328`: enable automatic testing for Python 3.4.
    - :issue:`333`: enforce limit in :func:`!flask_restless.views.helpers.count`.
    - โšก๏ธ :issue:`338`: catch validation exceptions when attempting to update relations.
    - :issue:`339`: use user-specified primary key on :http:method:`patch` requests.
    - :issue:`344`: correctly encodes Unicode fields in responses.
    
    ๐Ÿ”– Version 0.13.1
    

    ๐Ÿš€ Released on April 21, 2014.

    • ๐Ÿ›  :issue:304: fixes mimerender bug due to how Python 3.4 handles decorators.

    ๐Ÿ”– Version 0.13.0

    
    ๐Ÿš€ Released on April 6, 2014.
    
    - ๐Ÿ‘ Allows universal preprocessors or postprocessors; see :ref:`universal`.
    - ๐Ÿ‘ Allows specifying which primary key to use when creating endpoint URLs.
    - Requires SQLAlchemy version 0.8 or greater.
    - ๐Ÿ“œ :issue:`17`: use Flask's :attr:`flask.Request.json` to parse incoming JSON requests.
    - :issue:`29`: replace custom ``jsonify_status_code`` function with built-in support
      for ``return jsonify(), status_code`` style return statements (new in Flask
      0.9).
    - :issue:`51`: Use `mimerender`_ to render dictionaries to JSON format.
    - ๐Ÿ‘ :issue:`247`: adds support for making :http:method:`post` requests to dictionary-like
      association proxies.
    - :issue:`249`: returns :http:statuscode:`404` if a search reveals no matching results.
    - :issue:`254`: returns :http:statuscode:`404` if no related field exists for a request
      with a related field in the URL.
    - :issue:`256`: makes search parameters available to postprocessors for
      :http:method:`get` and :http:method:`patch` requests that access multiple
      resources.
    - ๐Ÿ‘ :issue:`263`: Adds Python 3.3 support; drops Python 2.5 support.
    - :issue:`267`: Adds compatibility for legacy Microsoft Internet Explorer versions 8
      and 9.
    - :issue:`270`: allows the ``query`` attribute on models to be a callable.
    - :issue:`282`: order responses by primary key if no order is specified.
    - :issue:`284`: catch ``DataError`` and ``ProgrammingError`` exceptions when bad data
      are sent to the server.
    - โšก๏ธ :issue:`286`: speed up paginated responses by using optimized count() function.
    - :issue:`293`: allows :class:`sqlalchemy.types.Time` fields in JSON responses.
    
    .. _mimerender: https://mimerender.readthedocs.io
    
    ๐Ÿ”– Version 0.12.1
    

    ๐Ÿš€ Released on December 1, 2013.

    • :issue:222: on :http:method:post and :http:method:patch requests, recurse into nested relations to get or create instances of related models.
    • โœ… :issue:246: adds pysqlite <https://pypi.python.org/pypi/pysqlite>_ to test requirements.
    • :issue:260: return a single object when making a :http:method:get request to a relation sub-URL.
    • :issue:264: all methods now execute postprocessors after setting headers.
    • :issue:265: convert strings to dates in related models when making :http:method:post requests.

    ๐Ÿ”– Version 0.12.0

    
    ๐Ÿš€ Released on August 8, 2013.
    
    - ๐Ÿ“‡ :issue:`188`: provides metadata as well as normal data in JSONP responses.
    - :issue:`193`: allows :http:method:`delete` requests to related instances.
    - ๐Ÿ”ง :issue:`215`: removes Python 2.5 tests from Travis configuration.
    - :issue:`216`: don't resolve Query objects until pagination function.
    - :issue:`217`: adds missing indices in format string.
    - :issue:`220`: fix bug when checking attributes on a hybrid property.
    - :issue:`227`: allows client to request that the server use the current date
      and/or time when setting the value of a field.
    - ๐Ÿ›  :issue:`228` (as well as :issue:`212,218,231`): fixes issue due to a module
      removed from Flask version 0.10.
    
    ๐Ÿ”– Version 0.11.0
    

    ๐Ÿš€ Released on May 18, 2013.

    • Requests that require a body but don't have Content-Type: application/json will cause a :http:statuscode:415 response.
    • Responses now have Content-Type: application/json.
    • :issue:180: allow more expressive has and any searches.
    • :issue:195: convert UUID objects to strings when converting an instance of a model to a dictionary.
    • :issue:202: allow setting hybrid properties with expressions and setters.
    • :issue:203: adds the include_methods keyword argument to :meth:.APIManager.create_api, which allows JSON responses to include the result of calling arbitrary methods of instances of models.
    • :issue:204, 205: allow parameters in Content-Type header.

    ๐Ÿ”– Version 0.10.1

    
    ๐Ÿš€ Released on May 8, 2013.
    
    - โœ… :issue:`115`: change ``assertEqual()`` methods to ``assert`` statements in tests.
    - โœ… :issue:`184,186`: Switch to `nose <http://nose.readthedocs.org>`_ for testing.
    - :issue:`197`: documents technique for adding filters in processors when there are
      none initially.
    
    ๐Ÿ”– Version 0.10.0
    

    ๐Ÿš€ Released on April 30, 2013.

    • :issue:2: adds basic :http:method:get access to one level of relationship depth for models.
    • :issue:113: interpret empty strings for date fields as None objects.
    • โœ… :issue:115: use Python's built-in assert statements for testing
    • :issue:128: allow disjunctions when filtering search queries.
    • ๐Ÿ“š :issue:130: documentation and examples now more clearly show search examples.
    • ๐Ÿ‘ :issue:135: added support for hybrid properties.
    • ๐Ÿšš :issue:139: remove custom code for authentication in favor of user-defined pre- and postprocessors (this supercedes the fix from :issue:154).
    • :issue:141: relax requirement for version of python-dateutil <http://labix.org/python-dateutil>_ to be not equal to 2.0 if using Python version 2.6 or 2.7.
    • :issue:146: preprocessors now really execute before other code.
    • โœ… :issue:148: adds support for SQLAlchemy association proxies <http://docs.sqlalchemy.org/en/latest/orm/extensions/associationproxy.html>_.
    • :issue:154 (this fix is irrelevant due to :issue:139): authentication function now may raise an exception instead of just returning a Boolean.
    • :issue:157: :http:method:post requests now receive a response containing all fields of the created instance.
    • :issue:162: allow pre- and postprocessors to indicate that no change has occurred.
    • โšก๏ธ :issue:164,172,173: :http:method:patch requests update fields on related instances.
    • ๐Ÿ›  :issue:165: fixed bug in automatic exposing of URLs for related instances.
    • :issue:170: respond with correct HTTP status codes when a query for a single instance results in none or multiple instances.
    • :issue:174: allow dynamically loaded relationships for automatically exposed URLs of related instances.
    • :issue:176: get model attribute instead of column name when getting name of primary key.
    • :issue:182: allow :http:method:post requests that set hybrid properties.
    • ๐ŸŒฒ :issue:152: adds some basic server-side logging for exceptions raised by views.

    ๐Ÿ”– Version 0.9.3

    
    ๐Ÿš€ Released on February 4, 2013.
    
    - ๐Ÿ›  Fixes incompatibility with Python 2.5 try/except syntax.
    - :issue:`116`: handle requests which raise :exc:`~sqlalchemy.exc.IntegrityError`.
    
    ๐Ÿ”– Version 0.9.2
    

    ๐Ÿš€ Released on February 4, 2013.

    • :issue:82,134,136: added request pre- and postprocessors.
    • ๐Ÿ‘ :issue:120: adds support for JSON-P callbacks in :http:method:get requests.

    ๐Ÿ”– Version 0.9.1

    
    ๐Ÿš€ Released on January 17, 2013.
    
    - ๐Ÿ“š :issue:`126`: fix documentation build failure due to bug in a dependency.
    - :issue:`127`: added "ilike" query operator.
    
    ๐Ÿ”– Version 0.9.0
    

    ๐Ÿš€ Released on January 16, 2013.

    • โœ‚ Removed ability to provide a :class:~sqlalchemy.orm.session.Session class when initializing :class:.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.
    • :issue:105: added ability to set a list of related model instances on a model.
    • :issue:107: server responds with an error code when a :http:method:patch or :http:method:post request specifies a field which does not exist on the model.
    • :issue:108: dynamically loaded relationships should now be rendered correctly by the :func:!views._to_dict function regardless of whether they are a list or a single object.
    • :issue:109: use sphinxcontrib-issuetracker_ to render links to GitHub issues in documentation.
    • :issue:110: enable results_per_page query parameter for clients, and added max_results_per_page keyword argument to :meth:.APIManager.create_api.
    • :issue:114: fix bug where string representations of integers were converted to integers.
    • :issue:117: allow adding related instances on :http:method:patch requests for one-to-one relationships.
    • :issue:123: :http:method:patch requests to instances which do not exist result in a :http:statuscode:404 response.

    โœ… .. _sphinxcontrib-issuetracker: https://sphinxcontrib-issuetracker.readthedocs.org/en/latest

    ๐Ÿ”– Version 0.8.0

    
    ๐Ÿš€ Released on November 19, 2012.
    
    - :issue:`94`: :func:`!views._to_dict` should return a single object instead of
      a list when resolving dynamically loaded many-to-one relationships.
    - :issue:`104`: added ``num_results`` key to paginated JSON responses.
    
    ๐Ÿ”– Version 0.7.0
    

    ๐Ÿš€ Released on October 9, 2012.

    • โž• Added working include and exclude functionality to the :func:!views._to_dict function.
    • Added exclude_columns keyword argument to :meth:.APIManager.create_api.
    • :issue:79: attempted to access attribute of None in constructor of :class:.APIManager.
    • :issue:83: allow :http:method:post requests with one-to-one related instances.
    • :issue:86: allow specifying include and exclude for related models.
    • :issue:91: correctly handle :http:method:post requests to nullable :class:~sqlalchemy.types.DateTime columns.
    • :issue:93: Added a total_pages mapping to the JSON response.
    • :issue:98: :http:method:get requests to the function evaluation endpoint should not have a data payload.
    • :issue:101: exclude in :func:!views._to_dict function now correctly excludes requested fields from the returned dictionary.

    ๐Ÿ”– Version 0.6

    
    ๐Ÿš€ Released on June 20, 2012.
    
    - โž• Added support for accessing model instances via arbitrary primary keys,
      instead of requiring an integer column named ``id``.
    - โž• Added example which uses curl as a client.
    - โž• Added support for pagination of responses.
    - ๐Ÿ›  Fixed issue due to symbolic link from :file:`README` to :file:`README.md`
      when running ``pip bundle foobar Flask-Restless``.
    - ๐Ÿ–จ Separated API blueprint creation from registration, using
      :meth:`.APIManager.create_api` and :meth:`.APIManager.create_api_blueprint`.
    - โž• Added support for pure SQLAlchemy in addition to Flask-SQLAlchemy.
    - :issue:`74`: Added ``post_form_preprocessor`` keyword argument to
      :meth:`.APIManager.create_api`.
    - :issue:`77`: validation errors are now correctly handled on :http:method:`PATCH`
      requests.
    
    ๐Ÿ”– Version 0.5
    

    ๐Ÿš€ Released on April 10, 2012.

    • Dual-licensed under GNU AGPLv3+ and 3-clause BSD license.
    • โž• Added capturing of exceptions raised during field validation.
    • โž• Added :file:examples/separate_endpoints.py, showing how to create separate API endpoints for a single model.
    • Added include_columns keyword argument to :meth:.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.

    ๐Ÿ”– Version 0.4

    
    ๐Ÿš€ 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_functions`` function out of the
      :mod:`!flask_restless.search` module and corrected documentation about how
      function evaluation works.
    - Added `allow_functions` keyword argument to :meth:`.APIManager.create_api`.
    - ๐Ÿ›  Fixed bug where we weren't allowing PUT requests in
      :meth:`.APIManager.create_api`.
    - Added ``collection_name`` keyword argument to :meth:`.APIManager.create_api`
      to allow user provided names in URLs.
    - Added ``allow_patch_many`` keyword argument to :meth:`.APIManager.create_api`
      to allow enabling or disabling the PATCH many functionality.
    - 0๏ธโƒฃ Disable the PATCH many functionality by default.
    
    ๐Ÿ”– Version 0.3
    

    ๐Ÿš€ Released on March 4, 2012.

    • ๐ŸŽ‰ Initial release in Flask extension format.