GitHubAppClient#

class safir.github.GitHubAppClient(*, http_client, name, jwt)#

Bases: GitHubAPI

A GitHub API client authenticated as a GitHub App.

Parameters:
  • http_client (AsyncClient) – The httpx client.

  • name (str) – The GitHub App name. This identifies the app in the user agent string, and is typically the name of the GitHub repository the app is built from (e.g. lsst-sqre/times-square).

  • jwt (str) – The JWT token for authenticating as the GitHub App.

Methods Summary

app_getitem(url[, url_vars, accept])

Send a GET request for a single item to the specified endpoint, authenticated as the GitHub App.

app_getiter(url[, url_vars, accept, ...])

Return an async iterable for all the items at a specified endpoint, authenticated as the GitHub App.

app_patch(url[, url_vars, accept])

param url:

app_post(url[, url_vars, accept, data, ...])

param url:

Methods Documentation

async app_getitem(url, url_vars=None, *, accept='application/vnd.github.v3+json')#

Send a GET request for a single item to the specified endpoint, authenticated as the GitHub App.

Parameters:
Returns:

The response data from the GitHub API.

Return type:

Any

async app_getiter(url, url_vars=None, *, accept='application/vnd.github.v3+json', iterable_key='items')#

Return an async iterable for all the items at a specified endpoint, authenticated as the GitHub App.

Parameters:
Yields:

item – Items from the GitHub API response.

Return type:

AsyncGenerator[Any, None]

async app_patch(url, url_vars=None, *, data, accept='application/vnd.github.v3+json')#
Parameters:
Return type:

Any

async app_post(url, url_vars=None, *, accept='application/vnd.github.v3+json', data=None, content_type='application/json')#
Parameters:
Return type:

Any