Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A python utility for baking and extracting Open Badges metadata from images.

Project description

This package contains the utilities needed to “bake” Open Badges metadata into PNG or SVG image files or extract (‘unbake’) metada from such images.

This Open Badges Bakery is produced by Concentric Sky. https://concentricsky.com

Installation

pip:

pip install openbadges_bakery

Command Line Interface

There is a command line interface for baking and unbaking assertion data.

To bake a badge, identify the existing BadgeClass image with the input_filename and desired baked Assertion image filename to be created as well as the data to be baked into the image.

bakery bake [input_filename] [output_filename] --data='{"data": "data"}'

To extract Open Badges data from an image, use the unbake command.

bakery unbake [input_filename]

Output_filename is optional if you want the baked data to be written to a file.

bakery unbake [input_filename] [output_filename]

Python Interface

The bake and unbake functions are available when installed as a python module

To bake a badge, pass in an open file as input_file and the string of the badge data you wish to bake into the image. Result is an open TemporaryFile that contains the data.

from openbadges_bakery import bake
output_file = bake(input_file, assertion_json_string)

To unbake a badge, pass in an open file as input_file:

from openbadges_bakery import unbake
output_file = unbake(input_file)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for openbadges_bakery, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size openbadges_bakery-1.0.1-py2.py3-none-any.whl (10.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size openbadges_bakery-1.0.1.tar.gz (11.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page