Skip to main content

The Open Badges Client

Project description

OBC, the Open Badges Client

obc is a python library that provides a standard API to interact with Open Badge platforms.

Quick start guide

Install OBC

obc is distributed as a python package. It can be installed using pip (or any other package manager) from PyPI:

$ pip install obc

Use providers in your application

Let say you want to issue an existing Open Badge Factory badge for a list of recipients, an example implementation would look like:

from obc.providers.obf import BadgeIssue, BadgeQuery, OBF

# Configure Open Badge Factory provider using your client identifier and secret
# key
obf = OBF(client_id="my_obf_client_id", client_secret="super_secret")

# Get the badge with the "badge_id" identifier
badge = next(obf.read(query=BadgeQuery(id="badge_id")))

# We want to issue a badge for the following recipients
issue = BadgeIssue(
    recipient=[
      "jane@example.org",
      "tarzan@example.org"
    ]
)

event_url, event_id = obf.issue(badge, issue)

More details will follow in the upcoming documentation.

Hack on the project

If you want to start contributing on the project, use the bootstrap Makefile target to build the Docker development image:

$ make bootstrap

To run tests, type:

$ make test

And to lint sources, there is also a command for that:

$ make lint

If you had new dependencies to the project, you will have to rebuild the Docker image (and the development environment):

$ make build && make dev

You can explore all other target using:

$ make help

Contributing

This project is intended to be community-driven, so please, do not hesitate to get in touch if you have any question related to our implementation or design decisions.

We try to raise our code quality standards and expect contributors to follow the recommandations from our handbook.

License

This work is released under the MIT License (see LICENSE).

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

obc-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

obc-0.1.0-py2.py3-none-any.whl (8.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file obc-0.1.0.tar.gz.

File metadata

  • Download URL: obc-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for obc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a0c0651b64343e3d725b3eca6505bedffaaf28a81a22f3a8e8548f8e96a70a20
MD5 afc9c877838834f938ec96b744c62cec
BLAKE2b-256 5cc3394a9c7aa5cead32f93ee9e7996a4c1f357f10eba9ae55b0d8baa0ce4849

See more details on using hashes here.

File details

Details for the file obc-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: obc-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for obc-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8636c64bf63554ce2049a4ab952fd96e34658ff46e0ebeb8ca170bed68ca9fcc
MD5 32a7f3447061744469428dd6bf64bedd
BLAKE2b-256 928ab7275ba81446a57f48e4101b5e0d2b8a9597d4b29870c9069a886e13e69d

See more details on using hashes here.

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