I have created one library file where I have created one function suppose :
def myfunc(param1):
----
--- do something
----
Now If I require requests object (to get details of user or something like that), How can I get requests object without passing parameter in my function.
Note : As of now I am adding requests in my parameters (shown as below) but is there any other method as If I am calling this function to any other function I might not have requests object.
def myfunc(requests,param1):
----
--- do something
----