pierre-sdk 0.1.0.dev4__py3-none-any.whl

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.
@@ -0,0 +1,54 @@
1
+ # Generated by sdkgen. Do not edit this file.
2
+ """The namespaces of `Pierre` and `AsyncPierre`."""
3
+
4
+ from pierre._generated.namespaces.meta import (
5
+ AsyncMetaNamespace,
6
+ AsyncMetaNamespaceWithRawResponse,
7
+ MetaNamespace,
8
+ MetaNamespaceWithRawResponse,
9
+ )
10
+ from pierre._generated.namespaces.repos import (
11
+ AsyncReposNamespace,
12
+ AsyncReposNamespaceWithRawResponse,
13
+ ReposNamespace,
14
+ ReposNamespaceWithRawResponse,
15
+ )
16
+ from pierre._runtime import AsyncRuntime, SyncRuntime
17
+
18
+
19
+ class PierreNamespaces:
20
+ """The namespaces of `Pierre`."""
21
+
22
+ meta: MetaNamespace
23
+ repos: ReposNamespace
24
+
25
+ def _attach_namespaces(self, runtime: SyncRuntime) -> None:
26
+ self.meta = MetaNamespace(runtime)
27
+ self.repos = ReposNamespace(runtime)
28
+
29
+
30
+ class PierreWithRawResponse:
31
+ """`pierre.with_raw_response` of `Pierre`. It has the namespaces of the client, and each method returns a `RawResponse`."""
32
+
33
+ def __init__(self, client: PierreNamespaces) -> None:
34
+ self.meta = MetaNamespaceWithRawResponse(client.meta)
35
+ self.repos = ReposNamespaceWithRawResponse(client.repos)
36
+
37
+
38
+ class AsyncPierreNamespaces:
39
+ """The namespaces of `AsyncPierre`."""
40
+
41
+ meta: AsyncMetaNamespace
42
+ repos: AsyncReposNamespace
43
+
44
+ def _attach_namespaces(self, runtime: AsyncRuntime) -> None:
45
+ self.meta = AsyncMetaNamespace(runtime)
46
+ self.repos = AsyncReposNamespace(runtime)
47
+
48
+
49
+ class AsyncPierreWithRawResponse:
50
+ """`pierre.with_raw_response` of `AsyncPierre`. It has the namespaces of the client, and each method returns a `RawResponse`."""
51
+
52
+ def __init__(self, client: AsyncPierreNamespaces) -> None:
53
+ self.meta = AsyncMetaNamespaceWithRawResponse(client.meta)
54
+ self.repos = AsyncReposNamespaceWithRawResponse(client.repos)
@@ -0,0 +1,69 @@
1
+ # Generated by sdkgen. Do not edit this file.
2
+ """The declared response headers of each operation, by the wire form of each name."""
3
+
4
+ from pierre._compat import TypedDict
5
+
6
+ __all__ = [
7
+ "ReposArchiveGetResponseHeaders",
8
+ "ReposFilesGetResponseHeaders",
9
+ "ReposFilesMetadataGetResponseHeaders",
10
+ "ReposGrepResponseHeaders",
11
+ ]
12
+
13
+
14
+ class ReposArchiveGetResponseHeaders(TypedDict, total=False):
15
+ """The declared response headers of `repos.archive.get`."""
16
+
17
+ # `Cache-Control`: Archive downloads are returned with `no-store`.
18
+ cache_control: str
19
+ # `Content-Disposition`: Attachment filename generated from the repository URL and resolved revision.
20
+ content_disposition: str
21
+
22
+
23
+ class ReposFilesGetResponseHeaders(TypedDict, total=False):
24
+ """The declared response headers of `repos.files.get`."""
25
+
26
+ # `Accept-Ranges`: Set to `bytes`; the endpoint accepts byte-range requests via `Range`.
27
+ accept_ranges: str
28
+ # `Content-Length`: Full blob size in bytes for 200 responses, or range size for 206 responses.
29
+ content_length: str
30
+ # `Content-Range`: Returned for 206 responses; identifies the byte range served.
31
+ content_range: str
32
+ # `Content-Type`: Always `application/octet-stream`.
33
+ content_type: str
34
+ # `ETag`: Strong validator equal to the quoted blob object SHA. Use with `If-Match` / `If-None-Match`.
35
+ etag: str
36
+ # `Last-Modified`: Committer date of the most recent commit reachable from `ref` that modified `path`. Use with `If-Modified-Since` / `If-Unmodified-Since`.
37
+ last_modified: str
38
+ # `X-Blob-Sha`: Git blob object SHA of the served file.
39
+ x_blob_sha: str
40
+ # `X-Last-Commit-Sha`: SHA of the most recent commit reachable from `ref` that modified `path`.
41
+ x_last_commit_sha: str
42
+
43
+
44
+ class ReposFilesMetadataGetResponseHeaders(TypedDict, total=False):
45
+ """The declared response headers of `repos.files.metadata.get`."""
46
+
47
+ # `Accept-Ranges`: Set to `bytes`; the endpoint accepts byte-range requests via `Range`.
48
+ accept_ranges: str
49
+ # `Content-Length`: Full blob size in bytes for 200 responses, or range size for 206 responses.
50
+ content_length: str
51
+ # `Content-Range`: Returned for 206 responses; identifies the byte range served.
52
+ content_range: str
53
+ # `Content-Type`: Always `application/octet-stream`.
54
+ content_type: str
55
+ # `ETag`: Strong validator equal to the quoted blob object SHA. Use with `If-Match` / `If-None-Match`.
56
+ etag: str
57
+ # `Last-Modified`: Committer date of the most recent commit reachable from `ref` that modified `path`. Use with `If-Modified-Since` / `If-Unmodified-Since`.
58
+ last_modified: str
59
+ # `X-Blob-Sha`: Git blob object SHA of the served file.
60
+ x_blob_sha: str
61
+ # `X-Last-Commit-Sha`: SHA of the most recent commit reachable from `ref` that modified `path`.
62
+ x_last_commit_sha: str
63
+
64
+
65
+ class ReposGrepResponseHeaders(TypedDict, total=False):
66
+ """The declared response headers of `repos.grep`."""
67
+
68
+ # `X-Cache`: Indicates grep cache status (`HIT` or `MISS`).
69
+ x_cache: str
@@ -0,0 +1,2 @@
1
+ # Generated by sdkgen. Do not edit this file.
2
+ """One module for each top-level namespace."""
@@ -0,0 +1,125 @@
1
+ # Generated by sdkgen. Do not edit this file.
2
+ """The `meta` namespace of `Pierre` and `AsyncPierre`."""
3
+
4
+ from typing import Mapping, Sequence, Union, cast
5
+
6
+ from pierre._generated import schemas
7
+ from pierre._operation import OperationSpec
8
+ from pierre._response import async_raw_method, raw_method
9
+ from pierre._runtime import AsyncRuntime, SyncRuntime
10
+ from pierre._types import NOT_GIVEN, NoHeaders, NotGiven, RefPolicy, RequestOptions
11
+
12
+ META_GET: OperationSpec[NoHeaders] = OperationSpec(
13
+ id="meta.get",
14
+ method="GET",
15
+ path="/api/meta",
16
+ parameters=(),
17
+ body=None,
18
+ response_encoding="json",
19
+ response_headers=(),
20
+ not_modified=False,
21
+ scopes=("org:read",),
22
+ repo_claim=False,
23
+ item_field=None,
24
+ idempotency_key=False,
25
+ )
26
+
27
+
28
+ class MetaNamespace:
29
+ """The `meta` namespace. `Pierre()` has it as `pierre.meta`."""
30
+
31
+ def __init__(self, runtime: SyncRuntime) -> None:
32
+ self._runtime = runtime
33
+
34
+ def get(
35
+ self,
36
+ *,
37
+ extra_headers: Union[Mapping[str, str], NotGiven] = NOT_GIVEN,
38
+ timeout: Union[float, NotGiven] = NOT_GIVEN,
39
+ max_retries: Union[int, NotGiven] = NOT_GIVEN,
40
+ idempotency_key: Union[str, NotGiven] = NOT_GIVEN,
41
+ token_ttl: Union[int, NotGiven] = NOT_GIVEN,
42
+ ref_policies: Union[Sequence[RefPolicy], NotGiven] = NOT_GIVEN,
43
+ ) -> schemas.Meta:
44
+ """Get Organization Metadata
45
+
46
+ Return the cloud provider, region, and public inbound IP addresses of the Code Storage cluster that serves the current organisation. Addresses are listed separately for Git over HTTPS and for the HTTP API; allow them in firewall rules that restrict outbound traffic to Code Storage. The lists change when the cluster's ingress changes, so poll this endpoint rather than copying them once.
47
+
48
+ Scope: `org:read`.
49
+
50
+ Catalog ID `meta.get`: `GET /api/meta`.
51
+
52
+ Docs: search for `meta.get` in the docs MCP server, https://code.storage/docs/mcp.
53
+ """
54
+ return cast(
55
+ schemas.Meta,
56
+ self._runtime.request(
57
+ META_GET,
58
+ {},
59
+ RequestOptions(
60
+ extra_headers=extra_headers,
61
+ timeout=timeout,
62
+ max_retries=max_retries,
63
+ idempotency_key=idempotency_key,
64
+ token_ttl=token_ttl,
65
+ ref_policies=ref_policies,
66
+ ),
67
+ ),
68
+ )
69
+
70
+
71
+ class AsyncMetaNamespace:
72
+ """The `meta` namespace. `AsyncPierre()` has it as `pierre.meta`."""
73
+
74
+ def __init__(self, runtime: AsyncRuntime) -> None:
75
+ self._runtime = runtime
76
+
77
+ async def get(
78
+ self,
79
+ *,
80
+ extra_headers: Union[Mapping[str, str], NotGiven] = NOT_GIVEN,
81
+ timeout: Union[float, NotGiven] = NOT_GIVEN,
82
+ max_retries: Union[int, NotGiven] = NOT_GIVEN,
83
+ idempotency_key: Union[str, NotGiven] = NOT_GIVEN,
84
+ token_ttl: Union[int, NotGiven] = NOT_GIVEN,
85
+ ref_policies: Union[Sequence[RefPolicy], NotGiven] = NOT_GIVEN,
86
+ ) -> schemas.Meta:
87
+ """Get Organization Metadata
88
+
89
+ Return the cloud provider, region, and public inbound IP addresses of the Code Storage cluster that serves the current organisation. Addresses are listed separately for Git over HTTPS and for the HTTP API; allow them in firewall rules that restrict outbound traffic to Code Storage. The lists change when the cluster's ingress changes, so poll this endpoint rather than copying them once.
90
+
91
+ Scope: `org:read`.
92
+
93
+ Catalog ID `meta.get`: `GET /api/meta`.
94
+
95
+ Docs: search for `meta.get` in the docs MCP server, https://code.storage/docs/mcp.
96
+ """
97
+ return cast(
98
+ schemas.Meta,
99
+ await self._runtime.request(
100
+ META_GET,
101
+ {},
102
+ RequestOptions(
103
+ extra_headers=extra_headers,
104
+ timeout=timeout,
105
+ max_retries=max_retries,
106
+ idempotency_key=idempotency_key,
107
+ token_ttl=token_ttl,
108
+ ref_policies=ref_policies,
109
+ ),
110
+ ),
111
+ )
112
+
113
+
114
+ class MetaNamespaceWithRawResponse:
115
+ """The `meta` namespace of `pierre.with_raw_response`. Each method returns a `RawResponse`."""
116
+
117
+ def __init__(self, namespace: MetaNamespace) -> None:
118
+ self.get = raw_method(namespace.get, META_GET)
119
+
120
+
121
+ class AsyncMetaNamespaceWithRawResponse:
122
+ """The `meta` namespace of `pierre.with_raw_response`. Each method returns a `RawResponse`."""
123
+
124
+ def __init__(self, namespace: AsyncMetaNamespace) -> None:
125
+ self.get = async_raw_method(namespace.get, META_GET)