Package: badgr-lite
badgr-liteAutomate awarding Open Badges to recipients without the overhead of a serverQuick StartManage your badges (withBadgr), but automate the award and retrieval of
badges withbadger-lite.Create an account on eitherBadgror an equivalent server.Use yourBadgr(or equivalent) username and password
to generate OAuth tokens for use with your project:curl-XPOST'https://api.badgr.io/o/token'-d"username=YOUREMAIL&password=YOURPASSWORD">token.jsonInstall thebadgr-litepackage:pipinstallbadgr-liteOr (using the newly recommended way from Python.org:pipenvinstallbadgr-liteNow you can award badges through either the Command Line (CLI) or Library (SDK).Command Line ExampleSample Command Help:$badgr--helpUsage:badgr[OPTIONS]COMMAND[ARGS]...AutomateBadgrtaskswithouttheoverheadofbadgr-serverOptions:--token-filePATHFileholdingtokencredentials--helpShowthismessageandexit.Commands:award-badgeAwardbadgewithBADGE_IDtoRECIPIENT.list-badgesPullandprintalistofbadgesfromserver--token-filecan be omitted iftoken.jsonfilename is in current directory.$badgr--token-filetoken.jsonlist-badgesdTjxL52HQBiSgIp5JuVq5whttps://badgr.io/public/assertions/dTjxL52HQBiSgIp5JuVq5wBayAreaPythonInterestGroupTDDParticipant6YhFytMUQb2loOMEy63gQAhttps://badgr.io/public/assertions/6YhFytMUQb2loOMEy63gQABayAreaPythonInterestGroupTDDQuizmasterzzExTDvOTnOx_R3YhwPf3Ahttps://badgr.io/public/assertions/zzExTDvOTnOx_R3YhwPf3ATestDrivenDevelopmentFundamentalsChampionzNjcY70FSn603SO9vMGhBAhttps://badgr.io/public/assertions/zNjcY70FSn603SO9vMGhBAInstallPythonwithVirtualEnvironmentsZN0CIo4NR7-GgrliDJzoTwhttps://badgr.io/public/assertions/ZN0CIo4NR7-GgrliDJzoTwFivvrbadge$badgr--token-filetoken.jsonaward-badge--badge-id2TfNNqMLT8CoAhfGKqSv6Q--recipientrecipient@example.comIfK18iLWSNWhvnQxLPHSxAhttps://badgr.io/public/assertions/IfK18iLWSNWhvnQxLPHSxA<Noname>Library ExamplesOne could patch together curl commands to interact with the Badgr server
(although badgr-lite does make it much faster to get started).  However, the
real benefit of Badgr-Lite is directly using its library in whatever tool that
you are using to automate award assignments (e.g., Django server, Flask server,
etc.).>>>frombadgr_lite.modelsimportBadgrLite>>>badge_id='2TfNNqMLT8CoAhfGKqSv6Q'>>>badge_data={..."recipient":{..."identity":"recipient@example.com",...},...}>>>badgr=BadgrLite(token_filename='./token.json')>>>badge=badgr.award_badge(badge_id,badge_data)>>>print(badge)q8nKaXMHTICZj7qhKEwutghttps://badgr.io/public/assertions/q8nKaXMHTICZj7qhKEwutg<Noname>WarningDonotcheck thetoken.jsonfile into your code repository. This is a secret file and should
be handled like any other file that stores passwords or secrets.PurposeOpen Badgesare images with credential data baked
into them. They are liked a digitally signed certificate that is also an image
that can be displayed on the web. They can be validated for authenticity and
are a nice award to grant to people for jobs well done, passing quizzes and
much more.Mozilla recently partnered withConcentric Sky. They builtBadgrwhich makes badge
management so much easier (and less buggy).At the time this project was created, however, there was no easy way to
automate the award of badges (e.g., on your own website) without having to
build a full and complicatedbadgr-serverof your own.Thisbadgr-liteproject solves that problem.TutorialIf you are new to Open Badges and want to see how to use them (and automate
them with this project), go tothis tutorial.Free software: MIT licenseDocumentation:https://badgr-lite.readthedocs.io.History1.0.2 (2019-11-22)Add Python 3.8 Trove Classifier /Pull request #671.0.1 (2019-11-22)Bump Python support to 3.8 /Pull request #65Refactor models.py for clarity /Pull request #64Update pluggy to 0.13.1 /Pull request #62Update twine to 3.0.0 /Pull request #60Update tox to 3.14.1 /Pull request #59Update urllib3 to 1.25.7 /Pull request #58Update tqdm to 4.38.0 /Pull request #57Update astroid to 2.3.3 /Pull request #56Update six to 1.13.0 /Pull request #55Update pyparsing to 2.4.3 /Pull request #53Remove Python 3.5 caveat in README /Pull request #52Update vcrpy to 2.1.1 /Pull request #51Update tqdm to 4.37.0 /Pull request #50Update typing-extensions to 3.7.4.1 /Pull request #48Update sphinx to 2.2.1 /Pull request #46Update virtualenv to 16.7.7 /Pull request #45Update mypy-extensions to 0.4.3 /Pull request #42Update mypy 0.740 /Pull request #40Update virtualenv to 16.7.6 /Pull request #39Reorder README shields /Pull request #36Add code coverage /Pull request #35Promote package to production level quality /Pull request #33Update shield so travis looks at develop branch /Pull request #31Update dependencies /Pull request #30Update mypy-extensions to 0.4.2 /Pull request #291.0.0 (2019-10-03)Remove Travis support for Python 3.5 /Pull request #27Update snowballstemmer to 2.0.0 /Pull request #24[Fixes: #25] Remove support for Python 3.5 /Pull request #26Update astroid to 2.3.1 /Pull request #22[Fixes #20] Upgrade tox to 3.14.0 /Pull request #21[Fixes #18] Fix README shields /Pull request #190.0.1 (2019-09-26)First release on PyPI.