Session logout through python API(Shotgrid API)

Session logout is available in site preferences, but the options are 1 week, 24 hours, and 1 hour.
But I want to logout the session from the Python API every 6 hours.
Please advise on this as soon as possible.

I believe the session logout setting pertains to the User login on the site, not api logins.
What is it you particulalrly want your api session to logout for?