I am creating python script to configure router settings remotely but recently  stumbled on problem how to logout or close session after job is done?
From searching I found that Basic-Authentication doesn´t have option to logout. How to solve it in python script?
with python requests you can open your session, do your job, then logout with:
r = requests.get('logouturl', params={...})
the logout action is just an http Get method.
Basic-Auth session using python script