Could somebody tell me how to close/open a database connection through python instructions?

Thanks in advance...