Created
July 1, 2022 21:38
-
-
Save lobot/ce7ba932e3748fa349c01e3364e3e519 to your computer and use it in GitHub Desktop.
qs-python-code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lob | |
lob.api_key = "<YOUR_TEST_KEY>" | |
postcard = lob.Postcard.create( | |
description = "First Postcard", | |
to_address = { | |
"name": "Harry Zhang", | |
"address_line1": "210 King Street", | |
"address_city": "San Francisco", | |
"address_state": "CA", | |
"address_zip": "94107" | |
}, | |
from_address = { | |
"name": "Leore Avidar", | |
"address_line1": "210 King Street", | |
"address_city": "San Francisco", | |
"address_state": "CA", | |
"address_zip": "94107", | |
"address_country": "US" | |
}, | |
front = "<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>", | |
back = "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>", | |
merge_variables = { | |
"name": "Harry" | |
} | |
) | |
print(postcard) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment