Serious note to self. I wanted to mock the Github module for python. My simple class will get the ID of the team. from github import Github, Team from dotenv import load_dotenv import os import sys import json class GetTeamId: def __init__(self): load_dotenv() self.team_id = 5555 self.token = os.environ.get("GITHUB_TOKEN") self.client = Github(self.token) self.org = self.client.get_organization('FooBar') def handle(self, team_name): teams = self.org.get_teams() for team in teams: if team_name == team.name: print("Team id", team.