Module Expr Str ImportFrom alias ImportFrom alias alias ImportFrom alias alias Assign NameStore Call NameLoad NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Raise NameLoad decorator_list FunctionDef arguments args NameParam defaults body Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Pass decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list Call NameLoad ListLoad Str Str Str FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list ClassDef bases NameLoad body Pass decorator_list Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults NameLoad body Pass decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Pass decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body Pass decorator_list AttributeLoad NameLoad attr FunctionDef arguments args defaults body Pass decorator_list AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad keyword ListLoad Str Str Str ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body ImportFrom alias Return AttributeLoad NameLoad attr decorator_list decorator_list ImportFrom alias alias alias ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad Expr Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword ListLoad Str Str Str Expr Str
N/A N/A 
cat /dev/brain
==============

Just a series of thoughts about how the Flask-Restless' API could be modified
to allow for the creation of non db-backed resources. None of this has been
through any serious thought about fesibility, they are just random ideas.
 flask Flask flask.ext.restless APIManager Resource flapi.models session Audio N/A app N/A Flask __name__ SongResource N/A Resource N/A N/A 
    This approach is based on
    https://code.google.com/p/django-rest-interface/wiki/RestifyDjango
    and
    http://django-tastypie.readthedocs.org/en/latest/resources.html
     create N/A N/A self N/A N/A N/A N/A read N/A N/A self id ids_only nesting_levels N/A None False 1 N/A N/A 
        The ids_only parameter would force the method to return only the IDs of
        the matching element. Useful for nesting.

        Not sure about the nesting_levels.
         N/A N/A update N/A N/A self N/A args kwargs N/A N/A N/A delete N/A N/A self id N/A N/A N/A N/A patch N/A N/A self N/A N/A N/A N/A head N/A N/A self N/A N/A N/A N/A options N/A N/A self N/A N/A N/A N/A connect N/A N/A self N/A N/A N/A NotImplementedError N/A trace N/A N/A self N/A N/A N/A NotImplementedError N/A validator N/A N/A self data N/A N/A N/A 
        Validates the data sent by the client. Run always before every method.
        Maybe could be turn into a decorator (like before_request)
         N/A N/A authorize N/A N/A self N/A N/A N/A N/A get_format N/A N/A self N/A N/A N/A 
        /api/songs.json
        /api/songs?format=json
        Accept: application/json
         N/A NotImplementedError N/A N/A SongResource N/A Resource N/A N/A 
    A less django-ish approach.
     N/A __basemodel__ Audio N/A __resource__ /songs/ get_all_or_one N/A N/A self id N/A None N/A N/A N/A N/A method GET write N/A N/A self data N/A N/A N/A N/A N/A method N/A POST PUT PATCH authorize N/A N/A self N/A N/A N/A N/A get_format N/A N/A self N/A N/A N/A N/A N/A SongResource N/A Resource N/A N/A N/A N/A N/A app route /songs/ N/A N/A N/A app add_url_rule /songs/ songs SongResource N/A N/A N/A app add_url_rule /songs/<int:song_id> song SongResource N/A N/A N/A SongResource create_rules app N/A api N/A APIManager app session session N/A N/A N/A api resources N/A SongResource ArtistResouce SomeOtherResource N/A N/A N/A api create_rules app N/A api N/A APIManager app session session songs N/A N/A song_id N/A None N/A N/A N/A N/A N/A api resource /songs save_song N/A N/A data N/A N/A N/A N/A N/A N/A songs method PUT check_permissions N/A N/A N/A N/A N/A N/A N/A songs authorize get_format N/A N/A N/A N/A N/A N/A N/A songs get_format N/A N/A N/A api resource Audio methods N/A GET POST DELETE RootResource N/A object N/A N/A N/A __name__ N/A __parent__ None N/A SongResource N/A object N/A N/A __resource_url__ N/A N/A self N/A N/A flask request N/A N/A request base_url N/A N/A flask.ext.restless inside lineage find_root Thing N/A object N/A N/A N/A N/A a N/A Thing N/A b N/A Thing N/A N/A b __parent__ a N/A N/A inside b a N/A N/A inside a b N/A N/A list N/A lineage b N/A N/A find_root b N/A manager N/A APIManager app session session N/A N/A N/A manager create_api Audio methods N/A GET POST DELETE N/A 
Unsolved issues
---------------

* Define nested resources.
    * Serializers?
* Permissions for nested resources.
* Depth of nested resources.
* Definition of formats to retrieve.
* Multiple API versions.

Ideas:
* https://github.com/tryolabs/django-tastypie-extendedmodelresource#readme
* http://django-rest-framework.org/tutorial/1-serialization.html
* http://django-rest-framework.org/api-guide/serializers.html
* https://github.com/ametaireau/flask-rest/

