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-2.0.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

openbadges_bakery-2.0.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file openbadges_bakery-2.0.0.tar.gz.

File metadata

  • Download URL: openbadges_bakery-2.0.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.7

File hashes

Hashes for openbadges_bakery-2.0.0.tar.gz
Algorithm Hash digest
SHA256 57c81d28659a23046025abea4977bb95912fb15c8c55f04dcd11cf1807b16df7
MD5 64d9bda69359d36c82cffb68d093350a
BLAKE2b-256 205170b0023b8bc0e145ac7d29b8c5fa6e67b71bf865e82bb3fe455fad5f7847

See more details on using hashes here.

File details

Details for the file openbadges_bakery-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: openbadges_bakery-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.7

File hashes

Hashes for openbadges_bakery-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 733afe24c00887a7c0b8ea56cd0b40ccba2cf9f26a1707f1f32f1575e6408c54
MD5 cf676ab9b42ef5ba1088048a590267d9
BLAKE2b-256 53b13667343e05ed226abf47c72039b7ec41598090292ea6eafcc7acfc3bbfb1

See more details on using hashes here.

Supported by

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