Skip to main content

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.

Source Distribution

openbadges_bakery-1.0.0b1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openbadges_bakery-1.0.0b1-py2-none-any.whl (11.6 kB view details)

Uploaded Python 2

File details

Details for the file openbadges_bakery-1.0.0b1.tar.gz.

File metadata

File hashes

Hashes for openbadges_bakery-1.0.0b1.tar.gz
Algorithm Hash digest
SHA256 e35550a4e3dd0e82c65d9c07a235af88c055acb196458b090a9beaa6de8e9966
MD5 97cd8393d8f97ab99f5152cc83b12ab5
BLAKE2b-256 958662b6b157fff1e6e8064392a710206cc0b81b8292f7f26cda3dd48d07d7f7

See more details on using hashes here.

File details

Details for the file openbadges_bakery-1.0.0b1-py2-none-any.whl.

File metadata

File hashes

Hashes for openbadges_bakery-1.0.0b1-py2-none-any.whl
Algorithm Hash digest
SHA256 ad4d4100ec708ae16bef2285fe481a298570156a40a33494b6bb3e4df48cd78a
MD5 c1897c9e12ad367a2889457a9da7ebf5
BLAKE2b-256 2dd51ca2112c8c419b65e57db9abe7e0c5a2cb711368094248201d3e40bc1d59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page