As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Client Information Helpers

Helpers for providing client information.

Client information is used to send information about the calling client, such as the library and Python version, to API services.

class google.api_core.client_info.ClientInfo(python_version='3.10.14', grpc_version='1.67.0', api_core_version='2.23.0rc0', gapic_version=None, client_library_version=None, user_agent=None, rest_version=None)[source]

Bases: object

Client information used to generate a user-agent for API calls.

This user-agent information is sent along with API calls to allow the receiving service to do analytics on which versions of Python and Google libraries are being used.

Parameters
  • python_version (str) – The Python interpreter version, for example, '3.9.6'.

  • grpc_version (Optional[str]) – The gRPC library version.

  • api_core_version (str) – The google-api-core library version.

  • gapic_version (Optional[str]) – The version of gapic-generated client library, if the library was generated by gapic.

  • client_library_version (Optional[str]) – The version of the client library, generally used if the client library was not generated by gapic or if additional functionality was built on top of a gapic client library.

  • user_agent (Optional[str]) – Prefix to the user agent header. This is used to supply information such as application name or partner tool. Recommended format: application-or-tool-ID/major.minor.version.

  • rest_version (Optional[str]) – A string with labeled versions of the dependencies used for REST transport.

to_user_agent()[source]

Returns the user-agent string for this client info.

Helpers for providing client information.

Client information is used to send information about the calling client, such as the library and Python version, to API services.

class google.api_core.gapic_v1.client_info.ClientInfo(python_version='3.10.14', grpc_version='1.67.0', api_core_version='2.23.0rc0', gapic_version=None, client_library_version=None, user_agent=None, rest_version=None)[source]

Bases: google.api_core.client_info.ClientInfo

Client information used to generate a user-agent for API calls.

This user-agent information is sent along with API calls to allow the receiving service to do analytics on which versions of Python and Google libraries are being used.

Parameters
  • python_version (str) – The Python interpreter version, for example, '3.9.6'.

  • grpc_version (Optional[str]) – The gRPC library version.

  • api_core_version (str) – The google-api-core library version.

  • gapic_version (Optional[str]) – The version of gapic-generated client library, if the library was generated by gapic.

  • client_library_version (Optional[str]) – The version of the client library, generally used if the client library was not generated by gapic or if additional functionality was built on top of a gapic client library.

  • user_agent (Optional[str]) – Prefix to the user agent header. This is used to supply information such as application name or partner tool. Recommended format: application-or-tool-ID/major.minor.version.

  • rest_version (Optional[str]) – A string with labeled versions of the dependencies used for REST transport.

to_grpc_metadata()[source]

Returns the gRPC metadata for this client info.