plaid2.model.document_analysis module
- class plaid2.model.document_analysis.DocumentAnalysis(*, authenticity: str, image_quality: str, extracted_data: Optional[PhysicalDocumentExtractedDataAnalysis] = None)[source]
Bases:
BaseModel
- authenticity: str
High level summary of whether the document in the provided image matches the formatting rules and security checks for the associated jurisdiction.
For example, most identity documents have formatting rules like the following:
The image of the person’s face must have a certain contrast in order to highlight skin tone
The subject in the document’s image must remove eye glasses and pose in a certain way
The informational fields (name, date of birth, ID number, etc.) must be colored and aligned according to specific rules
Security features like watermarks and background patterns must be present
So a match status for this field indicates that the document in the provided image seems to conform to the various formatting and security rules associated with the detected document.
- dict(**kwargs: Any) Dict[str, Any] [source]
Return a dict representation of the object. Takes same keyword arguments as pydantic.BaseModel.dict
- extracted_data: Optional[PhysicalDocumentExtractedDataAnalysis]
Analysis of the data extracted from the submitted document.
- image_quality: str
A high level description of the quality of the image the user submitted.
For example, an image that is blurry, distorted by glare from a nearby light source, or improperly framed might be marked as low or medium quality. Poor quality images are more likely to fail OCR and/or template conformity checks.
Note: By default, Plaid will let a user recapture document images twice before failing the entire session if we attribute the failure to low image quality.
- json(**kwargs: Any) str [source]
Return a json string representation of the object. Takes same keyword arguments as pydantic.BaseModel.json
- classmethod parse_obj(data: Any) DocumentAnalysis [source]
Parse a dict into the object. Takes same keyword arguments as pydantic.BaseModel.parse_obj
- classmethod parse_raw(b: Union[bytes, str], **kwargs: Any) DocumentAnalysis [source]
Parse a json string into the object. Takes same keyword arguments as pydantic.BaseModel.parse_raw