Python botocore.__version__() Examples
The following are 6
code examples of botocore.__version__().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
botocore
, or try the search function
.
Example #1
Source File: test_patches.py From aiobotocore with Apache License 2.0 | 6 votes |
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
Example #2
Source File: user_agent.py From sagemaker-python-sdk with Apache License 2.0 | 6 votes |
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
Example #3
Source File: aws.py From deepWordBug with Apache License 2.0 | 6 votes |
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
Example #4
Source File: cli.py From aws-with with Apache License 2.0 | 6 votes |
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)
Example #5
Source File: aws.py From aws-elastic-beanstalk-cli with Apache License 2.0 | 6 votes |
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
Example #6
Source File: __init__.py From tomodachi with MIT License | 5 votes |
def version_command(self) -> None: print('tomodachi/{}'.format(tomodachi.__version__)) sys.exit(0)