Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snehalbaghel/badgrclient
A python library for Badgr APIs
https://github.com/snehalbaghel/badgrclient
Last synced: about 2 months ago
JSON representation
A python library for Badgr APIs
- Host: GitHub
- URL: https://github.com/snehalbaghel/badgrclient
- Owner: snehalbaghel
- License: gpl-3.0
- Created: 2020-06-25T11:29:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-24T05:57:40.000Z (over 3 years ago)
- Last Synced: 2024-04-29T04:04:39.268Z (8 months ago)
- Language: Python
- Homepage: https://badgrclient.readthedocs.io
- Size: 116 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# Quickstart
**badgrclient** is a python library for [Badgr](https://github.com/concentricsky/badgr-server) APIs
#### Installation
```bash
pip install badgrclient
```### Docs
https://badgrclient.readthedocs.io/
#### Usage
Instantiate a client
```python
from badgrclient import BadgrClientclient = BadgrClient('username', 'password', 'client_id')
```Fetch your entities with the client or by giving an entityId.
```python
>>> my_issuers = client.fetch_issuer()
[Issuer(7fde21f03a30dfg), Issuer(de21ce2d52df0)]>>> baby_badger = client.fetch_badgeclass('')[0]
BadgeClass()
```Use member functions to perform actions on the entity
```python
>>> baby_badger.issue('[email protected]')
Assertion()
```Or directly import a model and get going
```python
>>> from badgrclient import Assertion
>>> janes_assertion = Assertion(client, eid='')
Assertion()>>> janes_assertion.revoke('Revocation Reason')
```