Management python code