Skip to main content

Python Support

Client Initialization

Use this helper function from the AutoKitteh Python SDK:

from autokitteh.github import github_client

client = github_client("autokitteh_connection_name")

This helper function is documented here.

The code above uses the AutoKitteh connection's authentication details automatically, and is equivalent to this code snippet

from github import Auth, Github, GithubIntegration

# PAT-based authentication:
client = Github(auth=Auth.Token(pat))

# JWT-based authentication:
app = GithubIntegration(auth=Auth.AppAuth(int(app_id), private_key))
client = app.get_github_for_installation(int(install_id))

References

https://pygithub.readthedocs.io/en/latest/

Code Samples