Openscreen's SDK for QR Engage and Tracking
Project description
Openscreen Python SDK
Openscreen is a developer-first platform that enables innovative customer engagement and commerce solutions using QR Codes. Additional information on using the Openscreen python SDK can be found in the developer documentation.
Requirements
- python 3.10.0 or above
You will need your Openscreen account key and secret to get started. If you do not have an Openscreen account, you can sign-up for free here.
Installation
pip3 install openscreen
Getting Started
Openscreen authenticates your API requests using your account's API key and API secret key. You will also need the ID of the project you wish to work with. Your API key, secret key and project ID can all be found in your by logging into your Openscreen dashboard. The following examples demonstrates how to use these values in the SDK to generate your first QR code.
from openscreen import Openscreen, save_qr_image_data_to_file
#Obtain your access_key and secret by logging into your Openscreen dashboard
os = Openscreen(access_key='YOUR_ACCESS_KEY', access_secret='YOUR_SECRET_KEY')
#You must create a project and obtain project_id from your Openscreen dashboard
my_asset = os.project('YOUR_PROJECT_ID').assets().create({
'name': 'My First QR Code',
'description': 'Dynamic QR Code',
'qr_codes': [
{
'intent': 'https://www.openscreen.com',
'intent_type': 'DYNAMIC_REDIRECT',
'dynamic_redirect_type': 'NO_SCAN_ID',
'locator_key_type': 'SHORT_URL',
'status': 'ACTIVE'
}
]
})
qr_code = my_asset.asset.qr_codes[0]
save_qr_image_data_to_file(qr_code.image_data, 'qr_code.png')
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for openscreen-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2763ae90fbe7dac5a5d7222b7005fd0f91e85b934ceb3ca814a3283295748f9 |
|
MD5 | 81c1320d501a470ad1a1adbf227f0627 |
|
BLAKE2b-256 | 9c1d515cc951a3556422948f34c8f56b78c66514946e0ac7ebabd5e58a8d65fe |