Skip to main content

A python library for Badgr APIs

Project description

Quickstart

badgrclient is a python library for Badgr APIs

Installation

pip install badgrclient

Docs

https://badgrclient.readthedocs.io/

Usage

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('jane@gmail.com')
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')

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

badgrclient-0.1.2.tar.gz (22.0 kB view hashes)

Uploaded Source

Built Distribution

badgrclient-0.1.2-py3-none-any.whl (22.1 kB view hashes)

Uploaded Python 3

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