python db-api accessing database from python the standard for accessing database in python is the python db-api this specifies set of standard interfaces for modules that wish to allow python to access specific database the standard is described in pep (dev/peps/pep- )-- pep is python enhancement proposal almost all python database access modules adhere to this standard this means that if you are moving from one database to anotheror attempting to port python program from one database to anotherthen the apis you encounter should be very similar (although the sql processed by different database can also differthere are modules available for most common databases such as mysqloraclemicrosoft sql server etc the db-api there are several key elements to the db_api these arethe connect function the connect(function that is used to connect to database and returns connection object connection objects within the db-api access to database is achieved through connection objects these connection objects provide access to cursor objects cursor objects are used to execute sql statements on the database the result of an execution these are the results that can be fetched as sequence of sequences (such tuple of tuplesthe standard can thus be used to selectinsert or update information in the database (cspringer nature switzerland ag huntadvanced guide to python programmingundergraduate topics in computer science