main
Class info¶
🛈 DocStrings¶
FastAPI server for docler document conversion library.
api_chunkers
async
¶
api_convert
async
¶
api_convert(
file: Annotated[UploadFile, File(description="The document file to convert")],
converter: Annotated[str, Form(description="Converter configuration JSON")],
chunker: Annotated[
str | None, Form(description="Chunker configuration JSON; chunks the document")
] = None,
pdf_password: Annotated[
str | None, Form(description="Password for encrypted PDF files")
] = None,
images: Annotated[
ImagesMode, Form(description="`inline`: base64, each image once; `none`: no image data")
] = "inline",
) -> ConvertResponse
Convert a document to markdown, and chunk it when a chunker config is given.
Source code in src/docler_api/main.py
api_converters
async
¶
api_pdf_metadata
async
¶
api_pdf_metadata(
file: Annotated[UploadFile, File(description="The PDF file to analyze")],
pdf_password: Annotated[
str | None, Form(description="Password for encrypted PDF files")
] = None,
) -> PageMetadata
Get PDF metadata including page count and document information.
Source code in src/docler_api/main.py
create_app
¶
create_app(settings: ApiSettings | None = None) -> FastAPI
Create the API app.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
ApiSettings | None
|
Server settings; read from the environment ( |
None
|