yandexcloud 0.276.0__py3-none-any.whl → 0.277.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.
yandexcloud/auth.py ADDED
@@ -0,0 +1,13 @@
1
+ from yandex.cloud.iam.v1.iam_token_service_pb2_grpc import IamTokenServiceStub
2
+ from yandexcloud import SDK
3
+ from yandexcloud._auth_fabric import MetadataAuth, get_auth_token_requester
4
+
5
+
6
+ def get_auth_token(token=None, service_account_key=None, iam_token=None, metadata_addr=None):
7
+ requester = get_auth_token_requester(token, service_account_key, iam_token, metadata_addr)
8
+ if isinstance(requester, MetadataAuth):
9
+ return requester.get_token()
10
+
11
+ sdk = SDK()
12
+ client = sdk.client(IamTokenServiceStub)
13
+ return client.Create(requester.get_token_request()).iam_token
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: yandexcloud
3
- Version: 0.276.0
3
+ Version: 0.277.0
4
4
  Summary: The Yandex.Cloud official SDK
5
5
  Home-page: https://github.com/yandex-cloud/python-sdk
6
6
  Author: Yandex LLC
@@ -1242,12 +1242,13 @@ yandexcloud/_helpers.py,sha256=wtkkvklZYnFSTl9ge16ryR-e9kyeWOlSFCBpoL-f3-g,3388
1242
1242
  yandexcloud/_operation_waiter.py,sha256=Fg2BRdOpVZwD5QQDUTlWTseclsjkwcEn3fyAH7bezDo,4160
1243
1243
  yandexcloud/_retry_interceptor.py,sha256=W7JVatSB8bGwinUH4Bq2URbticG2atVuYhceivuUJwc,6518
1244
1244
  yandexcloud/_sdk.py,sha256=lPI6MwfXDFhhhmaQgM_4YQ1gPoInI9rBwAWDBgXM1sQ,5843
1245
+ yandexcloud/auth.py,sha256=gls3R5T1iii8BJLubsS9U2kbpQSZ0FquoX0Uf1ksNK4,583
1245
1246
  yandexcloud/operations.py,sha256=ajTQtALe76_77uYVCUPQ2KAkRRhdmjqbt-jFIVKNULg,448
1246
1247
  yandexcloud/_wrappers/__init__.py,sha256=_GdM0-eMpcQCmyNHlnqTHpLzN0riBLaq-ACVavLNSrM,251
1247
1248
  yandexcloud/_wrappers/dataproc/__init__.py,sha256=3YXJfktefML0KRNMtTFXncbswIdd9yBlqQkhDqclang,33215
1248
- yandexcloud-0.276.0.dist-info/AUTHORS,sha256=BYzvivX5Y67xcqFAJhmqcKy5UwHCngxlnDt4i_PhNO4,264
1249
- yandexcloud-0.276.0.dist-info/LICENSE,sha256=AFcOYhNOyuBQP89lObqyipdScN2KUUS-OuWoUlVo6yE,1077
1250
- yandexcloud-0.276.0.dist-info/METADATA,sha256=bSrzgKKuzmABoNCsGNwf8cGAVGbHTlAFLqQfrUb4NFg,846
1251
- yandexcloud-0.276.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1252
- yandexcloud-0.276.0.dist-info/top_level.txt,sha256=p6aBMPGD526A1jM2WVnAneI2qO4kGDWeJi6uwYApDqg,19
1253
- yandexcloud-0.276.0.dist-info/RECORD,,
1249
+ yandexcloud-0.277.0.dist-info/AUTHORS,sha256=BYzvivX5Y67xcqFAJhmqcKy5UwHCngxlnDt4i_PhNO4,264
1250
+ yandexcloud-0.277.0.dist-info/LICENSE,sha256=AFcOYhNOyuBQP89lObqyipdScN2KUUS-OuWoUlVo6yE,1077
1251
+ yandexcloud-0.277.0.dist-info/METADATA,sha256=nNkv_W2MZgDTFVZWjexzPCvkQ9U99mYC-vZ9-i2ewxI,846
1252
+ yandexcloud-0.277.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1253
+ yandexcloud-0.277.0.dist-info/top_level.txt,sha256=p6aBMPGD526A1jM2WVnAneI2qO4kGDWeJi6uwYApDqg,19
1254
+ yandexcloud-0.277.0.dist-info/RECORD,,