Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thinkingserious/98f6c2fb54286adaf3fa to your computer and use it in GitHub Desktop.
Save thinkingserious/98f6c2fb54286adaf3fa to your computer and use it in GitHub Desktop.
SendGrid Python v3 ASM Global Suppressions DELETE Example
import sendgrid
import json
import os
if os.path.exists('.env'):
for line in open('.env'):
var = line.strip().split('=')
if len(var) == 2:
os.environ[var[0]] = var[1]
client = sendgrid.SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
status, msg = client.asm_global_suppressions.delete('elmer.thomas+test_global0@gmail.com')
print status
print msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment