Client for interacting with the Google Cloud Vision API.
Client(project=None, credentials=None, _http=None, _use_grpc=None)#
Client to bundle configuration needed for API requests.
- project (str) – the project which the client acts on behalf of. If not passed, falls back to the default inferred from the environment.
- credentials (
Credentials) – (Optional) The OAuth2 Credentials to use for this client. If not passed (and if no
_httpobject is passed), falls back to the default inferred from the environment.
- _http (
Http) – (Optional) HTTP object to make requests. Can be any object that defines
request()with the same interface as
request(). If not passed, an
_httpobject is created that is bound to the
credentialsfor the current object. This parameter should be considered private, and could change in the future.
- _use_grpc (bool) – (Optional) Explicitly specifies whether
to use the gRPC transport (via GAX) or HTTP. If unset,
falls back to the
GOOGLE_CLOUD_DISABLE_GRPCenvironment variable. This parameter should be considered private, and could change in the future.
The scopes required for authenticating as a Cloud Vision consumer.
Batch multiple images into a single API request.
Returns: Instance of
image(content=None, filename=None, source_uri=None)#
Get instance of Image using current client.
Parameters: Return type: Returns:
Image instance with the current client attached.