MCPcopy Create free account
hub / github.com/aws/aws-cli / _build_language_metadata

Method _build_language_metadata

awscli/botocore/useragent.py:513–531  ·  view source on GitHub ↗

Build the language components of the User-Agent header string. Returns the Python version in a component with prefix "lang" and name "python". The Python implementation (e.g. CPython, PyPy) is returned as separate metadata component with prefix "md" and name "pyimpl

(self)

Source from the content-addressed store, hash-verified

511 return []
512
513 def _build_language_metadata(self):
514 """
515 Build the language components of the User-Agent header string.
516
517 Returns the Python version in a component with prefix "lang" and name
518 "python". The Python implementation (e.g. CPython, PyPy) is returned as
519 separate metadata component with prefix "md" and name "pyimpl".
520
521 String representation of an example return value:
522 ``lang/python#3.10.4 md/pyimpl#CPython``
523 """
524 lang_md = [
525 UserAgentComponent('lang', 'python', self._python_version),
526 ]
527 if self._python_implementation:
528 lang_md.append(
529 UserAgentComponent('md', 'pyimpl', self._python_implementation)
530 )
531 return lang_md
532
533 def _build_execution_env_metadata(self):
534 """

Callers 1

to_stringMethod · 0.95

Calls 1

UserAgentComponentClass · 0.85

Tested by

no test coverage detected