File size: 240 Bytes
1b64148
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from typing import Literal, Protocol

Kind = Literal["pdf", "image"]


class TextExtractor(Protocol):
    """Contrato de extracao de texto de documentos (PDF ou imagem)."""

    def extract(self, path: str, kind: Kind) -> str: ...