Here is a Python sample that allows you to delete rows from a service:
ArcREST/delete_rows_from_service.py at master · Esri/ArcREST · GitHub
Stephen Lead also provided the follow example on Github as well:
import urllib, urllib2, json
serviceEndPoint = "http://<server>/ArcGIS/rest/services/<name>/FeatureServer/<ID>/"
params = urllib.urlencode({'where': <whereclause>, 'f': 'json', 'returnIdsOnly': 'true'})
response = urllib2.urlopen(serviceEndPoint + "query?", params).read()
data = json.loads(response)
IDs = data["objectIds"]
range = ','.join([str(x) for x in IDs])
delParams = urllib.urlencode({'objectIds': range, 'f': 'json'})
urllib2.urlopen(serviceEndPoint + "deleteFeatures?", delParams)