Lungri,
You would first need to have your ALM client registered on the client machine. You can do this from the Tools page in ALM.
The next step would be to ensure that you have the Python for Windows extensions installed in your Python enviornment:
pip install pypiwin32
Finally, you can access the API by importing the Win32 com module and using the client.Dispatch method to access the connection:
import win32com.client
qcServer = ''http://sample:8080/qcbin''
qcDomain = ''DEFAULT''
qcProject = ''ALM_DEMO''
qcUser = ''alex_alm''
qcPassword = ''''
tdc = win32com.client.Dispatch(''TDApiOle80.TDConnection'')
tdc.InitConnection(qcServer)
tdc.Login (qcUser, qcPassword)
tdc.Connect (qcDomain, qcProject)
print (tdc.Connected)
tdc.Disconnect
tdc.Logout
tdc.ReleaseConnection
del tdc