python-simple-rest-client icon indicating copy to clipboard operation
python-simple-rest-client copied to clipboard

Feature request: Support docstring

Open 2xyo opened this issue 5 years ago • 0 comments

It would be great to be able to add comments for methods and class and have the ability to get the documentation from __doc__ method attribut. Something like this:


class UserResource(Resource):
    """
    My doc... 
    """
    actions = {
        "search": {"method": "GET", "url": "users/search","doc":"Search users"},
        "retrieve": {"method": "GET", "url": "users/{}", "doc": "Search a user X. X should be a username"},
    }

instagram_api.add_resource(resource_name="users", resource_class=UserResource)

help(instagram_api.users)
help(instagram_api.users.search)
help(instagram_api.users.retrieve)

2xyo avatar Mar 17 '20 14:03 2xyo