Skip to main content

Core Parsing Methods

parse()

Parse local files, file-like objects, or raw bytes content.
Parameters:
Union[str, Path, bytes, BinaryIO, List[...]]
required
Files to parse. Can be:
  • File path (string or Path object)
  • Raw bytes content
  • File-like object (BinaryIO)
  • List of any of the above
ProcessingMode
default:"ProcessingMode.DEFAULT"
Processing mode: DEFAULT or ADVANCED
Optional[Callable]
default:"None"
Callback function to monitor parsing progress
float
default:"60.0"
Maximum time to wait for parsing completion (seconds)
float
default:"2.0"
Interval between status checks (seconds)
Returns: DocumentBatch - Collection of parsed documents

parse_urls()

Parse documents from URLs.
Parameters:
Union[str, List[str]]
required
URLs to parse. Can be a single URL string or list of URLs
ProcessingMode
default:"ProcessingMode.DEFAULT"
Processing mode: DEFAULT or ADVANCED
Optional[Callable]
default:"None"
Callback function to monitor parsing progress
float
default:"120.0"
Maximum time to wait for parsing completion (seconds)
float
default:"2.0"
Interval between status checks (seconds)
Returns: DocumentBatch - Collection of parsed documents

get_job_status()

Get the current status of a parsing job.
Parameters:
str
required
The job ID to check status for
Returns: JobStatus - Current job status information

Amazon S3 Methods

list_s3_buckets()

List available S3 buckets.
Returns: S3BucketList - List of available S3 buckets

list_s3_folder()

List contents of an S3 folder.
Parameters:
str
required
S3 bucket name
str
default:""
Path within the bucket (empty for root)
int
default:"1000"
Maximum number of items to return
Returns: S3FolderContents - Contents of the S3 folder

parse_s3_folder()

Parse all documents in an S3 folder.
Parameters:
str
required
S3 bucket name
str
default:""
Path within the bucket to parse
ProcessingMode
default:"ProcessingMode.DEFAULT"
Processing mode: DEFAULT or ADVANCED
Optional[Callable]
default:"None"
Callback function to monitor parsing progress
float
default:"300.0"
Maximum time to wait for parsing completion (seconds)
float
default:"5.0"
Interval between status checks (seconds)
Returns: DocumentBatch - Collection of parsed documents

Microsoft SharePoint Methods

list_sharepoint_sites()

List available SharePoint sites.
Returns: SharePointSiteList - List of available SharePoint sites

list_sharepoint_drives()

List drives in a SharePoint site.
Parameters:
str
required
SharePoint site ID
Returns: SharePointDriveList - List of drives in the site

parse_sharepoint_folder()

Parse documents in a SharePoint folder.
Parameters:
str
required
SharePoint site ID
str
required
SharePoint drive ID
str
default:""
Path within the drive to parse
ProcessingMode
default:"ProcessingMode.DEFAULT"
Processing mode: DEFAULT or ADVANCED
Optional[Callable]
default:"None"
Callback function to monitor parsing progress
float
default:"300.0"
Maximum time to wait for parsing completion (seconds)
float
default:"5.0"
Interval between status checks (seconds)
Returns: DocumentBatch - Collection of parsed documents

Box Methods

list_box_folders()

List folders in Box.
Parameters:
str
default:"0"
Parent folder ID (“0” for root folder)
Returns: BoxFolderList - List of folders

parse_box_folder()

Parse documents in a Box folder.
Parameters:
str
required
Box folder ID to parse
ProcessingMode
default:"ProcessingMode.DEFAULT"
Processing mode: DEFAULT or ADVANCED
Optional[Callable]
default:"None"
Callback function to monitor parsing progress
float
default:"300.0"
Maximum time to wait for parsing completion (seconds)
float
default:"5.0"
Interval between status checks (seconds)
Returns: DocumentBatch - Collection of parsed documents

Dropbox Methods

list_dropbox_folders()

List folders in Dropbox.
Parameters:
str
default:""
Dropbox folder path (empty for root)
Returns: DropboxFolderList - List of folders

parse_dropbox_folder()

Parse documents in a Dropbox folder.
Parameters:
str
required
Dropbox folder path to parse
ProcessingMode
default:"ProcessingMode.DEFAULT"
Processing mode: DEFAULT or ADVANCED
Optional[Callable]
default:"None"
Callback function to monitor parsing progress
float
default:"300.0"
Maximum time to wait for parsing completion (seconds)
float
default:"5.0"
Interval between status checks (seconds)
Returns: DocumentBatch - Collection of parsed documents

Async Methods

All methods are available in async versions with the AsyncLexa client:

Next Steps

Learn about error handling and client configuration for production use.