rest/middleware/database.py
def process_resource(self, req, resp, resource, params):
        """Process the request after routing.

        Note:
            This method is only called when the request matches
            a route to a resource.

        Args:
            req: Request object that will be passed to the
                routed responder.
            resp: Response object that will be passed to the
                responder.
            resource: Resource object to which the request was
                routed.
            params: A dict-like object representing any additional
                params derived from the route's URI template fields,
                that will be passed to the resource's responder
                method as keyword arguments.
        """
        if(db.is_closed):
            db.get_conn()
Process the request after routing.

        Note:
            This method is only called when the request matches
            a route to a resource.

        Args:
            req: Request object that will be passed to the
                routed responder.
            resp: Response object that will be passed to the
                responder.
            resource: Resource object to which the request was
                routed.
            params: A dict-like object representing any additional
                params derived from the route's URI template fields,
                that will be passed to the resource's responder
                method as keyword arguments.
        
Process the request after routing.
Note:
This method is only called when the request matches
a route to a resource.
Process the request after routing . Note : This method is only called when the request matches a route to a resource .
def process_resource(self, req, resp, resource, params):
        if(db.is_closed):
            db.get_conn()
def process_resource ( self , req , resp , resource , params ) : if ( db . is_closed ) : db . get_conn ( )
Process the request after routing.
Process the request after routing .
"""Process the request after routing.

        Note:
            This method is only called when the request matches
            a route to a resource.

        Args:
            req: Request object that will be passed to the
                routed responder.
            resp: Response object that will be passed to the
                responder.
            resource: Resource object to which the request was
                routed.
            params: A dict-like object representing any additional
                params derived from the route's URI template fields,
                that will be passed to the resource's responder
                method as keyword arguments.
        """
self
req
Request object that will be passed to the
routed responder.
Request object that will be passed to the routed responder .
resp
Response object that will be passed to the
responder.
Response object that will be passed to the responder .
resource
Resource object to which the request was
routed.
Resource object to which the request was routed .
params
A dict-like object representing any additional
params derived from the route's URI template fields,
that will be passed to the resource's responder
method as keyword arguments.
A dict - like object representing any additional params derived from the route ' s URI template fields that will be passed to the resource ' s responder method as keyword arguments .