Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Create a Static QR code using Python SDK
from openscreen import Openscreen
import os
#Obtain your access key and secret from Openscreen Dashboard
ospro = Openscreen(access_key=os.environ.get('OS_ACCESS_KEY'), access_secret=os.environ.get('OS_ACCESS_SECRET'))
#Create a new project on Openscreen Dashboard. Paste the projectId below
projectId = os.environ.get('PROJECT_ID')
#Create an Asset with a QR code
my_asset_response = ospro.project(projectId).assets().create({
'name': '123 Main Steet Sign',
'description': 'Sign for 123 Main Street, Toronto',
'customAttributes': {
'type': 'Sale',
'MLS#': '123ABC'
'qrCodes': [{
'intent': '',
'intentType': 'STATIC_REDIRECT',
'status': 'ACTIVE'
#Fetch the QR Code Image in png format
qr_code_png = ospro.qrCode(my_asset_response.asset.qrCodes[0].qrCodeId).get({'format':'png'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment