Welcome to Python client for Degreed API’s documentation!

Python client for Degreed API

https://img.shields.io/pypi/v/degreedClient.svg https://img.shields.io/travis/Rmaravanyika/degreedClient.svg Documentation Status

The Degreed python package to leverage and connect to the Degreed API from python 3.

Features

  • Users Module

  • Content Module ( article, books, videos and courses)

  • Provider Module

  • Pathways Module

  • Recommendations Module

  • Required Learning Module

  • Completions Module

  • Certifiable skills Module

  • Skill Plan Module

  • Skills Rating Module

  • Search terms Module

  • Views Module

  • Groups Module

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

This package was derived from tonybaloney Anthony Shaw’s open source project for the pathgather python client.

Installation

Stable release

To install Python client for Degreed API, run this command in your terminal:

$ pip install degreed-client

This is the preferred method to install Python client for Degreed API, as it will always install the most recent stable release. After installing ensure that version 19.1.0 or greater is install, if not please upgrade your version.

If you don’t have pip installed, this Python installation guide can guide you through the process.

From sources

The sources for Python client for Degreed API can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/Rmaravanyika/degreedClient

Or download the tarball:

$ curl  -OL https://github.com/Rmaravanyika/degreedClient/tarball/master

Once you have a copy of the source, you can install it with:

$ python setup.py install

Usage

To use Python client for Degreed API in a project:

from degreedClient import DegreedApiClient

The degreed api has got various modules which this client made available, however each module requires a specific scope for that module. The scope is something similar to this: users:read it may also look like this: users_read Degreed confirmed through their documentation that all methods will be supported, well at least for now but l recommend the first method of using a colon as a dimiliter.

To be able to use Degreed’s api you will need the client_id , client_secret and also the host .The client id and client secret are given by Degreed Technical Solutions Specialist. The host has got a development host as well as production host. The hostname uses the format degreed.com and for betatest(development) it is in the format betatest.degreed.com .You get all these from Degreed. The API uses OAuth 2.0 protocol’s Client Credentials Flow, you can get more information via Degreed official documentation.

101 usage

from degreedClient import DegreedApiClient
import yaml
from pprint import pprint

with open('.profile.yml', 'r') as profile_yml:
    config = yaml.load(profile_yml)

client = DegreedApiClient(config['host'], config['client_id'], config['client_secret'], config['scope'] )

Users Module

Getting started with user module

from degreedClient import DegreedApiClient
from pprint import pprint
client = DegreedApiClient(...)

pprint(client.users.all())

# You can also get a single user via ID as an object
# This means you can get all the user attributes
a_user = client.users.get('<ID>')
user_firstname = a_user.attributes.first_name

print(user_firstname)

Content Module

Content Management

from degreedClient import DegreedApiClient
from pprint import pprint
client = DegreedApiClient(...)

pprint(client.content.all())

API Reference

Client object

The DegreedClient is used to connect to the API and it offers

Main module.

class degreedClient.client.DegreedApiClient(host, client_id, client_secret, scope, proxy=None, skip_ssl_validation=False)[source]

Main API client.

article

Learning Articles

Return type

degreedClient.articles.ArticleClient

book

Learning Books

Return type

degreedClient.books.BookClient

certifiableskill

Certifiable Skills

Return type

degreedClient.certifiable_skills.CertifiableSkillClient

completion

Completions

Return type

degreedClient.completions.CompletionClient

content

Learning Content

Return type

degreedClient.content.ContentClient

course

Learning Courses

Return type

degreedClient.courses.CourseClient

delete(uri)[source]
get(uri, params=None, data=None)[source]
get_paged(uri, params=None, data=None)[source]
group

Groups

Return type

degreedClient.groups.GroupClient

learnings

Required Learnings

Return type

degreedClient.required_learnings.RequiredLearningsClient

login

Login

Return type

degreedClient.logins.LoginClient

patch(uri, data=None)[source]
pathway

Pathways

Return type

degreedClient.pathways.PathwayClient

post(uri, data=None)[source]
provider

Provider

Return type

degreedClient.providers.ProviderClient

put(uri, data=None)[source]
recommendation

Recommendations

Return type

degreedClient.recommendations.RecommendationClient

results_per_page = 100
searchterm

Search Terms

Return type

degreedClient.search_terms.SearchTermClient

skillplan

Skill Plans

Return type

degreedClient.skills_plan.SkillPlanClient

skillrating

Skill Ratings

Return type

degreedClient.skills_ratings.SkillRatingClient

theviews

Views of content

Return type

degreedClient.the_views.TheViewClient

userfollower

User Followers

Return type

degreedClient.user_followers.UserFollowersClient

users

Users

Return type

degreedClient.users.UserClient

userskill

User Skills

Return type

degreedClient.user_skills.UserSkillClient

video

Learning Videos

Return type

degreedClient.videos.VideoClient

Accessors

degreedClient.users module

class degreedClient.users.UserClient(client)[source]

Bases: object

Users API object

all(per_page=None, next_id=None)[source]

Gets all Users.

Parameters
  • per_page (int) – Amount of content to per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of content.

Returns

A list of users

Return type

list of degreedClient.models.user.User

create(employee_id, first_name, last_name, organization_email, password, permission_role, profile_visibility, full_name=None, bio=None, login_disabled=False, restricted=False, real_time_email_notification=False, daily_digest_email=False, weekly_email_digest=False)[source]

Create a user.

Parameters
  • employee_id (str) – The ID of the user to update

  • first_name (str) – The first name of the user

  • last_name (str) – The last name of the user

  • organisation_email (str) – The full name of the user

  • password – Password used to login, minimum 8 characters, they must include at least one number and a capital letter.

  • permission_role (str) – Either Admin, LearningProfessional, Manager or Member

  • profile_visibility (str) – Visibility of the profile, can be Everyone, Organization or Private

  • full_name (str) – The full name of the user

  • bio (str) – Short biografie of the user, max len. 2000 chars.

  • login_disabled (bool) – Ability for the user to login

  • restricted (bool) – Restricts the user to change certain fields

  • real_time_email_notification (bool) – Do they want to receive email notifications

  • daily_digest_email (bool) – Sign up for the daily digest email

  • weekly_email_digest (bool) – Sign up for the weekly digest email

Returns

An instance degreedClient.models.user.User

Return type

degreedClient.models.user.User

delete(id)[source]

Delete a user by ID.

Parameters

id (str) – The user ID

Returns

None

Return type

None

get(id)[source]

Fetch a specific user by ID.

Parameters

id (str) – The user id

Returns

An instance degreedClient.models.user.User

Return type

degreedClient.models.user.User

get_today_learnings(id)[source]

Retrieves all today’s learning for a specific user.

Parameters

id (str) – The user id

Returns

An instance degreedClient.models.user.User

Return type

degreedClient.models.user.User

get_user_certifiable_skills(id)[source]

Retrieves all certifiable skills for a specific user.

Parameters

id (str) – The user id

Returns

An instance degreedClient.models.user.User

Return type

degreedClient.models.user.User

get_user_skills(id)[source]

Retrieves all skills for a specific user.

scope: is user_skills:read

Parameters

id (str) – The user id

Returns

An instance degreedClient.models.user.User

Return type

degreedClient.models.user.User

update(id, employee_id=None, first_name=None, last_name=None, organization_email=None, password=None, permission_role=None, profile_visibility=None, full_name=None, bio=None, login_disabled=False, restricted=False, real_time_email_notification=False, daily_digest_email=False, weekly_email_digest=False)[source]

Update an existing user.

Parameters
  • id (str) – The users id

  • employee_id (str) – The ID of the user to update

  • first_name (str) – The first name of the user

  • last_name (str) – The last name of the user

  • organisation_email (str) – The full name of the user

  • password – Password used to login, minimum 8 characters, they must include at least one number and a capital letter.

  • permission_role (str) – Either Admin, LearningProfessional, Manager or Member

  • profile_visibility (str) – Visibility of the profile, can be Everyone, Organization or Private

  • full_name (str) – The full name of the user

  • bio (str) – Short biografie of the user, max len. 2000 chars.

  • login_disabled (bool) – Ability for the user to login

  • restricted (bool) – Restricts the user to change certain fields

  • real_time_email_notification (bool) – Do they want to receive email notifications

  • daily_digest_email (bool) – Sign up for the daily digest email

  • weekly_email_digest (bool) – Sign up for the weekly digest email

Returns

An instance degreedClient.models.user.User

Return type

degreedClient.models.user.User

degreedClient.user_followers module

class degreedClient.user_followers.UserFollowersClient(client)[source]

Bases: object

User Followers API.

all(start_date=None, end_date=None, per_page=None, next_id=None)[source]

Gets all user followers.

Parameters
  • start_date (str) – start date eg 2018-11-30 A maximum of 7 days apart between start_date and end_date

  • end_date (str) – end date eg 2018-11-30

  • per_page (int) – Get from page

  • next_id (str) – Supplied to retrieve the next batch of user follower.

Returns

A list of user followers

Return type

list of degreedClient.models.user_follower.UserFollower

degreedClient.user_skills module

class degreedClient.user_skills.UserSkillClient(client)[source]

Bases: object

User Skill API.

all(start_date=None, end_date=None, per_page=None, next_id=None)[source]

Gets all users skills for the current organisation.

Parameters
  • start_date (str) – start date eg 2018-11-30 A maximum of 7 days between start_date and end_date

  • end_date (str) – end date eg 2018-11-30

  • per_page (int) – Get from page

  • next_id (str) – Supplied to retrieve the next batch of user skills.

Returns

A list of user skills

Return type

list of degreedClient.models.user_skill.UserSkill

degreedClient.content module

class degreedClient.content.ContentClient(client)[source]

Bases: object

Content API.

all(start_date=None, end_date=None, per_page=None, next_id=None)[source]

Gets all content.

Parameters
  • per_page (int) – Amount of content to per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of content.

  • start_date (str) – Content created from this date on

  • end_date (str) – Content created till this date

Returns

A list of content

Return type

list of degreedClient.models.content.Content

degreedClient.articles module

class degreedClient.articles.ArticleClient(client)[source]

Bases: object

Article Content API.

all(per_page=None, next_id=None)[source]

Gets all articles.

Parameters
  • per_page (str) – Amount of articles per page

  • next_id – Supplied to retrieve the next batch of articles

Returns

A list of articles

Return type

list of degreedClient.models.content.Article

create(external_id, title, url, num_words, summary=None, image_url=None)[source]

Create an article.

Parameters
  • external_id (str) – The article’s external id, is required

  • title (str) – The article’s title, is required

  • url (str) – The article’s url, is required

  • num_words (int) – The article’s number of words, is required

  • summary (str) – The article’s summary,

  • image_url (str) – The article’s image url

Returns

An instance degreedClient.models.content.Article

Return type

degreedClient.models.content.Article

delete(id)[source]

Delete an article by ID.

Parameters

id (str) – The article ID

Returns

None

Return type

None

get(id)[source]

Fetch an article by ID.

Parameters

id (str) – The article id

Returns

An instance degreedClient.models.content.Article

Return type

degreedClient.models.content.Article

update(id, external_id=None, title=None, url=None, num_words=0, summary=None, image_url=None)[source]

Can update contents any of the values as the Create A New Article

Parameters
  • id (str) – id of the article, is required

  • external_id (str) – The article’s external id

  • title (str) – The article’s title

  • url (str) – The article’s url

  • num_words (int) – The article’s number of words

  • summary (str) – The article’s summary

  • image_url (str) – The article’s image url

Returns

An instance degreedClient.models.content.Article

Return type

degreedClient.models.content.Article

degreedClient.books module

class degreedClient.books.BookClient(client)[source]

Bases: object

Book Content API.

all(per_page=None, next_id=None)[source]

Gets all books.

Parameters
  • per_page (str) – Amount of books per page

  • next_id – Supplied to retrieve the next batch of articles

Returns

A list of books

Return type

list of degreedClient.models.content.Book

create(title, external_id, subtitle=None, author=None, pages=0, summary=None, obsolete=None, publish_date=None, language=None, i_s_b_n13=None)[source]

Create a Book.

Parameters
  • title (str) – The book title, is required

  • external_id (str) – The book’s external id, is required

  • subtitle (str) – The book’s subtitle

  • author (str) – The book’s author

  • pages (int) – Amount of pages

  • summary (str) – Short summary of the book

  • obsolete (bool) – If the book should be marked as obsolete

  • publish_date (str) – Date that the book has been published

  • language (str) – Language of the book

  • i_s_b_n13 (str) – Short summary of the book

Returns

An instance degreedClient.models.content.Book

Return type

degreedClient.models.content.Book

delete(id)[source]

Delete an book by ID.

Parameters

id (str) – The book ID

Returns

None

Return type

None

get(id)[source]

Fetch a book by ID.

Parameters

id (str) – The book id

Returns

An instance degreedClient.models.content.Book

Return type

degreedClient.models.content.Book

update(id, title=None, external_id=None, subtitle=None, author=None, pages=0, summary=None, obsolete=None, publish_date=None, language=None, i_s_b_n13=None)[source]

Update a Book.

Parameters
  • id (str) – The ID of the book to update

  • title (str) – The book title, is required

  • external_id (str) – The book’s external id, is required

  • subtitle (str) – The book’s subtitle

  • author (str) – The book’s author

  • pages (int) – Amount of pages

  • summary (str) – Short summary of the book

  • obsolete (bool) – If the book should be marked as obsolete

  • publish_date (str) – Date that the book has been published

  • language (str) – Language of the book

  • i_s_b_n13 (str) – Short summary of the book

Returns

An instance degreedClient.models.content.Book

Return type

degreedClient.models.content.Book

degreedClient.courses module

class degreedClient.courses.CourseClient(client)[source]

Bases: object

Course Content API.

all(per_page=None, next_id=None)[source]

Gets all Courses.

Parameters
  • per_page (str) – Amount of content to per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of content.

Returns

A list of content

Return type

list of degreedClient.models.content.Course

create(title, external_id, duration, duration_type, provider_code=None, cost_units=0, cost_unit_type=None, _format=None, difficulty=None, video_url=None, summary=None, url=None, obsolete=False, image_url=None, language=None)[source]

Create a Course.

Parameters
  • title (str) – The course title, is required

  • external_id (str) – The course’s external id, is required

  • duration (int) – Length of the course. Type is supplied with duration-type

  • duration_type (str) – Seconds, Minutes, Hours or Days

  • provider_code (str) – Unique provider code

  • cost_units (int) – Units for the amount of cost

  • cost_unit_type (str) – The cost unit type, can be any valuta

  • _format (str) – Format the course is takes

  • difficulty (str) – Describing the difficulty of taking the course

  • video_url (str) – If the course has a video, supply it here

  • summary (str) – Summary of the course

  • url (str) – URL location where more information can be found

  • obsolete (bool) – If the course should be marked as obsolete

  • image_url (str) – Cover image of the course

  • language (str) – Spoken language of the course

Returns

An instance degreedClient.models.content.Course

Return type

degreedClient.models.content.Course

delete(id)[source]

Delete a Course by ID.

Parameters

id (str) – The Course ID

Returns

None

Return type

None

get(id)[source]

Fetch course by ID.

Parameters

id (str) – The course id

Returns

An instance degreedClient.models.content.Course

Return type

degreedClient.models.content.Course

update(id, title=None, external_id=None, duration=0, duration_type=None, provider_code=None, cost_units=0, cost_unit_type=None, _format=None, difficulty=None, video_url=None, summary=None, url=None, obsolete=False, image_url=None, language=None)[source]

Update a Course.

Parameters
  • id (str) – The ID of the course to update

  • title (str) – The course title, is required

  • external_id (str) – The course’s external id, is required

  • duration (int) – Length of the course. Type is supplied with duration-type

  • duration_type (str) – Seconds, Minutes, Hours or Days

  • provider_code (str) – Unique provider code

  • cost_units (int) – Units for the amount of cost

  • cost_unit_type (str) – The cost unit type, can be any valuta

  • _format (str) – Format the course is takes

  • difficulty (str) – Describing the difficulty of taking the course

  • video_url (str) – If the course has a video, supply it here

  • summary (str) – Summary of the course

  • url (str) – URL location where more information can be found

  • obsolete (bool) – If the course should be marked as obsolete

  • image_url (str) – Cover image of the course

  • language (str) – Spoken language of the course

Returns

An instance degreedClient.models.content.Course

Return type

degreedClient.models.content.Course

degreedClient.videos module

class degreedClient.videos.VideoClient(client)[source]

Bases: object

Video Content API.

all(per_page=None, next_id=None)[source]

Gets all Videos.

Parameters
  • per_page (int) – Amount of content to per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of content.

Returns

A list of Videos

Return type

list of degreedClient.models.content.Video

create(external_id, title, duration, duration_type, summary=None, url=None, obsolete=None, image_url=None, language=None, publish_date=None)[source]

Create a Video Content.

Parameters
  • external_id (str) – The course’s external id, is required

  • title (str) – The course title, is required

  • duration (int) – Length of the course. Type is supplied with duration-type

  • duration_type (str) – Seconds, Minutes, Hours or Days

  • summary (str) – Summary of the video

  • url (str) – URL location where more information can be found

  • obsolete (bool) – If the course should be marked as obsolete

  • image_url (str) – Cover image of the video

  • language (str) – Spoken language of the video

  • publish_date (str) – The date the video is published

Returns

An instance degreedClient.models.content.Video

Return type

degreedClient.models.content.Video

delete(id)[source]

Delete a video by ID.

Parameters

id (str) – The video ID

Returns

None

Return type

None

get(id)[source]

Fetch a video by ID.

Parameters

id (str) – The video id

Returns

An instance degreedClient.models.content.Video

Return type

degreedClient.models.content.Video

update(id, external_id=None, title=None, duration=0, duration_type=None, summary=None, url=None, obsolete=None, image_url=None, language=None, publish_date=None)[source]

Update a Video Content.

Parameters
  • id (str) – The ID of the video to update

  • external_id (str) – The course’s external id, is required

  • title (str) – The course title, is required

  • duration (int) – Length of the course. Type is supplied with duration-type

  • duration_type (str) – Seconds, Minutes, Hours or Days

  • summary (str) – Summary of the video

  • url (str) – URL location where more information can be found

  • obsolete (bool) – If the course should be marked as obsolete

  • image_url (str) – Cover image of the video

  • language (str) – Spoken language of the video

  • publish_date (str) – The date the video is published

Returns

An instance degreedClient.models.content.Video

Return type

degreedClient.models.content.Video

degreedClient.completions module

class degreedClient.completions.CompletionClient(client)[source]

Bases: object

Completion API object

all(start_date, end_date, per_page=None, next_id=None)[source]

Gets all completions from start to end date.

Parameters
  • start_date (str) – Get completions from this date on. (YYYY-MON-DAY) a maximum of 7 days between start_date and end_date

  • end_date (str) – Get completions till this date. (YYYY-MON-DAY)

  • per_page (str) – The amount of completions per page. Max. of 1000.

  • next_id (str) – Supplied to retrieve the next batch of content.

Returns

A list of completions

Return type

list of degreedClient.models.completion.Completion

create(user_id, user_identifier_type, content_id, content_id_type, content_type, completed_at)[source]

Create a new completion.

Parameters
  • user_id (str) – Unique ID of the user who completed it required

  • user_identifier_type (str) – Can be either UserId, Email,EmployeeId, AliasUid or AliasEmail. is required

  • content_id (str) – Unique id identifying the content

  • content_id_type (str) – Can be either ExternalId, Id or ContentUrl

  • content_type (str) – Can be either Article, Book, Course, Event or Video is required

  • completed_at (str) – Date when the completion was created is required

Returns

An instance degreedClient.degreedClient.models.completion.Completion

Return type

degreeedClient.degreedClient.models.completion.Completion

delete(id)[source]

Delete an book by ID.

Parameters

id (str) – Completion ID to be delectes

Returns

None

Return type

None

get_user_completions(id)[source]

Retrieves all completions for a specific user.

Parameters

id (str) – The user id

Returns

An instance degreedClient.models.user.User

Return type

degreedClient.models.user.User

get_user_completions_by_email(email)[source]

Retrieves all completions by passing the email.

Parameters

email (str) – The user email

Returns

An instance degreedClient.models.user.User

Return type

degreedClient.models.user.User

update(id, user_id=None, user_identifier_type=None, content_id=None, content_id_type=None, content_type=None, completed_at=None)[source]

Create a new completion.

Parameters
  • user_id (str) – Unique ID of the user who completed it required

  • user_identifier_type (str) – Can be either UserId, Email,EmployeeId, AliasUid or AliasEmail. is required

  • content_id (str) – Unique id identifying the content

  • content_id_type (str) – Can be either ExternalId, Id or ContentUrl

  • content_type (str) – Can be either Article, Book, Course, Event or Video is required

  • completed_at (str) – Date when the completion was created is required

Returns

An instance degreedClient.degreedClient.models.completion.Completion

Return type

degreeedClient.degreedClient.models.completion.Completion

degreedClient.certifiable_skills module

class degreedClient.certifiable_skills.CertifiableSkillClient(client)[source]

Bases: object

Certifiable skills API.

all(per_page=None, next_id=None)[source]

Get all certifiable skills.

Parameters
  • per_page (int) – Amount of certifiable skills per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of user skills.

Returns

A list of required learnings

Return type

list of degreedClient.models.certifiable_skill.CertifiableSkill

get(id)[source]

Fetch a specific certifiable skill

Parameters

id (str) – id used to get a specific certifiable skill

Returns

An instance degreedClient.models.certifiable_skill.CertifiableSkill

Return type

degreedClient.models.certifiable_skill.CertifiableSkill

degreedClient.groups module

class degreedClient.groups.GroupClient(client)[source]

Bases: object

Groups API object

all(per_page=None, next_id=None)[source]

Get all groups for the current organization

Parameters
  • per_page (int) – Amount of groups to per page. Max of 1.000

  • next_id – Supplied to retrieve the next batch of groups.

  • next_idstr

Returns

A list of groups

Return type

list of degreedClient.models.group.Group

get(id)[source]

Fetch a specific group for the current organization

Parameters

id (str) – id used to get a specific group

Returns

An instance degreedClient.models.group.Group

Return type

degreedClient.models.group.Group

group_users_list(id)[source]

Fetch a list of users which are a member of this group.

Parameters

id (str) – id used to get a specific group

Returns

An instance degreedClient.models.group.Group

Return type

degreedClient.models.group.Group

degreedClient.pathways module

class degreedClient.pathways.PathwayClient(client)[source]

Bases: object

Pathway API.

all(start_date=None, end_date=None, per_page=None, next_id=None)[source]

Gets all pathways for the current organization.

Parameters
  • start_date (str) – Get pathways modified from this date on. A maximum of 7 days between start_date and end_date

  • end_date (str) – Get pathways modified till this date.

  • per_page (int) – Amount of pathways per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of pathways.

Returns

A list of pathways

Return type

list of degreedClient.models.pathway.Pathway

get(id)[source]

Fetch all data on a specific pathway.

Parameters

id (str) – The pathway id

Returns

An instance degreedClient.models.pathway.Pathway

Return type

degreedClient.models.pathway.Pathway

get_pathway_collaborators(id)[source]

Fetch all collaborators for the selected pathway

Parameters

id (str) – The pathway id

Returns

An instance degreedClient.models.pathway.Collaborator

Return type

degreedClient.models.pathway.Collaborator

get_pathway_followers(id)[source]

Fetch all followers for the selected pathway.

Parameters

id (str) – The pathway id

Returns

An instance degreedClient.models.pathway.Follower

Return type

degreedClient.models.pathway.Follower

get_pathway_groups(id)[source]

Fetch all groups for the selected pathway

Parameters

id (str) – The pathway id

Returns

An instance degreedClient.models.pathway.GrpPathway

Return type

degreedClient.models.pathway.GrpPathway

get_pathway_tags(id)[source]

Fetch all tags for the selected pathway

Parameters

id (str) – The pathway id

Returns

An instance degreedClient.models.pathway.Tag

Return type

degreedClient.models.pathway.Tag

degreedClient.providers module

class degreedClient.providers.ProviderClient(client)[source]

Bases: object

Providers API.

all(per_page=None, next_id=None)[source]

Get all providers for the current organization.

Parameters
  • per_page (int) – Amount of providers per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of groups.

Returns

A list of providers

Return type

list of degreedClient.models.provider.Provider

get(id)[source]

Fetch a specific provider.

Parameters

id (str) – The ID of the provider to retrieve

Returns

An instance degreedClient.models.provider.SpecificProvider

Return type

degreedClient.models.provider.SpecificProvider

get_provider_licence(id)[source]

Fetch provider licences for a specific provider

Parameters

id (str) – The unique id of the provider.

Returns

An instance degreedClient.models.provider.ProviderLicence

Return type

degreedClient.models.provider.ProviderLicence

degreedClient.recommendations module

class degreedClient.recommendations.RecommendationClient(client)[source]

Bases: object

Recommendation API.

all(start_date, end_date, per_page=None, next_id=None)[source]

Get all recommendations.

Parameters
  • start_date (str) – Get recommendations from this date on. eg 2018-11-30 A a maximum of 7 days between start_date and end_date

  • end_date (str) – Get recommendations till this date. eg 2018-11-30

  • per_page (int) – Amount of recommendations per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of recommendations.

Returns

A list of recommendations

Return type

list of degreedClient.models.recommendation.Recommendation

degreedClient.skills_plan module

class degreedClient.skills_plan.SkillPlanClient(client)[source]

Bases: object

Skills Plan API.

all(per_page=None, next_id=None)[source]

Get all skill plans for the current organization.

Parameters
  • start_date (str) – start date eg 2018-11-30 A maximum of 7 days part between start_date and end_date

  • end_date (str) – end date eg 2018-11-30

  • per_page (int) – Amount of providers per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of skill plans.

Returns

A list of skill plans

Return type

list of degreedClient.models.skill_plan.SkillPlan

get(id)[source]

Fetch a skill plan by ID.

Parameters

id (str) – The ID of the skill plan to retrieve

Returns

An instance degreedClient.models.skill_plan.SkillPlan

Return type

degreedClient.models.skill_plan.SkillPlan

get_skill_followers(id)[source]

Fetch skill followers ID.

Parameters

id (str) – The unique id of the skill plan.

Returns

An instance degreedClient.models.skill_plan.SkillFollower

Return type

degreedClient.models.skill_plan.SkillFollower

degreedClient.skills_ratings module

class degreedClient.skills_ratings.SkillRatingClient(client)[source]

Bases: object

Skill Ratings API.

all(start_date=None, end_date=None, per_page=None, next_id=None)[source]

Gets all skills ratings.

Parameters
  • start_date (str) – start date eg 2018-11-30 A maximum of 7 days between the start_date and end_date

  • end_date (str) – end date eg 2018-11-30

  • per_page (int) – Amount of skill ratings per page. Max of 1.000.

  • next_id (strt) – Supplied to retrieve the next batch of groups.

Returns

A list of skill ratings

Return type

list of degreedClient.models.skills_rating.SkillRating

degreedClient.required_learnings module

class degreedClient.required_learnings.RequiredLearningsClient(client)[source]

Bases: object

Required Learnings API.

all(start_date, end_date, per_page=None, next_id=None)[source]

Gets all learning requirements.

Parameters
  • start_date (str) – Get required learnings from this date on. eg 2018-11-30 start_date and end_date can only have a maximum of 7 days apart

  • end_date (str) – Get required learnings till this date. eg 2018-11-30

  • per_page (int) – Amount of required learnings per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of required learning.

Returns

A list of required learnings

Return type

list of degreedClient.models.required_learning.ReqLearning

degreedClient.logins module

class degreedClient.logins.LoginClient(client)[source]

Bases: object

Logins API.

all(start_date, end_date, per_page=None, next_id=None)[source]

Get all logins for the current organization.

Parameters
  • start_date (str) – Get logins from this date on. YYYY-MON-DAY A maximum of 7 days between start_date and end_date

  • end_date (str) – Get logins till this date. YYYY-MON-DAY

  • per_page (int) – Amount of logins to per page. Max of 1.000

  • next_id (str) – Supplied to retrieve the next batch of groups.

Returns

A list of logins

Return type

list of pathgather.models.login.Login

Models

degreedClient.models.user module

class degreedClient.models.user.User(id, attributes, links, relationships=None, included=None)[source]

Bases: object

degreedClient.models.user_follower module

class degreedClient.models.user_follower.UserFollower(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.user_follower.UserFollowersAttribute(follower_employee_id, following_employee_id, followed_at=None)[source]

Bases: object

degreedClient.models.user_skill module

class degreedClient.models.user_skill.UserSkill(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.user_skill.UserSkillAttribute(employee_id, skill_id, skill_name, certifiable_skill_guid, followed_at=None)[source]

Bases: object

degreedClient.models.content module

class degreedClient.models.content.Article(id, attributes=None, links=None)[source]

Bases: object

class degreedClient.models.content.ArticleAttribute(title, summary, url, format=None, obsolete=None, image_url=None, language=None, num_words=0, provider_code=None, external_id=None, publish_date=None, created_at=None, modified_at=None)[source]

Bases: object

class degreedClient.models.content.Book(id, attributes=None, links=None)[source]

Bases: object

class degreedClient.models.content.BookAttribute(title, subtitle, authors, pages, summary, image_url=None, obsolete=None, publish_date=None, language=None, external_id=None, i_s_b_n13=None, created_at=None, modified_at=None, provider_code=None)[source]

Bases: object

class degreedClient.models.content.Content(id, attributes=None, links=None)[source]

Bases: object

class degreedClient.models.content.ContentAttribute(content_type, external_id=None, title=None, summary=None, url=None, format=None, is_obsolete=False, image_url=None, language=None, duration=None, duration_type=None, provider=None, is_internal=False, created_at=None, modified_at=None)[source]

Bases: object

class degreedClient.models.content.Course(id, attributes=None, links=None)[source]

Bases: object

class degreedClient.models.content.CourseAttribute(provider_code, external_id, title, summary, url, obsolete, image_url, language, duration, duration_type, cost_units, cost_unit_type, format, difficulty, video_url, created_at=None, modified_at=None)[source]

Bases: object

class degreedClient.models.content.Video(id, attributes=None, links=None)[source]

Bases: object

class degreedClient.models.content.VideoAttribute(provider_code, external_id, title, duration, duration_type, summary, url, obsolete=None, image_url=None, language=None, publish_date=None, created_at=None, modified_at=None)[source]

Bases: object

degreedClient.models.completion module

class degreedClient.models.completion.Completion(id, attributes, links, relationships=None, included=None)[source]

Bases: object

class degreedClient.models.completion.CompletionAttribute(employee_id, completed_at=None, added_at=None, points_earned=0, is_verified=False, rating=0, access_method=None)[source]

Bases: object

class degreedClient.models.completion.CompletionCreationAttributes(user_id, user_identifier_type, content_id, content_id_type, content_type, completed_at=None, is_verified=False, questions_correct=0, percentile=0, duration=0, involvement_level=None)[source]

Bases: object

class degreedClient.models.completion.IncludeAttributes(content_type, url, title, provider)[source]

Bases: object

class degreedClient.models.completion.Included(id, attributes, links)[source]

Bases: object

class degreedClient.models.completion.Relationships(user)[source]

Bases: object

class degreedClient.models.completion.RelationshipsData(id)[source]

Bases: object

class degreedClient.models.completion.RelationshipsProvider(id, type_)[source]

Bases: object

class degreedClient.models.completion.RelationshipsUser(id, type_)[source]

Bases: object

degreedClient.models.certifiable_skill module

class degreedClient.models.certifiable_skill.CertifiableSkill(id, attributes, links)[source]

Bases: object

class degreedClient.models.certifiable_skill.CertifiableSkillAttribute(name, description, skill_unique_identifier, is_featured, created_at=None, modified_at=None, visibility=None, cost=0)[source]

Bases: object

degreedClient.models.group module

class degreedClient.models.group.Group(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.group.GroupAttribute(name, description, privacy, created_at=None, modified_at=None)[source]

Bases: object

degreedClient.models.pathway module

class degreedClient.models.pathway.Collaborator(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.pathway.CollaboratorAttribute(employee_id, created_at=None)[source]

Bases: object

class degreedClient.models.pathway.Follower(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.pathway.FollowerAttribute(employee_id, created_at=None)[source]

Bases: object

class degreedClient.models.pathway.GrpPathway(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.pathway.GrpPathwayAttribute(created_at=None)[source]

Bases: object

class degreedClient.models.pathway.Pathway(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.pathway.PathwayAttribute(title, summary, visibility, sections=None, created_at=None, modified_at=None)[source]

Bases: object

class degreedClient.models.pathway.Tag(id, attributes, links)[source]

Bases: object

class degreedClient.models.pathway.TagAttribute(tag, created_at=None)[source]

Bases: object

degreedClient.models.provider module

class degreedClient.models.provider.Provider(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.provider.ProviderAttribute(follower_employee_id, following_employee_id, followed_at=None)[source]

Bases: object

class degreedClient.models.provider.ProviderLicence(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.provider.ProviderLicenceAttribute(employee_id, is_enabled, created_at=None)[source]

Bases: object

class degreedClient.models.provider.SpecificProvider(id, attributes, links)[source]

Bases: object

class degreedClient.models.provider.SpecificProviderAttribute(name, url)[source]

Bases: object

degreedClient.models.recommendation module

class degreedClient.models.recommendation.RecoAttribute(employee_id, recipient_employee_id, status, recommended_at=None, modified_at=None)[source]

Bases: object

class degreedClient.models.recommendation.Recommendation(id, attributes, links, relationships, included)[source]

Bases: object

degreedClient.skill_plan module

class degreedClient.models.skill_plan.SkillFollower(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.skill_plan.SkillFollowerAttribute(employee_id, enrolled_at, is_primary_plan)[source]

Bases: object

class degreedClient.models.skill_plan.SkillPlan(id, attributes, links)[source]

Bases: object

class degreedClient.models.skill_plan.SkillPlanAttribute(name, description, visibility, sections=None, created_at=None)[source]

Bases: object

degreedClient.models.skills_rating module

class degreedClient.models.skills_rating.SkillRating(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.skills_rating.SkillRatingAttribute(employee_id, skill_name, rating, rating_type, certifiable_skill_guid, rated_at=None)[source]

Bases: object

degreedClient.models.required_learning module

class degreedClient.models.required_learning.LearningsAttribute(employee_id, assignment_type, due_at, created_at=None, modified_at=None)[source]

Bases: object

class degreedClient.models.required_learning.ReqLearning(id, attributes, links, relationships, included)[source]

Bases: object

degreedClient.models.login module

class degreedClient.models.login.Login(id, attributes, links, relationships)[source]

Bases: object

class degreedClient.models.login.LoginAttribute(employee_id, logged_in_at=None)[source]

Bases: object

Errors

degreedClient.exceptions module

exception degreedClient.exceptions.DegreedApiException(message, uri=None)[source]

Bases: Exception

exception degreedClient.exceptions.UserNotFoundException(message, uri=None)[source]

Bases: degreedClient.exceptions.DegreedApiException

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs at https://github.com/Rmaravanyika/degreedClient/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.

  • Any details about your local setup that might be helpful in troubleshooting.

  • Detailed steps to reproduce the bug.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.

Write Documentation

Python client for Degreed API could always use more documentation, whether as part of the official Python client for Degreed API docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

The best way to send feedback is to file an issue at https://github.com/Rmaravanyika/degreedClient/issues.

If you are proposing a feature:

  • Explain in detail how it would work.

  • Keep the scope as narrow as possible, to make it easier to implement.

  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Get Started!

Ready to contribute? Here’s how to set up degreedClient for local development.

  1. Fork the degreedClient repo on GitHub.

  2. Clone your fork locally:

    $ git clone git@github.com:your_name_here/degreedClient.git
    
  3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

    $ mkvirtualenv degreedClient
    $ cd degreedClient/
    $ python setup.py develop
    
  4. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature
    

    Now you can make your changes locally.

  5. When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

    $ flake8 degreedClient tests
    $ python setup.py test or py.test
    $ tox
    

    To get flake8 and tox, just pip install them into your virtualenv.

  6. Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
    
  7. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.

  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.

  3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check https://travis-ci.org/Rmaravanyika/degreedClient/pull_requests and make sure that the tests pass for all supported Python versions.

Tips

To run a subset of tests:

$ python -m unittest tests.test_degreedClient

Deploying

A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:

$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags

Travis will then deploy to PyPI if tests pass.

Credits

Development Lead

Contributors

None yet. Why not be the first?

History

2.2.2 (2020-05-17)

2.1.2 (2020-05-13)

2.1.1 (2020-05-13)

2.1.0 (2019-09-27)

2.0.0 (2019-09-09)

1.8.0 (2019-07-25)

1.6.2 (2019-07-06)

1.6.1 (2019-07-06)

1.5.0 (2019-07-04)

1.0.0 (2019-05-21)

  • First release on PyPI.

Indices and tables