Files
omniread/docs/mcp/modules/omniread.xlsx.parser.json

134 lines
7.7 KiB
JSON

{
"module": "omniread.xlsx.parser",
"content": {
"path": "omniread.xlsx.parser",
"docstring": "# Summary\n\nXLSX parser implementations for OmniRead.\n\nThis module provides a concrete, generic parser for Office Open XML\nspreadsheets. It exposes workbook sheets as lists of string rows so\ndownstream consumers can interpret tabular content without depending on\nopenpyxl directly.\n\nThe parser is intentionally statement-agnostic: it performs no header\ndetection or column interpretation beyond basic cell normalization.",
"objects": {
"datetime": {
"name": "datetime",
"kind": "alias",
"path": "omniread.xlsx.parser.datetime",
"signature": "<bound method Alias.signature of Alias('datetime', 'datetime')>",
"docstring": null
},
"BytesIO": {
"name": "BytesIO",
"kind": "alias",
"path": "omniread.xlsx.parser.BytesIO",
"signature": "<bound method Alias.signature of Alias('BytesIO', 'io.BytesIO')>",
"docstring": null
},
"Any": {
"name": "Any",
"kind": "alias",
"path": "omniread.xlsx.parser.Any",
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
"docstring": null
},
"openpyxl": {
"name": "openpyxl",
"kind": "alias",
"path": "omniread.xlsx.parser.openpyxl",
"signature": "<bound method Alias.signature of Alias('openpyxl', 'openpyxl')>",
"docstring": null
},
"Content": {
"name": "Content",
"kind": "class",
"path": "omniread.xlsx.parser.Content",
"signature": "<bound method Alias.signature of Alias('Content', 'omniread.core.content.Content')>",
"docstring": "Normalized representation of extracted content.\n\nNotes:\n **Responsibilities:**\n\n - A `Content` instance represents a raw content payload along with\n minimal contextual metadata describing its origin and type.\n - This class is the primary exchange format between scrapers,\n parsers, and downstream consumers.",
"members": {
"raw": {
"name": "raw",
"kind": "attribute",
"path": "omniread.xlsx.parser.Content.raw",
"signature": "<bound method Alias.signature of Alias('raw', 'omniread.core.content.Content.raw')>",
"docstring": "Raw content bytes as retrieved from the source."
},
"source": {
"name": "source",
"kind": "attribute",
"path": "omniread.xlsx.parser.Content.source",
"signature": "<bound method Alias.signature of Alias('source', 'omniread.core.content.Content.source')>",
"docstring": "Identifier of the content origin (URL, file path, or logical name)."
},
"content_type": {
"name": "content_type",
"kind": "attribute",
"path": "omniread.xlsx.parser.Content.content_type",
"signature": "<bound method Alias.signature of Alias('content_type', 'omniread.core.content.Content.content_type')>",
"docstring": "Optional MIME type of the content, if known."
},
"metadata": {
"name": "metadata",
"kind": "attribute",
"path": "omniread.xlsx.parser.Content.metadata",
"signature": "<bound method Alias.signature of Alias('metadata', 'omniread.core.content.Content.metadata')>",
"docstring": "Optional, implementation-defined metadata associated with the content (e.g., headers, encoding hints, extraction notes)."
}
}
},
"XlsxParserBase": {
"name": "XlsxParserBase",
"kind": "class",
"path": "omniread.xlsx.parser.XlsxParserBase",
"signature": "<bound method Alias.signature of Alias('XlsxParserBase', 'omniread.xlsx.parser_base.XlsxParserBase')>",
"docstring": "Base xlsx parser.\n\nNotes:\n **Responsibilities:**\n\n - This class enforces xlsx content-type compatibility and provides\n the extension point for implementing concrete xlsx parsing\n strategies.\n\n **Constraints:**\n\n - Concrete implementations must define the output type `T` and\n implement the `parse()` method.",
"members": {
"supported_types": {
"name": "supported_types",
"kind": "attribute",
"path": "omniread.xlsx.parser.XlsxParserBase.supported_types",
"signature": "<bound method Alias.signature of Alias('supported_types', 'omniread.xlsx.parser_base.XlsxParserBase.supported_types')>",
"docstring": "Set of content types supported by this parser (XLSX only)."
},
"parse": {
"name": "parse",
"kind": "function",
"path": "omniread.xlsx.parser.XlsxParserBase.parse",
"signature": "<bound method Alias.signature of Alias('parse', 'omniread.xlsx.parser_base.XlsxParserBase.parse')>",
"docstring": "Parse xlsx content into a structured output.\n\nReturns:\n T:\n Parsed representation of type `T`.\n\nRaises:\n Exception:\n Parsing-specific errors as defined by the implementation."
}
}
},
"XlsxParser": {
"name": "XlsxParser",
"kind": "class",
"path": "omniread.xlsx.parser.XlsxParser",
"signature": "<bound method Class.signature of Class('XlsxParser', 26, 149)>",
"docstring": "Generic xlsx parser producing string rows from a worksheet.\n\nNotes:\n **Responsibilities:**\n\n - Lazily load the workbook owned by the parser's content.\n - Normalize cells (including dates and numeric values) into\n deterministic string representations.\n - Expose sheet discovery and row extraction helpers.\n\n **Constraints:**\n\n - Cells are rendered with ``str(value)`` after trimming; date and\n datetime values are rendered in ISO format. Consumers requiring\n locale-specific formatting must convert on their side.",
"members": {
"workbook": {
"name": "workbook",
"kind": "attribute",
"path": "omniread.xlsx.parser.XlsxParser.workbook",
"signature": null,
"docstring": "The lazily loaded workbook backing this parser's content."
},
"sheet_names": {
"name": "sheet_names",
"kind": "attribute",
"path": "omniread.xlsx.parser.XlsxParser.sheet_names",
"signature": null,
"docstring": "Names of all worksheets contained in the workbook."
},
"parse": {
"name": "parse",
"kind": "function",
"path": "omniread.xlsx.parser.XlsxParser.parse",
"signature": "<bound method Function.signature of Function('parse', 85, 93)>",
"docstring": "Parse the first worksheet into normalized string rows.\n\nReturns:\n list[list[str]]:\n Rows of the default (first) worksheet."
},
"rows": {
"name": "rows",
"kind": "function",
"path": "omniread.xlsx.parser.XlsxParser.rows",
"signature": "<bound method Function.signature of Function('rows', 95, 127)>",
"docstring": "Extract normalized string rows from a worksheet.\n\nArgs:\n sheet (int | str | None):\n Worksheet index or title; defaults to the first worksheet.\n skip_empty (bool):\n When True (default), rows whose cells are all blank are omitted.\n\nReturns:\n list[list[str]]:\n Normalized rows; trailing blank cells are trimmed per row.\n\nRaises:\n ValueError:\n If the requested sheet does not exist."
}
}
}
}
}
}