当前位置: 首页>>代码示例>>Python>>正文


Python botocore.__version__方法代码示例

本文整理汇总了Python中botocore.__version__方法的典型用法代码示例。如果您正苦于以下问题:Python botocore.__version__方法的具体用法?Python botocore.__version__怎么用?Python botocore.__version__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在botocore的用法示例。


在下文中一共展示了botocore.__version__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_patches

# 需要导入模块: import botocore [as 别名]
# 或者: from botocore import __version__ [as 别名]
def test_patches():
    print("Botocore version: {} aiohttp version: {}".format(
        botocore.__version__, aiohttp.__version__))

    success = True
    for obj, digests in chain(_AIOHTTP_DIGESTS.items(), _API_DIGESTS.items()):
        digest = hashlib.sha1(getsource(obj).encode('utf-8')).hexdigest()
        if digest not in digests:
            print("Digest of {}:{} not found in: {}".format(
                obj.__qualname__, digest, digests))
            success = False

    assert success


# NOTE: this doesn't require moto but needs to be marked to run with coverage 
开发者ID:aio-libs,项目名称:aiobotocore,代码行数:18,代码来源:test_patches.py

示例2: determine_prefix

# 需要导入模块: import botocore [as 别名]
# 或者: from botocore import __version__ [as 别名]
def determine_prefix():
    """Placeholder docstring"""
    prefix = "AWS-SageMaker-Python-SDK/{} Python/{} {}/{} Boto3/{} Botocore/{}".format(
        SDK_VERSION, PYTHON_VERSION, OS_NAME, OS_VERSION, boto3.__version__, botocore.__version__
    )

    try:
        with open("/etc/opt/ml/sagemaker-notebook-instance-version.txt") as sagemaker_nbi_file:
            prefix = "AWS-SageMaker-Notebook-Instance/{} {}".format(
                sagemaker_nbi_file.read().strip(), prefix
            )
    except IOError:
        # This file isn't expected to always exist, and we DO want to silently ignore failures.
        pass

    return prefix 
开发者ID:aws,项目名称:sagemaker-python-sdk,代码行数:18,代码来源:user_agent.py

示例3: _get_botocore_session

# 需要导入模块: import botocore [as 别名]
# 或者: from botocore import __version__ [as 别名]
def _get_botocore_session():
    if _get_botocore_session.botocore_session is None:
        LOG.debug('Creating new Botocore Session')
        LOG.debug('Botocore version: {0}'.format(botocore.__version__))
        session = botocore.session.get_session({
            'profile': (None, _profile_env_var, _profile, None),
        })
        session.set_config_variable('region', _region_name)
        session.set_config_variable('profile', _profile)
        session.register_component('data_loader', _get_data_loader())
        _set_user_agent_for_session(session)
        _get_botocore_session.botocore_session = session
        if _debug:
            session.set_debug_logger()

    return _get_botocore_session.botocore_session 
开发者ID:QData,项目名称:deepWordBug,代码行数:18,代码来源:aws.py

示例4: show_version

# 需要导入模块: import botocore [as 别名]
# 或者: from botocore import __version__ [as 别名]
def show_version():
    """ display version information and then exit """
    import os
    import inspect
    import awscli
    import boto3
    import botocore
    import subprocess
    print("aws_with version: {}".format(sys.modules["aws_with"].VERSION))
    print("aws_with key libraries:")
    print("    aws {} from {}".format(
        subprocess.check_output(['aws','--version'], stderr=subprocess.STDOUT).replace('\n',''),
        subprocess.check_output(['which','aws']).replace('\n','')
    ))
    print("    awscli {} from {}".format(awscli.__version__, os.path.dirname(inspect.getfile(awscli))))
    print("    boto3 {} from {}".format(boto3.__version__, os.path.dirname(inspect.getfile(boto3))))
    print("    botocore {} from {}".format(botocore.__version__, os.path.dirname(inspect.getfile(botocore))))
    print("    python {} from {}".format(sys.version.replace('\n',''), sys.executable))
    sys.exit(0) 
开发者ID:aws-samples,项目名称:aws-with,代码行数:21,代码来源:cli.py

示例5: version_command

# 需要导入模块: import botocore [as 别名]
# 或者: from botocore import __version__ [as 别名]
def version_command(self) -> None:
        print('tomodachi/{}'.format(tomodachi.__version__))
        sys.exit(0) 
开发者ID:kalaspuff,项目名称:tomodachi,代码行数:5,代码来源:__init__.py


注:本文中的botocore.__version__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。