I'm wondering how I can document **kwargs in Python using sphinx dostring style.

For example I have the following method and I want to document more details about kwargs.

  def get(self, url=None, **kwargs):
    InsReq get (overriding)
    :param url: url
    :type url: str
    :param kwargs: How to document these most used parameters?
    :type kwargs: dict
    :return: response object
    :rtype: requests.models.Response

method usage:

>>> obj.get(url='http://google.com', delay=10, retries=5)

Have you any idea which is the "proper" way to document these extra parameters?


You can use inline literals like:


or inline blocks like


For more information look here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.