ObjDocuments provides bulk document management operations for handling multiple documents simultaneously. It extends document functionality to support batch operations, collections, and document set management.
Module: factory.core/ObjDocuments.py
Inherits from: ObjDocument.ObjDocument
from ObjDocuments import ObjDocuments
# Create instance
docs = ObjDocuments()
# Upload multiple files
file_paths = [
"/path/to/doc1.pdf",
"/path/to/doc2.docx",
"/path/to/doc3.xlsx"
]
results = docs.upload_batch(
files=file_paths,
metadata={"project": "Q1_Reports", "status": "draft"}
)
print(f"Uploaded {len(results)} documents")
# Search by metadata
results = docs.search_documents(
query={"project": "Q1_Reports"},
tags=["financial", "quarterly"]
)
# Full-text search
text_results = docs.search_content(
text="revenue analysis",
file_types=["pdf", "docx"]
)
# Download by criteria
docs.download_batch(
query={"project": "Q1_Reports"},
destination="/downloads/q1_reports/"
)
ObjDocument.py - Single document operationsObjDocumentSet.py - Document set managementObjDocumentStore.py - Document storage