How to create custom directives in Sphinx
I'm currently documenting a rest API written in Python. All the project's documentation is created using Sphinx, and for the REST API I would like to create some special directives. For instance, let's say I have this resource defined: @resource("/user/<email>", method="GET") def user_details (email): """ Returns detailed information about a user account. :resource GET: /user/<email> :query_param a_param: Some kind of query param. """ # Do stuff and return user details That's basically how the documentation currently looks. I would like to be able to create a directive for Sphinx that formats