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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file badgrclient-0.1.2.tar.gz
.
File metadata
- Download URL: badgrclient-0.1.2.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7df3f047743d494b79f61579d8177736bdaf29f675453c961c720672135d8ca |
|
MD5 | 1838f8626a785c40374c47b7d68e2240 |
|
BLAKE2b-256 | ff6088b7dcaab98ce8a556a5af973b5d040c05ac556b6f3cf76fb39c3f062eb3 |
File details
Details for the file badgrclient-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: badgrclient-0.1.2-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af874b31c270a0822b6c326f7f064557e697039233a6399eebf14596701c72e9 |
|
MD5 | 17f6cdd7eae166fa8ec6dcce7a679696 |
|
BLAKE2b-256 | d83c47d4ba9cf826f5c81c77bb72398938c65308e6037157204783e59deeb968 |