Write records to Salesforce

Below, I provide a simple programme. The programme is written in Python. With Python, a library “salesforce_api” is used. With this library, one is able to insert records, query records and delete records in Salesforce.

from salesforce_api import Salesforce
client = Salesforce(username='datamigrationuser@pension4you.nl.pensiond2', password='***', security_token='***',is_sandbox=True)
hx = client.sobjects.Contact.insert({'LastName': 'Example', 'Email': 'test@example.com'})
hx = client.sobjects.query("SELECT Id FROM Contact WHERE LastName='Example'")
hx = client.sobjects.Contact.delete(hx[0]['Id'])