badgrclient is a python library for Badgr APIs
pip install badgrclient
https://badgrclient.readthedocs.io/
Instantiate a client
from badgrclient import BadgrClient
client = BadgrClient('username', 'password', 'client_id')
Fetch your entities with the client or by giving an entityId.
>>> my_issuers = client.fetch_issuer()
[Issuer(7fde21f03a30dfg), Issuer(de21ce2d52df0)]
>>> baby_badger = client.fetch_badgeclass('<baby_badgr_entity_id>')[0]
BadgeClass(<baby_badgr_entity_id>)
Use member functions to perform actions on the entity
>>> baby_badger.issue('[email protected]')
Assertion(<entity_id>)
Or directly import a model and get going
>>> from badgrclient import Assertion
>>> janes_assertion = Assertion(client, eid='<entity_id>')
Assertion(<entity_id>)
>>> janes_assertion.revoke('Revocation Reason')