yandexcloud 0.286.0__py3-none-any.whl → 0.288.0__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.
Potentially problematic release.
This version of yandexcloud might be problematic. Click here for more details.
- yandex/cloud/backup/v1/policy_service_pb2.py +8 -8
- yandex/cloud/loadtesting/agent/v1/agent_registration_service_pb2.py +10 -10
- yandex/cloud/mdb/clickhouse/v1/backup_service_pb2.py +9 -3
- yandex/cloud/mdb/clickhouse/v1/cluster_service_pb2.py +130 -130
- yandex/cloud/mdb/greenplum/v1/pxf_pb2.py +37 -37
- yandex/cloud/mdb/greenplum/v1/pxf_service_pb2.py +22 -22
- yandex/cloud/serverless/apigateway/v1/apigateway_pb2.py +24 -21
- yandex/cloud/serverless/apigateway/v1/apigateway_service_pb2.py +53 -48
- yandexcloud/__init__.py +1 -0
- yandexcloud/_auth_fabric.py +12 -5
- yandexcloud/_channels.py +59 -23
- yandexcloud/_sdk.py +8 -5
- yandexcloud/auth.py +3 -1
- yandexcloud-0.288.0.dist-info/METADATA +203 -0
- {yandexcloud-0.286.0.dist-info → yandexcloud-0.288.0.dist-info}/RECORD +19 -19
- yandexcloud-0.286.0.dist-info/METADATA +0 -110
- {yandexcloud-0.286.0.dist-info → yandexcloud-0.288.0.dist-info}/AUTHORS +0 -0
- {yandexcloud-0.286.0.dist-info → yandexcloud-0.288.0.dist-info}/LICENSE +0 -0
- {yandexcloud-0.286.0.dist-info → yandexcloud-0.288.0.dist-info}/WHEEL +0 -0
- {yandexcloud-0.286.0.dist-info → yandexcloud-0.288.0.dist-info}/top_level.txt +0 -0
yandexcloud/_channels.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
from importlib.metadata import PackageNotFoundError, version
|
|
3
|
+
from typing import Dict, Optional
|
|
2
4
|
|
|
3
5
|
import grpc
|
|
4
6
|
|
|
@@ -13,10 +15,11 @@ except PackageNotFoundError:
|
|
|
13
15
|
VERSION = "0.0.0"
|
|
14
16
|
|
|
15
17
|
SDK_USER_AGENT = "yandex-cloud-python-sdk/{version}".format(version=VERSION)
|
|
18
|
+
logger = logging.getLogger(__name__)
|
|
16
19
|
|
|
17
20
|
|
|
18
|
-
class Channels
|
|
19
|
-
def __init__(self, client_user_agent=None, **kwargs):
|
|
21
|
+
class Channels:
|
|
22
|
+
def __init__(self, client_user_agent=None, endpoints: Optional[Dict[str, str]] = None, **kwargs):
|
|
20
23
|
self._channel_creds = grpc.ssl_channel_credentials(
|
|
21
24
|
root_certificates=kwargs.get("root_certificates"),
|
|
22
25
|
private_key=kwargs.get("private_key"),
|
|
@@ -30,35 +33,68 @@ class Channels(object):
|
|
|
30
33
|
endpoint=self._endpoint,
|
|
31
34
|
)
|
|
32
35
|
|
|
33
|
-
self._unauthenticated_channel = None
|
|
34
|
-
self._channels = None
|
|
35
36
|
self._client_user_agent = client_user_agent
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
self._config_endpoints = endpoints if endpoints is not None else {}
|
|
38
|
+
self._endpoints = None
|
|
39
|
+
self.channel_options = tuple(
|
|
39
40
|
("grpc.primary_user_agent", user_agent)
|
|
40
41
|
for user_agent in [self._client_user_agent, SDK_USER_AGENT]
|
|
41
42
|
if user_agent is not None
|
|
42
43
|
)
|
|
43
44
|
|
|
44
|
-
def channel(self, endpoint):
|
|
45
|
-
if
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
def channel(self, service: str, endpoint: Optional[str] = None, insecure: bool = False) -> grpc.Channel:
|
|
46
|
+
if endpoint:
|
|
47
|
+
logger.info("Using provided service %s endpoint %s", service, endpoint)
|
|
48
|
+
if insecure:
|
|
49
|
+
logger.info("Insecure option is ON, no IAM endpoint used for verification")
|
|
50
|
+
return grpc.insecure_channel(endpoint, options=self.channel_options)
|
|
51
|
+
logger.info("Insecure option is OFF,IAM endpoint %s used for verification")
|
|
52
|
+
creds = self._get_creds(self.endpoints["iam"])
|
|
53
|
+
return grpc.secure_channel(endpoint, creds, options=self.channel_options)
|
|
54
|
+
if service not in self._config_endpoints and insecure:
|
|
55
|
+
logger.warning(
|
|
56
|
+
"Unable to use insecure option for default {%s} service endpoint.\n"
|
|
57
|
+
"Option is ignored. To enable it override endpoint.",
|
|
58
|
+
service,
|
|
48
59
|
)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
endpoints =
|
|
60
|
+
elif insecure:
|
|
61
|
+
logger.info("Insecure option is ON, no IAM endpoint used for verification")
|
|
62
|
+
return grpc.insecure_channel(self.endpoints[service], options=self.channel_options)
|
|
63
|
+
|
|
64
|
+
logger.info(
|
|
65
|
+
"Using endpoints from configuration, IAM %s, %s %s",
|
|
66
|
+
self.endpoints["iam"],
|
|
67
|
+
service,
|
|
68
|
+
self.endpoints[service],
|
|
69
|
+
)
|
|
52
70
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
71
|
+
creds = self._get_creds(self.endpoints["iam"])
|
|
72
|
+
if service not in self.endpoints:
|
|
73
|
+
raise RuntimeError(f"Unknown service: {service}")
|
|
74
|
+
return grpc.secure_channel(self.endpoints[service], creds, options=self.channel_options)
|
|
56
75
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
76
|
+
@property
|
|
77
|
+
def endpoints(self) -> Optional[dict]:
|
|
78
|
+
if self._endpoints is None:
|
|
79
|
+
self._endpoints = self._get_endpoints()
|
|
80
|
+
for id_, address in self._config_endpoints.items():
|
|
81
|
+
logger.debug("Override service %s, endpoint %s", id_, address)
|
|
82
|
+
if id_ == "iam":
|
|
83
|
+
logger.warning(
|
|
84
|
+
"Be aware `iam` service endpoint is overridden. "
|
|
85
|
+
"That can produce unexpected results in SDK calls."
|
|
86
|
+
)
|
|
87
|
+
self._endpoints[id_] = address
|
|
88
|
+
return self._endpoints
|
|
60
89
|
|
|
61
|
-
|
|
62
|
-
|
|
90
|
+
def _get_endpoints(self) -> Dict[str, str]:
|
|
91
|
+
unauthenticated_channel = grpc.secure_channel(self._endpoint, self._channel_creds, options=self.channel_options)
|
|
92
|
+
endpoint_service = ApiEndpointServiceStub(unauthenticated_channel)
|
|
93
|
+
resp = endpoint_service.List(ListApiEndpointsRequest())
|
|
94
|
+
return {endpoint.id: endpoint.address for endpoint in resp.endpoints}
|
|
63
95
|
|
|
64
|
-
|
|
96
|
+
def _get_creds(self, iam_endpoint: str) -> grpc.ChannelCredentials:
|
|
97
|
+
plugin = _auth_plugin.Credentials(self._token_requester, lambda: iam_endpoint)
|
|
98
|
+
call_creds = grpc.metadata_call_credentials(plugin)
|
|
99
|
+
creds = grpc.composite_channel_credentials(self._channel_creds, call_creds)
|
|
100
|
+
return creds
|
yandexcloud/_sdk.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import inspect
|
|
2
|
+
from typing import Dict, Optional
|
|
2
3
|
|
|
3
4
|
import grpc
|
|
4
5
|
|
|
@@ -8,8 +9,8 @@ from yandexcloud._retry_interceptor import RetryInterceptor
|
|
|
8
9
|
from yandexcloud._wrappers import Wrappers
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
class SDK
|
|
12
|
-
def __init__(self, interceptor=None, user_agent=None, **kwargs):
|
|
12
|
+
class SDK:
|
|
13
|
+
def __init__(self, interceptor=None, user_agent=None, endpoints: Optional[Dict[str, str]] = None, **kwargs):
|
|
13
14
|
"""
|
|
14
15
|
API entry-point object.
|
|
15
16
|
|
|
@@ -22,8 +23,10 @@ class SDK(object):
|
|
|
22
23
|
]
|
|
23
24
|
:param user_agent: String to prepend User-Agent metadata header for all GRPC requests made via SDK object
|
|
24
25
|
:type user_agent: Optional[str]
|
|
26
|
+
:param endpoints: Dict with services endpoints overrides. Example: {'vpc': 'new.vpc.endpoint:443'}
|
|
27
|
+
|
|
25
28
|
"""
|
|
26
|
-
self._channels = _channels.Channels(client_user_agent=user_agent, **kwargs)
|
|
29
|
+
self._channels = _channels.Channels(client_user_agent=user_agent, endpoints=endpoints, **kwargs)
|
|
27
30
|
if interceptor is None:
|
|
28
31
|
interceptor = RetryInterceptor(
|
|
29
32
|
max_retry_count=5,
|
|
@@ -37,9 +40,9 @@ class SDK(object):
|
|
|
37
40
|
def set_interceptor(self, interceptor):
|
|
38
41
|
self._default_interceptor = interceptor
|
|
39
42
|
|
|
40
|
-
def client(self, stub_ctor, interceptor=None):
|
|
43
|
+
def client(self, stub_ctor, interceptor=None, endpoint: Optional[str] = None, insecure: bool = False):
|
|
41
44
|
service = _service_for_ctor(stub_ctor)
|
|
42
|
-
channel = self._channels.channel(service)
|
|
45
|
+
channel = self._channels.channel(service, endpoint, insecure)
|
|
43
46
|
if interceptor is not None:
|
|
44
47
|
channel = grpc.intercept_channel(channel, interceptor)
|
|
45
48
|
elif self._default_interceptor is not None:
|
yandexcloud/auth.py
CHANGED
|
@@ -8,7 +8,9 @@ from yandexcloud._auth_fabric import (
|
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
def get_auth_token(token=None, service_account_key=None, iam_token=None, metadata_addr=None, endpoint=
|
|
11
|
+
def get_auth_token(token=None, service_account_key=None, iam_token=None, metadata_addr=None, endpoint=None):
|
|
12
|
+
if endpoint is None:
|
|
13
|
+
endpoint = YC_API_ENDPOINT
|
|
12
14
|
requester = get_auth_token_requester(
|
|
13
15
|
token=token,
|
|
14
16
|
service_account_key=service_account_key,
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: yandexcloud
|
|
3
|
+
Version: 0.288.0
|
|
4
|
+
Summary: The Yandex.Cloud official SDK
|
|
5
|
+
Home-page: https://github.com/yandex-cloud/python-sdk
|
|
6
|
+
Author: Yandex LLC
|
|
7
|
+
Author-email: cloud@support.yandex.ru
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
License-File: AUTHORS
|
|
19
|
+
Requires-Dist: cryptography >=2.8
|
|
20
|
+
Requires-Dist: grpcio >=1.59.3
|
|
21
|
+
Requires-Dist: protobuf >=4.23.4
|
|
22
|
+
Requires-Dist: googleapis-common-protos >=1.59.1
|
|
23
|
+
Requires-Dist: pyjwt >=1.7.1
|
|
24
|
+
Requires-Dist: requests >=2.22.0
|
|
25
|
+
Requires-Dist: six >=1.14.0
|
|
26
|
+
|
|
27
|
+
[![PyPI Version][pypi-image]][pypi-url]
|
|
28
|
+
[![Build Status][build-image]][build-url]
|
|
29
|
+
[![License][license-image]][license-url]
|
|
30
|
+
|
|
31
|
+
<!-- Badges -->
|
|
32
|
+
|
|
33
|
+
[pypi-image]: https://img.shields.io/pypi/v/yandexcloud
|
|
34
|
+
[pypi-url]: https://pypi.org/project/yandexcloud/
|
|
35
|
+
[build-image]: https://github.com/yandex-cloud/python-sdk/actions/workflows/run-tests.yml/badge.svg
|
|
36
|
+
[build-url]: https://github.com/yandex-cloud/python-sdk/actions/workflows/run-tests.yml
|
|
37
|
+
[license-image]: https://img.shields.io/github/license/yandex-cloud/python-sdk.svg
|
|
38
|
+
[license-url]: https://github.com/yandex-cloud/python-sdk/blob/master/LICENSE
|
|
39
|
+
|
|
40
|
+
# Yandex.Cloud SDK (Python)
|
|
41
|
+
|
|
42
|
+
Need to automate your infrastructure or use services provided by Yandex.Cloud? We've got you covered.
|
|
43
|
+
|
|
44
|
+
Installation:
|
|
45
|
+
|
|
46
|
+
pip install yandexcloud
|
|
47
|
+
|
|
48
|
+
## Getting started
|
|
49
|
+
|
|
50
|
+
There are several options for authorization your requests - OAuth Token,
|
|
51
|
+
Metadata Service (if you're executing your code inside VMs or Cloud Functions
|
|
52
|
+
running in Yandex.Cloud), Service Account Keys, and externally created IAM tokens.
|
|
53
|
+
|
|
54
|
+
### OAuth Token
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
sdk = yandexcloud.SDK(token='AQAD-.....')
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Metadata Service
|
|
61
|
+
|
|
62
|
+
Don't forget to assign Service Account for your Instance or Function and grant required roles.
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
sdk = yandexcloud.SDK()
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Service Account Keys
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
# you can store and read it from JSON file
|
|
72
|
+
sa_key = {
|
|
73
|
+
"id": "...",
|
|
74
|
+
"service_account_id": "...",
|
|
75
|
+
"private_key": "..."
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
sdk = yandexcloud.SDK(service_account_key=sa_key)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### IAM tokens
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
sdk = yandexcloud.SDK(iam_token="t1.9eu...")
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Check `examples` directory for more examples.
|
|
88
|
+
|
|
89
|
+
### Override service endpoint
|
|
90
|
+
|
|
91
|
+
#### Supported services
|
|
92
|
+
|
|
93
|
+
| Service Name | Alias |
|
|
94
|
+
|------------------------------------------------------------------------|--------------------------|
|
|
95
|
+
| yandex.cloud.ai.foundation_models | ai-foundation-models |
|
|
96
|
+
| yandex.cloud.ai.llm | ai-llm |
|
|
97
|
+
| yandex.cloud.ai.stt | ai-stt |
|
|
98
|
+
| yandex.cloud.ai.translate | ai-translate |
|
|
99
|
+
| yandex.cloud.ai.tts | ai-speechkit |
|
|
100
|
+
| yandex.cloud.ai.vision | ai-vision |
|
|
101
|
+
| yandex.cloud.apploadbalancer | alb |
|
|
102
|
+
| yandex.cloud.billing | billing |
|
|
103
|
+
| yandex.cloud.cdn | cdn |
|
|
104
|
+
| yandex.cloud.certificatemanager.v1.certificate_content_service | certificate-manager-data |
|
|
105
|
+
| yandex.cloud.certificatemanager | certificate-manager |
|
|
106
|
+
| yandex.cloud.compute | compute |
|
|
107
|
+
| yandex.cloud.containerregistry | container-registry |
|
|
108
|
+
| yandex.cloud.dataproc.manager | dataproc-manager |
|
|
109
|
+
| yandex.cloud.dataproc | dataproc |
|
|
110
|
+
| yandex.cloud.datatransfer | datatransfer |
|
|
111
|
+
| yandex.cloud.dns | dns |
|
|
112
|
+
| yandex.cloud.endpoint | endpoint |
|
|
113
|
+
| yandex.cloud.iam | iam |
|
|
114
|
+
| yandex.cloud.iot.devices | iot-devices |
|
|
115
|
+
| yandex.cloud.k8s | managed-kubernetes |
|
|
116
|
+
| yandex.cloud.kms | kms |
|
|
117
|
+
| yandex.cloud.kms.v1.symmetric_crypto_service | kms-crypto |
|
|
118
|
+
| yandex.cloud.loadbalancer | load-balancer |
|
|
119
|
+
| yandex.cloud.loadtesting | loadtesting |
|
|
120
|
+
| yandex.cloud.lockbox.v1.payload_service | lockbox-payload |
|
|
121
|
+
| yandex.cloud.lockbox | lockbox |
|
|
122
|
+
| yandex.cloud.logging.v1.log_ingestion_service | log-ingestion |
|
|
123
|
+
| yandex.cloud.logging.v1.log_reading_service | log-reading |
|
|
124
|
+
| yandex.cloud.logging | logging |
|
|
125
|
+
| yandex.cloud.marketplace | marketplace |
|
|
126
|
+
| yandex.cloud.mdb.clickhouse | managed-clickhouse |
|
|
127
|
+
| yandex.cloud.mdb.elasticsearch | managed-elasticsearch |
|
|
128
|
+
| yandex.cloud.mdb.greenplum | managed-greenplum |
|
|
129
|
+
| yandex.cloud.mdb.kafka | managed-kafka |
|
|
130
|
+
| yandex.cloud.mdb.mongodb | managed-mongodb |
|
|
131
|
+
| yandex.cloud.mdb.mysql | managed-mysql |
|
|
132
|
+
| yandex.cloud.mdb.opensearch | managed-opensearch |
|
|
133
|
+
| yandex.cloud.mdb.postgresql | managed-postgresql |
|
|
134
|
+
| yandex.cloud.mdb.redis | managed-redis |
|
|
135
|
+
| yandex.cloud.mdb.sqlserver | managed-sqlserver |
|
|
136
|
+
| yandex.cloud.operation | operation |
|
|
137
|
+
| yandex.cloud.organizationmanager | organization-manager |
|
|
138
|
+
| yandex.cloud.resourcemanager | resource-manager |
|
|
139
|
+
| yandex.cloud.serverless.apigateway | serverless-apigateway |
|
|
140
|
+
| yandex.cloud.serverless.apigateway.websocket | apigateway-connections |
|
|
141
|
+
| yandex.cloud.serverless.containers | serverless-containers |
|
|
142
|
+
| yandex.cloud.serverless.functions | serverless-functions |
|
|
143
|
+
| yandex.cloud.serverless.triggers | serverless-triggers |
|
|
144
|
+
| yandex.cloud.storage | storage-api |
|
|
145
|
+
| yandex.cloud.vpc | vpc |
|
|
146
|
+
| yandex.cloud.ydb | ydb |
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
#### Override in client
|
|
150
|
+
```python
|
|
151
|
+
from yandex.cloud.vpc.v1.network_service_pb2_grpc import NetworkServiceStub
|
|
152
|
+
from yandexcloud import SDK
|
|
153
|
+
|
|
154
|
+
sdk = SDK(iam_token="t1.9eu...")
|
|
155
|
+
new_network_client_endpoint = "example.new.vpc.very.new.yandex:50051"
|
|
156
|
+
insecure = False # by default is False, but if server does not support verification can be set to True
|
|
157
|
+
network_client = sdk.client(NetworkServiceStub, endpoint=new_network_client_endpoint, insecure=False)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
#### Override in sdk config
|
|
161
|
+
To override endpoints provide dict in format {alias : new-endpoint}
|
|
162
|
+
```python
|
|
163
|
+
from yandex.cloud.vpc.v1.network_service_pb2_grpc import NetworkServiceStub
|
|
164
|
+
from yandexcloud import SDK
|
|
165
|
+
new_network_client_endpoint = "example.new.vpc.very.new.yandex:50051"
|
|
166
|
+
sdk = SDK(iam_token="t1.9eu...", endpoints={"vpc": new_network_client_endpoint})
|
|
167
|
+
insecure = False # by default is False, but if server does not support verification can be set to True
|
|
168
|
+
network_client = sdk.client(NetworkServiceStub, insecure=False)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Notice: if both overrides are used for same endpoint, override by client has priority
|
|
172
|
+
|
|
173
|
+
#### Switch SDK region
|
|
174
|
+
```python
|
|
175
|
+
from yandexcloud import SDK, set_up_yc_api_endpoint
|
|
176
|
+
kz_region_endpoint = "api.yandexcloud.kz"
|
|
177
|
+
# this will make SDK list endpoints from KZ yc installation
|
|
178
|
+
sdk = SDK(iam_token="t1.9eu...", endpoint="api.yandexcloud.kz")
|
|
179
|
+
# or you can use global function
|
|
180
|
+
set_up_yc_api_endpoint(kz_region_endpoint)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Contributing
|
|
184
|
+
### Dependencies
|
|
185
|
+
Use `make deps` command to install library, its production and development dependencies.
|
|
186
|
+
|
|
187
|
+
### Formatting
|
|
188
|
+
Use `make format` to autoformat code with black tool.
|
|
189
|
+
|
|
190
|
+
### Tests
|
|
191
|
+
- `make test` to run tests for current python version
|
|
192
|
+
- `make lint` to run only linters for current python version
|
|
193
|
+
- `make tox-current` to run all checks (tests + code style checks + linters + format check) for current python version
|
|
194
|
+
- `make tox` to run all checks for all supported (installed in your system) python versions
|
|
195
|
+
- `make test-all-versions` to run all checks for all supported python versions in docker container
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### Maintaining
|
|
199
|
+
If pull request consists of several meaningful commits, that should be preserved,
|
|
200
|
+
then use "Rebase and merge" option. Otherwise use "Squash and merge".
|
|
201
|
+
|
|
202
|
+
New release (changelog, tag and pypi upload) will be automatically created
|
|
203
|
+
on each push to master via Github Actions workflow.
|
|
@@ -125,7 +125,7 @@ yandex/cloud/backup/v1/backup_service_pb2.py,sha256=mJneo2t2el6s0hJ_nk8RTyHD07n7
|
|
|
125
125
|
yandex/cloud/backup/v1/backup_service_pb2_grpc.py,sha256=0QkgIaYDv1BIxi4quBWr0bs9Y2FvIieahLeKIkT93y0,14096
|
|
126
126
|
yandex/cloud/backup/v1/policy_pb2.py,sha256=4nDcrGQBo9wILHqoDk1dkWoBXSaGzo2lySx26tFzjhU,17505
|
|
127
127
|
yandex/cloud/backup/v1/policy_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
128
|
-
yandex/cloud/backup/v1/policy_service_pb2.py,sha256=
|
|
128
|
+
yandex/cloud/backup/v1/policy_service_pb2.py,sha256=wtVbhf3hVB14YajQHiUw8QVolFnX1SSJjDil28RthGw,13576
|
|
129
129
|
yandex/cloud/backup/v1/policy_service_pb2_grpc.py,sha256=vWWodKJECsp-fTEYNZR26USE13MLHYv0pkart1GkxkM,17440
|
|
130
130
|
yandex/cloud/backup/v1/provider_service_pb2.py,sha256=JUaaWJxcPxYkkqery7VyrtQ0XaN6UZ8atYhSpQs9WDs,4555
|
|
131
131
|
yandex/cloud/backup/v1/provider_service_pb2_grpc.py,sha256=cLHtA56C8vUyDupL2pap8A-TglSfiO4vGtR28ELrTBQ,4973
|
|
@@ -517,7 +517,7 @@ yandex/cloud/loadtesting/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
517
517
|
yandex/cloud/loadtesting/agent/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
518
518
|
yandex/cloud/loadtesting/agent/v1/agent_pb2.py,sha256=Xq0hfFJs7x6ye8OHMofW0S6-4f8E8F0lADUYUWTlwR0,1388
|
|
519
519
|
yandex/cloud/loadtesting/agent/v1/agent_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
520
|
-
yandex/cloud/loadtesting/agent/v1/agent_registration_service_pb2.py,sha256=
|
|
520
|
+
yandex/cloud/loadtesting/agent/v1/agent_registration_service_pb2.py,sha256=ZHlIxwQLYdA4PRzPAmZnsMb3CItzfussbUUWcVcdjaI,3869
|
|
521
521
|
yandex/cloud/loadtesting/agent/v1/agent_registration_service_pb2_grpc.py,sha256=moASyfSXjEjEr_LYNwgOqOiBlwsYmFuj5Tl0Gy05fxs,5247
|
|
522
522
|
yandex/cloud/loadtesting/agent/v1/agent_service_pb2.py,sha256=X8bdOAx3BVrV_XlzTN3dTyy8yyFtZKvPx5PsQgGi53g,2975
|
|
523
523
|
yandex/cloud/loadtesting/agent/v1/agent_service_pb2_grpc.py,sha256=JuguFIwAzqS4X-_drZyXDf74WBvL5oqW7zIuhs62Z_M,3037
|
|
@@ -645,11 +645,11 @@ yandex/cloud/mdb/clickhouse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
|
645
645
|
yandex/cloud/mdb/clickhouse/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
646
646
|
yandex/cloud/mdb/clickhouse/v1/backup_pb2.py,sha256=lfyHOsVa8LNn-QAcmodvzbebaVIIMXUpVqnMuzRIN64,2135
|
|
647
647
|
yandex/cloud/mdb/clickhouse/v1/backup_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
648
|
-
yandex/cloud/mdb/clickhouse/v1/backup_service_pb2.py,sha256=
|
|
648
|
+
yandex/cloud/mdb/clickhouse/v1/backup_service_pb2.py,sha256=D-5iV4FSXkG0Z2-odPujcgcb25Ti3MEF4hOSJb1W5W0,4584
|
|
649
649
|
yandex/cloud/mdb/clickhouse/v1/backup_service_pb2_grpc.py,sha256=1rSy3hukUrBtibvsG3Vbs6AYgQWL_b6F4mH93nfajJI,5017
|
|
650
650
|
yandex/cloud/mdb/clickhouse/v1/cluster_pb2.py,sha256=boCVy6jLWxC56w_J3b9LHAEZ2dSNg0790Vw6RfWMySM,10482
|
|
651
651
|
yandex/cloud/mdb/clickhouse/v1/cluster_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
652
|
-
yandex/cloud/mdb/clickhouse/v1/cluster_service_pb2.py,sha256=
|
|
652
|
+
yandex/cloud/mdb/clickhouse/v1/cluster_service_pb2.py,sha256=x4gius547qPIwpiIuY9Xieu7CG7_p33Qu12hvIyk8C4,70518
|
|
653
653
|
yandex/cloud/mdb/clickhouse/v1/cluster_service_pb2_grpc.py,sha256=JZHS7w2DQIyu2CaKwfh_Pr7g2iZ23b1nwChDtpogQX4,68094
|
|
654
654
|
yandex/cloud/mdb/clickhouse/v1/database_pb2.py,sha256=W8EAjYIT6xzeB8ynSllZB6HzyatgT3d25iJChF-UaUc,1942
|
|
655
655
|
yandex/cloud/mdb/clickhouse/v1/database_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -731,9 +731,9 @@ yandex/cloud/mdb/greenplum/v1/host_pb2.py,sha256=xl2CK-SREHH4S5ahusulSjKsJcfGPb-
|
|
|
731
731
|
yandex/cloud/mdb/greenplum/v1/host_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
732
732
|
yandex/cloud/mdb/greenplum/v1/maintenance_pb2.py,sha256=xFDBaeOAqrX1jPuiUwCqbuCdE1Rm5BK2-I4YIVY6sr0,3488
|
|
733
733
|
yandex/cloud/mdb/greenplum/v1/maintenance_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
734
|
-
yandex/cloud/mdb/greenplum/v1/pxf_pb2.py,sha256=
|
|
734
|
+
yandex/cloud/mdb/greenplum/v1/pxf_pb2.py,sha256=f8Ej23EtIclG8q0269oXgKjXnp9hKfpTJFnc_dK8sKc,19564
|
|
735
735
|
yandex/cloud/mdb/greenplum/v1/pxf_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
736
|
-
yandex/cloud/mdb/greenplum/v1/pxf_service_pb2.py,sha256=
|
|
736
|
+
yandex/cloud/mdb/greenplum/v1/pxf_service_pb2.py,sha256=VnNUysgE155jB5OYcLQEx_oHynkkRHSEagQ6A2I15qs,9408
|
|
737
737
|
yandex/cloud/mdb/greenplum/v1/pxf_service_pb2_grpc.py,sha256=Pu84aIG5uzGrTo23GxOlzjjCWiaN45GJx8cFfdKK8zo,8494
|
|
738
738
|
yandex/cloud/mdb/greenplum/v1/resource_preset_pb2.py,sha256=PNMoewECFD1nBdRjbcTalZihDfBu1LxzUAzICbNi4ps,1994
|
|
739
739
|
yandex/cloud/mdb/greenplum/v1/resource_preset_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -1109,9 +1109,9 @@ yandex/cloud/resourcemanager/v1/folder_service_pb2_grpc.py,sha256=KHrjJf8OgsDKGQ
|
|
|
1109
1109
|
yandex/cloud/serverless/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1110
1110
|
yandex/cloud/serverless/apigateway/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1111
1111
|
yandex/cloud/serverless/apigateway/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1112
|
-
yandex/cloud/serverless/apigateway/v1/apigateway_pb2.py,sha256=
|
|
1112
|
+
yandex/cloud/serverless/apigateway/v1/apigateway_pb2.py,sha256=r-xvT3Ufl3s9ofNYVdW-w2j04-m6AdGmgWXEdYYBpRY,6441
|
|
1113
1113
|
yandex/cloud/serverless/apigateway/v1/apigateway_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
1114
|
-
yandex/cloud/serverless/apigateway/v1/apigateway_service_pb2.py,sha256=
|
|
1114
|
+
yandex/cloud/serverless/apigateway/v1/apigateway_service_pb2.py,sha256=6Yv0wUiaMMxA6qNNapnT7Og3vVdVC7faGlpJUEQ6c0Q,21450
|
|
1115
1115
|
yandex/cloud/serverless/apigateway/v1/apigateway_service_pb2_grpc.py,sha256=xo2ISd8OqwHtbtWPHTg7vf8cPT5VCCQJnnQjYVSyu0I,24696
|
|
1116
1116
|
yandex/cloud/serverless/apigateway/websocket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1117
1117
|
yandex/cloud/serverless/apigateway/websocket/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -1235,22 +1235,22 @@ yandex/cloud/ydb/v1/storage_type_pb2.py,sha256=Y7KzpsgrWOmo2TlW2aluwRg0Xw2i3Jy-s
|
|
|
1235
1235
|
yandex/cloud/ydb/v1/storage_type_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
1236
1236
|
yandex/cloud/ydb/v1/storage_type_service_pb2.py,sha256=cTajsoT_mKDO5p_4HQOgvjTdz7XqRdjtWi3xK9eY6tI,3723
|
|
1237
1237
|
yandex/cloud/ydb/v1/storage_type_service_pb2_grpc.py,sha256=3156bynSw7aG4iU-Wbjuwt8ivF41QoiLNyOslnX_TKo,4791
|
|
1238
|
-
yandexcloud/__init__.py,sha256=
|
|
1239
|
-
yandexcloud/_auth_fabric.py,sha256=
|
|
1238
|
+
yandexcloud/__init__.py,sha256=NQG4NAbBlUJGEt15OlUA3RZbW2wD9vjkwhp1Hu-DRUU,360
|
|
1239
|
+
yandexcloud/_auth_fabric.py,sha256=o5Rrk0O7cNaLZRHk0Xc2aMj4DcUdUwmCReRWKpR3ZaU,4717
|
|
1240
1240
|
yandexcloud/_auth_plugin.py,sha256=DHYliuD3PYPfONOcmTpJoDNFKfgwsQbe0z3N7d44A6A,2709
|
|
1241
1241
|
yandexcloud/_backoff.py,sha256=ptd32-4wNNlZBexi34GIbI2DKxQILHWq_mVSgTdO_3I,956
|
|
1242
|
-
yandexcloud/_channels.py,sha256=
|
|
1242
|
+
yandexcloud/_channels.py,sha256=nf6Y64RhW0gb_7fg_HLzIafbRnkpQrQF3Lp2egA5BIA,4588
|
|
1243
1243
|
yandexcloud/_helpers.py,sha256=wtkkvklZYnFSTl9ge16ryR-e9kyeWOlSFCBpoL-f3-g,3388
|
|
1244
1244
|
yandexcloud/_operation_waiter.py,sha256=Fg2BRdOpVZwD5QQDUTlWTseclsjkwcEn3fyAH7bezDo,4160
|
|
1245
1245
|
yandexcloud/_retry_interceptor.py,sha256=W7JVatSB8bGwinUH4Bq2URbticG2atVuYhceivuUJwc,6518
|
|
1246
|
-
yandexcloud/_sdk.py,sha256=
|
|
1247
|
-
yandexcloud/auth.py,sha256=
|
|
1246
|
+
yandexcloud/_sdk.py,sha256=vlYJFETnma6dTImt72GNuzADMPLhE495WjnB5ck9bNo,6118
|
|
1247
|
+
yandexcloud/auth.py,sha256=klB0yFOImdZKcHpAwIxNJib7CsSpTN0eC2r9kLkf7C0,842
|
|
1248
1248
|
yandexcloud/operations.py,sha256=ajTQtALe76_77uYVCUPQ2KAkRRhdmjqbt-jFIVKNULg,448
|
|
1249
1249
|
yandexcloud/_wrappers/__init__.py,sha256=_GdM0-eMpcQCmyNHlnqTHpLzN0riBLaq-ACVavLNSrM,251
|
|
1250
1250
|
yandexcloud/_wrappers/dataproc/__init__.py,sha256=3YXJfktefML0KRNMtTFXncbswIdd9yBlqQkhDqclang,33215
|
|
1251
|
-
yandexcloud-0.
|
|
1252
|
-
yandexcloud-0.
|
|
1253
|
-
yandexcloud-0.
|
|
1254
|
-
yandexcloud-0.
|
|
1255
|
-
yandexcloud-0.
|
|
1256
|
-
yandexcloud-0.
|
|
1251
|
+
yandexcloud-0.288.0.dist-info/AUTHORS,sha256=BYzvivX5Y67xcqFAJhmqcKy5UwHCngxlnDt4i_PhNO4,264
|
|
1252
|
+
yandexcloud-0.288.0.dist-info/LICENSE,sha256=AFcOYhNOyuBQP89lObqyipdScN2KUUS-OuWoUlVo6yE,1077
|
|
1253
|
+
yandexcloud-0.288.0.dist-info/METADATA,sha256=S1WOhVftPkohA9zHh0w1NSEH2QkMSyUMUcY146zsybA,10394
|
|
1254
|
+
yandexcloud-0.288.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
1255
|
+
yandexcloud-0.288.0.dist-info/top_level.txt,sha256=p6aBMPGD526A1jM2WVnAneI2qO4kGDWeJi6uwYApDqg,19
|
|
1256
|
+
yandexcloud-0.288.0.dist-info/RECORD,,
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: yandexcloud
|
|
3
|
-
Version: 0.286.0
|
|
4
|
-
Summary: The Yandex.Cloud official SDK
|
|
5
|
-
Home-page: https://github.com/yandex-cloud/python-sdk
|
|
6
|
-
Author: Yandex LLC
|
|
7
|
-
Author-email: cloud@support.yandex.ru
|
|
8
|
-
License: MIT
|
|
9
|
-
Classifier: Programming Language :: Python
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
License-File: LICENSE
|
|
18
|
-
License-File: AUTHORS
|
|
19
|
-
Requires-Dist: cryptography >=2.8
|
|
20
|
-
Requires-Dist: grpcio >=1.59.3
|
|
21
|
-
Requires-Dist: protobuf >=4.23.4
|
|
22
|
-
Requires-Dist: googleapis-common-protos >=1.59.1
|
|
23
|
-
Requires-Dist: pyjwt >=1.7.1
|
|
24
|
-
Requires-Dist: requests >=2.22.0
|
|
25
|
-
Requires-Dist: six >=1.14.0
|
|
26
|
-
|
|
27
|
-
[![PyPI Version][pypi-image]][pypi-url]
|
|
28
|
-
[![Build Status][build-image]][build-url]
|
|
29
|
-
[![License][license-image]][license-url]
|
|
30
|
-
|
|
31
|
-
<!-- Badges -->
|
|
32
|
-
|
|
33
|
-
[pypi-image]: https://img.shields.io/pypi/v/yandexcloud
|
|
34
|
-
[pypi-url]: https://pypi.org/project/yandexcloud/
|
|
35
|
-
[build-image]: https://github.com/yandex-cloud/python-sdk/actions/workflows/run-tests.yml/badge.svg
|
|
36
|
-
[build-url]: https://github.com/yandex-cloud/python-sdk/actions/workflows/run-tests.yml
|
|
37
|
-
[license-image]: https://img.shields.io/github/license/yandex-cloud/python-sdk.svg
|
|
38
|
-
[license-url]: https://github.com/yandex-cloud/python-sdk/blob/master/LICENSE
|
|
39
|
-
|
|
40
|
-
# Yandex.Cloud SDK (Python)
|
|
41
|
-
|
|
42
|
-
Need to automate your infrastructure or use services provided by Yandex.Cloud? We've got you covered.
|
|
43
|
-
|
|
44
|
-
Installation:
|
|
45
|
-
|
|
46
|
-
pip install yandexcloud
|
|
47
|
-
|
|
48
|
-
## Getting started
|
|
49
|
-
|
|
50
|
-
There are several options for authorization your requests - OAuth Token,
|
|
51
|
-
Metadata Service (if you're executing your code inside VMs or Cloud Functions
|
|
52
|
-
running in Yandex.Cloud), Service Account Keys, and externally created IAM tokens.
|
|
53
|
-
|
|
54
|
-
### OAuth Token
|
|
55
|
-
|
|
56
|
-
```python
|
|
57
|
-
sdk = yandexcloud.SDK(token='AQAD-.....')
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Metadata Service
|
|
61
|
-
|
|
62
|
-
Don't forget to assign Service Account for your Instance or Function and grant required roles.
|
|
63
|
-
|
|
64
|
-
```python
|
|
65
|
-
sdk = yandexcloud.SDK()
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Service Account Keys
|
|
69
|
-
|
|
70
|
-
```python
|
|
71
|
-
# you can store and read it from JSON file
|
|
72
|
-
sa_key = {
|
|
73
|
-
"id": "...",
|
|
74
|
-
"service_account_id": "...",
|
|
75
|
-
"private_key": "..."
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
sdk = yandexcloud.SDK(service_account_key=sa_key)
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### IAM tokens
|
|
82
|
-
|
|
83
|
-
```python
|
|
84
|
-
sdk = yandexcloud.SDK(iam_token="t1.9eu...")
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Check `examples` directory for more examples.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## Contributing
|
|
91
|
-
### Dependencies
|
|
92
|
-
Use `make deps` command to install library, its production and development dependencies.
|
|
93
|
-
|
|
94
|
-
### Formatting
|
|
95
|
-
Use `make format` to autoformat code with black tool.
|
|
96
|
-
|
|
97
|
-
### Tests
|
|
98
|
-
- `make test` to run tests for current python version
|
|
99
|
-
- `make lint` to run only linters for current python version
|
|
100
|
-
- `make tox-current` to run all checks (tests + code style checks + linters + format check) for current python version
|
|
101
|
-
- `make tox` to run all checks for all supported (installed in your system) python versions
|
|
102
|
-
- `make test-all-versions` to run all checks for all supported python versions in docker container
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### Maintaining
|
|
106
|
-
If pull request consists of several meaningful commits, that should be preserved,
|
|
107
|
-
then use "Rebase and merge" option. Otherwise use "Squash and merge".
|
|
108
|
-
|
|
109
|
-
New release (changelog, tag and pypi upload) will be automatically created
|
|
110
|
-
on each push to master via Github Actions workflow.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|