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

Method __init__

github/GithubIntegration.py:72–179  ·  view source on GitHub ↗

:param integration_id: int deprecated, use auth=github.Auth.AppAuth(...) instead :param private_key: string deprecated, use auth=github.Auth.AppAuth(...) instead :param base_url: string :param timeout: integer :param user_agent: string :param per_page

(
        self,
        integration_id: int | str | None = None,
        private_key: str | None = None,
        base_url: str = Consts.DEFAULT_BASE_URL,
        *,
        timeout: int = Consts.DEFAULT_TIMEOUT,
        user_agent: str = Consts.DEFAULT_USER_AGENT,
        per_page: int = Consts.DEFAULT_PER_PAGE,
        verify: bool | str = True,
        retry: int | Retry | None = None,
        pool_size: int | None = None,
        seconds_between_requests: float | None = Consts.DEFAULT_SECONDS_BETWEEN_REQUESTS,
        seconds_between_writes: float | None = Consts.DEFAULT_SECONDS_BETWEEN_WRITES,
        jwt_expiry: int = Consts.DEFAULT_JWT_EXPIRY,
        jwt_issued_at: int = Consts.DEFAULT_JWT_ISSUED_AT,
        jwt_algorithm: str = Consts.DEFAULT_JWT_ALGORITHM,
        auth: AppAuth | None = None,
        # v3: set lazy = True as the default
        lazy: bool = False,
    )

Source from the content-addressed store, hash-verified

70 __requester: Requester
71
72 def __init__(
73 self,
74 integration_id: int | str | None = None,
75 private_key: str | None = None,
76 base_url: str = Consts.DEFAULT_BASE_URL,
77 *,
78 timeout: int = Consts.DEFAULT_TIMEOUT,
79 user_agent: str = Consts.DEFAULT_USER_AGENT,
80 per_page: int = Consts.DEFAULT_PER_PAGE,
81 verify: bool | str = True,
82 retry: int | Retry | None = None,
83 pool_size: int | None = None,
84 seconds_between_requests: float | None = Consts.DEFAULT_SECONDS_BETWEEN_REQUESTS,
85 seconds_between_writes: float | None = Consts.DEFAULT_SECONDS_BETWEEN_WRITES,
86 jwt_expiry: int = Consts.DEFAULT_JWT_EXPIRY,
87 jwt_issued_at: int = Consts.DEFAULT_JWT_ISSUED_AT,
88 jwt_algorithm: str = Consts.DEFAULT_JWT_ALGORITHM,
89 auth: AppAuth | None = None,
90 # v3: set lazy = True as the default
91 lazy: bool = False,
92 ) -> None:
93 """
94 :param integration_id: int deprecated, use auth=github.Auth.AppAuth(...) instead
95 :param private_key: string deprecated, use auth=github.Auth.AppAuth(...) instead
96 :param base_url: string
97 :param timeout: integer
98 :param user_agent: string
99 :param per_page: int
100 :param verify: boolean or string
101 :param retry: int or urllib3.util.retry.Retry object
102 :param pool_size: int
103 :param seconds_between_requests: float
104 :param seconds_between_writes: float
105 :param jwt_expiry: int deprecated, use auth=github.Auth.AppAuth(...) instead
106 :param jwt_issued_at: int deprecated, use auth=github.Auth.AppAuth(...) instead
107 :param jwt_algorithm: string deprecated, use auth=github.Auth.AppAuth(...) instead
108 :param auth: authentication method
109 :param lazy: completable objects created from this instance are lazy,
110 as well as completable objects created from those, and so on
111 """
112 if integration_id is not None:
113 assert isinstance(integration_id, (int, str)), integration_id
114 if private_key is not None:
115 assert isinstance(private_key, str), "supplied private key should be a string"
116 assert isinstance(base_url, str), base_url
117 assert isinstance(timeout, int), timeout
118 assert user_agent is None or isinstance(user_agent, str), user_agent
119 assert isinstance(per_page, int), per_page
120 assert isinstance(verify, (bool, str)), verify
121 assert retry is None or isinstance(retry, int) or isinstance(retry, urllib3.util.Retry), retry
122 assert pool_size is None or isinstance(pool_size, int), pool_size
123 assert seconds_between_requests is None or seconds_between_requests >= 0
124 assert seconds_between_writes is None or seconds_between_writes >= 0
125 assert isinstance(jwt_expiry, int), jwt_expiry
126 assert Consts.MIN_JWT_EXPIRY <= jwt_expiry <= Consts.MAX_JWT_EXPIRY, jwt_expiry
127 assert isinstance(jwt_issued_at, int)
128 assert isinstance(lazy, bool), lazy
129

Callers

nothing calls this directly

Calls 3

AppAuthClass · 0.90
RequesterClass · 0.90
create_jwt_signMethod · 0.80

Tested by

no test coverage detected