Flask-Gasket is an extension to Flask that allows for the simple configuration of REST API using a NoSQL database. Since routing, validation, functions, and return data all revolve around the data stored in the REST API, much of this information can be consolidated in Gasket's main configuration file.
- Centralized configuration of routing and model information
- Support for common uses including passwords
- Easily configured to provide filtered and sorted lists of data
- Currently supports Riak as backend with planned support for Redis, MongoDB, and Cassandra
This example creates an basic API for user signup, login, authentication, and post creation and retrieval.
-
Install Riak.
-
Make sure secondary indexes are enabled by setting LevelDB in app.config.
-
Run:
riak start
in terminal to start riak. -
Run:
cd example & ln -s ../flask_gasket .
. -
Run:
python start.py
which runs the Flask server on port 5600. -
In a separate terminal run:
python test.py
to test the server.
Check Docs for more information on extension.