This is Flask-Restless, a Flask extension which facilitates the creation of ReSTful JSON APIs. It is compatible with models which have been described using Elixir, a layer on top of SQLAlchemy.
This document contains some brief instructions concerning installation of requirements, installation of this extension, configuration and usage of this extension, and building of documentation.
For more information, check the World Wide Web!
The code comprising this program is copyright 2011 Lincoln de Sousa and 2012
Jeffrey Finkelstein, and is published under the GNU Affero General Public
License, either version 3 or (at your option) any later version. For more
information see the COPYING
file.
This is a partial listing of the contents of this package.
COPYING
- the copyright license under which this program is distributed to you (the GNU Affero General Public License version 3)docs/
- the Sphinx documentation for Flask-Restlessexamples/
- example applications of Flask-Restlessflask_restless/
- the Python package containing the extensionREADME.md
- this filesetup.py
- Python setuptools configuration file for packaging this extensiontests/
- unit tests for Flask-Restless
The flask_restless
directory is a Python package containing the following
files:
views.py
- the view class which implements the ReSTful APImanager.py
- the main class which end users will utilize to create ReSTful APIs for their database modelsmodel.py
- the base class to use for models for which ReSTful APIs will be createdsearch.py
- functions and classes which facilitate searching the database on requests which require a search
This application requires Python version 2.5, 2.6, or 2.7.
This application requires the following libraries to be installed:
- Flask version 0.7 or greater
- Elixir
- SQLAlchemy
- python-dateutil version less than 2.0
These requirements are also listed in the requirements.txt
file. Using pip
is probably the easiest way to install these:
pip install -r requirements.txt
or
pip install Flask Elixir SQLAlchemy python-dateutil
This package can be built, installed, etc. as a Python egg using the provided
setup.py
script. For more information, run
python setup.py --help
For information on how to use this extension, build the documentation here or view it on the Web.
The Python unit tests are contained in the tests/
directory (which is a
Python package). To run the test suite, run the command
python setup.py test
Flask-Restless requires the following program and supporting library to build the documentation:
Using pip
is probably the easiest way to install these:
pip install sphinx "sphinxcontrib-httpdomain-withpatch==1.1.6-patch2"
The documentation is written for Sphinx in reStructuredText files in the
docs/
directory. Documentation for each class and function is provided in the
docstring in the code.
The documentation uses the Flask Sphinx theme. It is included as a git
submodule of this project, rooted at docs/_themes
. To get the themes, do
git submodule update --init
Now to build the documentation, run the command
python setup.py build_sphinx
in the top-level directory. The output can be viewed in a web browser by
opening docs/_build/html/index.html
.
See the AUTHORS
file for a list of people who have contributed to this code.
The artwork/flask-restless-small.svg
and
docs/_static/flask-restless-small.png
are licensed under the
Creative Commons Attribute-ShareAlike 3.0 license. The original image is a
scan of a (now public domain) illustration by Arthur Hopkins in a serial
edition of "The Return of the Native" by Thomas Hardy published in October
1878.
The artwork/flask-restless.svg
and docs/_static/flask-restless.png
are
licensed under the Flask Artwork License.
Jeffrey Finkelstein jeffrey.finkelstein@gmail.com