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.7.0b3', grpc_version='1.22.0', api_core_version='1.14.0', gapic_version=None, client_library_version=None, user_agent=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, '2.7.13'.

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

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

  • gapic_version (Optional[str]) – The sversion 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.

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.7.0b3', grpc_version='1.22.0', api_core_version='1.14.0', gapic_version=None, client_library_version=None, user_agent=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, '2.7.13'.

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

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

  • gapic_version (Optional[str]) – The sversion 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.

to_grpc_metadata()[source]

Returns the gRPC metadata for this client info.