1

How do I use the GCP enum Text​Annotation.​Types.​Detected​Break.​Types.​Break​Type in my python code? I assume I import it somehow, but do not know how.

Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
schoon
  • 2,858
  • 3
  • 46
  • 78

1 Answers1

1

It looks like you're linking to the .NET docs, but asking about Python. If you want to use these enums from Python, you'll first need to install the Google Cloud Vision client library from PyPI:

$ pip install google-cloud-vision

Then you can access the enums like this:

>>> from google.cloud import vision
>>> vision.TextAnnotation.DetectedBreak.BreakType
<enum 'BreakType'>
Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
  • Thanks. Do you know how I could tell `vision.TextAnnotation.DetectedBreak.BreakType` is part of the `vision` package? In other words, where it is documented? – schoon Nov 22 '20 at 10:00
  • Ah [here](https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Vision.V1/api/Google.Cloud.Vision.V1.TextAnnotation.Types.DetectedBreak.Types.BreakType.html) – schoon Nov 22 '20 at 10:12