pangukitsappdev.api.doc_split package¶
Submodules¶
pangukitsappdev.api.doc_split.base module¶
- class pangukitsappdev.api.doc_split.base.AbstractLoaderApi(split_config: SplitConfig)¶
基类:
LoaderApi
,ABC
- lazy_load() Iterator[Document] ¶
A lazy loader for Documents.
- abstract load() List[Document] ¶
实现类方法 :return: 解析分割后的document列表
pangukitsappdev.api.doc_split.factory module¶
- class pangukitsappdev.api.doc_split.factory.DocSplits¶
基类:
object
- classmethod of(split_name: str, split_config: Optional[SplitConfig] = None) LoaderApi ¶
根据名字创建一个LoaderApi的实现类 :param split_name: split的名字,唯一标识一种分割 :param split_config: (Optional)split的相关配置,如果不传递则从默认配置文件中或者环境变量中获取 :return: LoaderApi
pangukitsappdev.api.doc_split.split_config module¶
- class pangukitsappdev.api.doc_split.split_config.SplitConfig(_env_file: Optional[Union[str, PathLike, List[Union[str, PathLike]], Tuple[Union[str, PathLike], ...]]] = '<object object>', _env_file_encoding: Optional[str] = None, _env_nested_delimiter: Optional[str] = None, _secrets_dir: Optional[Union[str, PathLike]] = None, *, css_url: Optional[str] = None, file_path: Optional[str] = None, file_name: Optional[str] = None, mode: Optional[int] = 0, iam_config: IAMConfig = None, http_config: HttpConfig = None)¶
-
文档解析相关配置 Attributes:
css_url: 文档解析地址 file_path: 文件路径 file_name: 文件名 mode: 拆分模式 iam_config: 文档解析iam_config http_config: split使用http_config
- css_url: Optional[str]¶
- file_name: Optional[str]¶
- file_path: Optional[str]¶
- http_config: HttpConfig¶
- mode: Optional[int]¶
- result_url(task_id)¶
- upload_url()¶