GitHubKit 0.10.7__tar.gz → 0.11.0a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of GitHubKit might be problematic. Click here for more details.
- {githubkit-0.10.7 → githubkit-0.11.0a0}/PKG-INFO +2 -2
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/auth/app.py +2 -2
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/graphql/models.py +3 -2
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/response.py +2 -2
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/__init__.py +5 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/actions.py +229 -171
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/activity.py +21 -17
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/apps.py +37 -29
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/billing.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/checks.py +29 -29
- githubkit-0.11.0a0/githubkit/rest/classroom.py +304 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/code_scanning.py +21 -13
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/codes_of_conduct.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/codespaces.py +97 -61
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/copilot.py +33 -17
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/dependabot.py +33 -17
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/dependency_graph.py +5 -5
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/emojis.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/gists.py +25 -75
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/git.py +25 -25
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/gitignore.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/interactions.py +13 -13
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/issues.py +89 -69
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/licenses.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/markdown.py +13 -9
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/meta.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/migrations.py +33 -25
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/models.py +921 -189
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/oidc.py +5 -5
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/orgs.py +73 -57
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/packages.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/projects.py +57 -55
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/pulls.py +97 -83
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/rate_limit.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/reactions.py +73 -61
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/repos.py +363 -335
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/search.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/secret_scanning.py +9 -9
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/security_advisories.py +13 -13
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/teams.py +109 -95
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/types.py +491 -17
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/rest/users.py +45 -37
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/typing.py +17 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/utils.py +2 -2
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/webhooks/models.py +6 -6
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/webhooks/parse.py +5 -5
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/webhooks/verify.py +1 -1
- {githubkit-0.10.7 → githubkit-0.11.0a0}/pyproject.toml +3 -3
- {githubkit-0.10.7 → githubkit-0.11.0a0}/LICENSE +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/README.md +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/__init__.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/auth/__init__.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/auth/_url.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/auth/action.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/auth/base.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/auth/oauth.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/auth/token.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/auth/unauth.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/cache/__init__.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/cache/base.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/cache/mem_cache.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/config.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/core.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/exception.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/github.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/graphql/__init__.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/paginator.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/py.typed +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/webhooks/__init__.py +0 -0
- {githubkit-0.10.7 → githubkit-0.11.0a0}/githubkit/webhooks/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: GitHubKit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0a0
|
|
4
4
|
Summary: GitHub SDK for Python
|
|
5
5
|
Home-page: https://github.com/yanyongyu/githubkit
|
|
6
6
|
License: MIT
|
|
@@ -22,7 +22,7 @@ Provides-Extra: jwt
|
|
|
22
22
|
Requires-Dist: PyJWT[crypto] (>=2.4.0,<3.0.0) ; extra == "jwt" or extra == "auth-app" or extra == "auth" or extra == "all"
|
|
23
23
|
Requires-Dist: anyio (>=3.6.1,<4.0.0) ; extra == "auth-oauth-device" or extra == "auth" or extra == "all"
|
|
24
24
|
Requires-Dist: httpx (>=0.23.0,<1.0.0)
|
|
25
|
-
Requires-Dist: pydantic (>=
|
|
25
|
+
Requires-Dist: pydantic (>=2.0.0,<3.0.0)
|
|
26
26
|
Requires-Dist: typing-extensions (>=4.3.0,<5.0.0)
|
|
27
27
|
Project-URL: Documentation, https://github.com/yanyongyu/githubkit
|
|
28
28
|
Project-URL: Repository, https://github.com/yanyongyu/githubkit
|
|
@@ -91,13 +91,13 @@ class AppAuth(httpx.Auth):
|
|
|
91
91
|
raw_path=base_url.raw_path
|
|
92
92
|
+ f"app/installations/{self.installation_id}/access_tokens".encode("ascii")
|
|
93
93
|
)
|
|
94
|
-
body = AppInstallationsInstallationIdAccessTokensPostBody.
|
|
94
|
+
body = AppInstallationsInstallationIdAccessTokensPostBody.model_validate(
|
|
95
95
|
{
|
|
96
96
|
"repositories": self.repositories,
|
|
97
97
|
"repository_ids": self.repository_ids,
|
|
98
98
|
"permissions": self.permissions,
|
|
99
99
|
}
|
|
100
|
-
).
|
|
100
|
+
).model_dump(by_alias=True)
|
|
101
101
|
return httpx.Request(
|
|
102
102
|
"POST",
|
|
103
103
|
url,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Any, Dict, List, Union, Optional
|
|
2
2
|
|
|
3
|
-
from pydantic import BaseModel,
|
|
3
|
+
from pydantic import BaseModel, model_validator
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class SourceLocation(BaseModel):
|
|
@@ -20,7 +20,8 @@ class GraphQLResponse(BaseModel):
|
|
|
20
20
|
errors: Optional[List[GraphQLError]] = None
|
|
21
21
|
extensions: Optional[Dict[str, Any]] = None
|
|
22
22
|
|
|
23
|
-
@
|
|
23
|
+
@model_validator(mode="before")
|
|
24
|
+
@classmethod
|
|
24
25
|
def validate_data_and_errors(cls, values: Dict[str, Any]):
|
|
25
26
|
if values.get("data") is None and not values.get("errors"):
|
|
26
27
|
raise ValueError("No data or errors found in response")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Any, Type, Generic, TypeVar
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
|
-
from pydantic import
|
|
4
|
+
from pydantic import TypeAdapter
|
|
5
5
|
|
|
6
6
|
RT = TypeVar("RT")
|
|
7
7
|
|
|
@@ -47,4 +47,4 @@ class Response(Generic[RT]):
|
|
|
47
47
|
|
|
48
48
|
@property
|
|
49
49
|
def parsed_data(self) -> RT:
|
|
50
|
-
return
|
|
50
|
+
return TypeAdapter(self._data_model).validate_json(self.content)
|
|
@@ -33,6 +33,7 @@ from .licenses import LicensesClient
|
|
|
33
33
|
from .markdown import MarkdownClient
|
|
34
34
|
from .packages import PackagesClient
|
|
35
35
|
from .projects import ProjectsClient
|
|
36
|
+
from .classroom import ClassroomClient
|
|
36
37
|
from .gitignore import GitignoreClient
|
|
37
38
|
from .reactions import ReactionsClient
|
|
38
39
|
from .rate_limit import RateLimitClient
|
|
@@ -66,6 +67,10 @@ class RestNamespace:
|
|
|
66
67
|
def apps(self) -> AppsClient:
|
|
67
68
|
return AppsClient(self._github)
|
|
68
69
|
|
|
70
|
+
@cached_property
|
|
71
|
+
def classroom(self) -> ClassroomClient:
|
|
72
|
+
return ClassroomClient(self._github)
|
|
73
|
+
|
|
69
74
|
@cached_property
|
|
70
75
|
def codes_of_conduct(self) -> CodesOfConductClient:
|
|
71
76
|
return CodesOfConductClient(self._github)
|