MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / Installation

Class Installation

github/Installation.py:76–291  ·  view source on GitHub ↗

This class represents Installations. The reference can be found here https://docs.github.com/en/rest/reference/apps#installations The OpenAPI schema can be found at - /components/schemas/installation

Source from the content-addressed store, hash-verified

74
75
76class Installation(NonCompletableGithubObject):
77 """
78 This class represents Installations.
79
80 The reference can be found here
81 https://docs.github.com/en/rest/reference/apps#installations
82
83 The OpenAPI schema can be found at
84
85 - /components/schemas/installation
86
87 """
88
89 def __init__(
90 self,
91 requester: Requester,
92 headers: dict[str, str | int],
93 attributes: Any,
94 ) -> None:
95 super().__init__(requester, headers, attributes)
96
97 auth = self._requester.auth if self._requester is not None else None
98 # Usually, an Installation is created from a Requester with App authentication
99 if isinstance(auth, AppAuth):
100 # But the installation has to authenticate as an installation (e.g. for get_repos())
101 auth = auth.get_installation_auth(self.id, requester=self._requester)
102 self._requester = self._requester.withAuth(auth)
103
104 def _initAttributes(self) -> None:
105 self._access_tokens_url: Attribute[str] = NotSet
106 self._account: Attribute[NamedUser | Organization] = NotSet
107 self._app_id: Attribute[int] = NotSet
108 self._app_slug: Attribute[str] = NotSet
109 self._client_id: Attribute[str] = NotSet
110 self._contact_email: Attribute[str] = NotSet
111 self._created_at: Attribute[datetime] = NotSet
112 self._events: Attribute[list[str]] = NotSet
113 self._has_multiple_single_files: Attribute[bool] = NotSet
114 self._html_url: Attribute[str] = NotSet
115 self._id: Attribute[int] = NotSet
116 self._permissions: Attribute[dict[str, Any]] = NotSet
117 self._repositories_url: Attribute[str] = NotSet
118 self._repository_selection: Attribute[str] = NotSet
119 self._single_file_name: Attribute[str] = NotSet
120 self._single_file_paths: Attribute[list[str]] = NotSet
121 self._suspended_at: Attribute[datetime] = NotSet
122 self._suspended_by: Attribute[NamedUser] = NotSet
123 self._target_id: Attribute[int] = NotSet
124 self._target_type: Attribute[str] = NotSet
125 self._updated_at: Attribute[datetime] = NotSet
126
127 def __repr__(self) -> str:
128 return self.get__repr__({"id": self._id.value})
129
130 @property
131 def access_tokens_url(self) -> str:
132 return self._access_tokens_url.value
133

Callers 1

_get_installed_appMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…