우리는 GroupDocs.Assembly for Python v26.11의 릴리스를 발표하게 되어 기쁩니다. 이 릴리스는 2026년 11월부터 사용할 수 있습니다. 이번 릴리스는 주요 플랫폼 지원 개선을 제공하며—Linux 및 macOS용 최초의 휠을 포함—네이티브 Python 데이터 소스 지원, 향상된 오류 처리 및 업그레이드된 종속성을 제공합니다. 또한 최신 Python 관행 및 .NET 10에 맞추어 여러 새로운 기능과 호환성 깨지는 변경 사항을 도입합니다.
이번 릴리스의 새로운 기능
- [Feature] Linux x64 및 macOS(인텔 및 Apple Silicon)용 휠 추가 (ASSEMBLYPYTHON-26)
- [Feature] Python dict 또는 list를 데이터 소스로 지원 추가 (ASSEMBLYPYTHON-27)
- [Feature]
IDocumentTableLoadHandler에 대한 Python 핸들러 지원 추가 (ASSEMBLYPYTHON-28) - [Feature] API가 .NET
Type을 받는 경우에 Python 타입 지원 추가 (DocumentTableColumn.type,known_types) (ASSEMBLYPYTHON-29) - [Feature]
GROUPDOCS_LIC_PATH환경 변수에서 라이선스 적용 지원 추가 (ASSEMBLYPYTHON-30) - [Enhancement] GroupDocs.Assembly를 26.7로, 포함된 런타임을 .NET 10.0.14로 업데이트 (ASSEMBLYPYTHON-31)
- [Enhancement] 컴파일된 확장 대신 Python 3.5–3.14용 순수 Python 패키지 제공 (ASSEMBLYPYTHON-32)
- [Enhancement]
assemble_document()에서 하나의DataSourceInfo와 리스트 모두 허용 (ASSEMBLYPYTHON-33) - [Enhancement] 파일이 없을 경우
FileNotFoundError, 적용할 수 없는 라이선스는LicenseError, 기타 엔진 오류는GroupDocsAssemblyException을 발생 (ASSEMBLYPYTHON-34) - [Enhancement]
BarcodeSettings.x_resolution/y_resolution를xresolution/yresolution로 이름 변경하고,use_reflection_optimization을 클래스 속성으로 만들기 (ASSEMBLYPYTHON-35) - [Enhancement] 32비트 Windows 휠 제거 (ASSEMBLYPYTHON-36)
- [Fix] 25.5.1에서 CVE 문제 해결: zlib 1.2.11 → 1.2.12 (+4개 추가) (ASSEMBLYPYTHON-11)
공개 API 변경 사항
업그레이드하는 사용자는 x_resolution/y_resolution와 set_use_reflection_optimization()을 이름 변경하고, RuntimeError를 잡던 곳에서 GroupDocsAssemblyException 및 LicenseError를 잡아야 합니다. 나머지는 모두 추가적인 변경입니다.
새로운 클래스 및 멤버
groupdocs.assembly:FontSettings,FolderFontSource,IFontSource,SearchOption,OoxmlCompliance,GroupDocsAssemblyException,LicenseError,LicenseWarning.LoadSaveOptions:ooxml_compliance.KnownTypeSet:append().DocumentTableCollection,DocumentTableColumnCollection:get().DocumentTableRelationCollection:append(),get().
이름이 변경된 항목
BarcodeSettings.x_resolution→BarcodeSettings.xresolutionBarcodeSettings.y_resolution→BarcodeSettings.yresolution
이전 이름을 사용하면 읽기 및 할당 시 “Did you mean” 힌트와 함께 AttributeError가 발생합니다.
제거된 항목
DocumentAssembler.set_use_reflection_optimization(): 대신 클래스 속성을 할당합니다, 예:DocumentAssembler.use_reflection_optimization = False.
변경된 항목
DataSourceInfo는 dict 또는 list를 받습니다.assemble_document()는 하나의DataSourceInfo와 리스트 모두를 받습니다.DocumentTableSet(path, load_handler)는 Python 함수 또는handle(args)메서드를 가진 객체를 받습니다.DocumentTableColumn.type및KnownTypeSet.add()는 Python 타입을 받습니다.- 엔진 오류는
FileNotFoundError,RuntimeError,LicenseError또는GroupDocsAssemblyException을 발생합니다.except Exception은 두 릴리스의 오류를 모두 잡습니다.
새로운 기능
Linux 및 macOS
26.11은 Linux x64(manylinux_2_27_x86_64, glibc 2.27 이상)와 Intel(macosx_12_0_x86_64) 및 Apple Silicon(macosx_12_0_arm64)용 macOS 12 이상 휠을 Windows x64와 함께 제공합니다. 25.5는 Windows 휠만 있었습니다. pip 20.3 이상은 플랫폼에 맞는 휠을 선택합니다. Linux에서는 .NET 런타임에 ICU가 필요하고, 프레젠테이션 템플릿에는 libgdiplus가 필요합니다(Requirements 참조).
pip install groupdocs-assembly-net==26.11.0
Python 데이터를 데이터 소스로 사용
DataSourceInfo는 dict, dict 리스트 또는 값 리스트를 그대로 받습니다; 25.5는 dict에 대해 TypeError를 발생시켰습니다. 래퍼는 데이터를 형태에 따라 .NET 객체로 변환하므로 숫자, 문자열, bool, datetime, date, Decimal 값이 템플릿에 타입으로 전달됩니다: <<[o.OrderDate.Month]>>와 <<if [c.Vip]>>는 .NET 객체에서와 동일하게 동작합니다. 하나의 리스트에 있는 dict들은 키의 합집합을 가진 하나의 타입을 공유합니다.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
orders = [
{"Number": 10001, "Product": "Harbor Blend whole bean coffee", "Quantity": 30, "Price": 552.0},
{"Number": 10004, "Product": "Aged harbour cheddar", "Quantity": 8, "Price": 132.0},
]
# order-table.docx: a table whose row <<foreach [o in orders]>><<[o.Number]>> ... <</foreach>> repeats per order
DocumentAssembler().assemble_document("order-table.docx", "order-table-report.docx", [
DataSourceInfo("Quayside Bistro", "customer"),
DataSourceInfo(orders, "orders"),
])
리스트 없이 하나의 데이터 소스
assemble_document()는 하나의 DataSourceInfo 또는 그 리스트를 받으며, .NET의 params DataSourceInfo[]와 동일하게 동작합니다. 25.5는 리스트가 필요했으며 하나만 전달하면 TypeError: can't build Array value from 'groupdocs.assembly.DataSourceInfo'를 발생시켰습니다.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
customer = {"Name": "Quayside Bistro", "Product": "Harbor Blend whole bean coffee"}
DocumentAssembler().assemble_document("hello-world.docx", "hello-world-report.docx", DataSourceInfo(customer, "customer"))
테이블 로드 핸들러
DocumentTableSet(path, load_handler)는 Python 함수 (args) 또는 handle(args) 메서드를 가진 객체를 받아 문서의 각 테이블을 로드하기 전에 호출합니다. 핸들러는 해당 테이블의 args.options를 설정하거나 args.is_loaded = False로 테이블을 건너뛸 수 있으며, args.table_index는 테이블 번호를 나타냅니다. 25.5는 Python 함수에 대해 TypeError를 발생시켰습니다.
from groupdocs.assembly.data import DocumentTableOptions, DocumentTableSet
def on_table(args):
options = DocumentTableOptions()
options.first_row_contains_column_names = True
args.options = options
tables = DocumentTableSet("contracts.xlsx", on_table)
for table in tables.tables:
print(table.name, [column.name for column in table.columns])
API가 .NET 타입을 받는 경우의 Python 타입
Python 타입은 멤버가 받는 .NET 타입을 나타냅니다: float는 System.Double, int, str, bool, datetime 등. 문서 테이블의 컬럼을 숫자로 지정하면 차트가 합산할 수 있고, known_types를 통해 템플릿이 타입의 정적 멤버를 호출할 수 있으며, .NET 타입 이름도 받을 수 있습니다. 25.5는 TypeError: can't build Type value from 'type'를 발생시켰습니다.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
from groupdocs.assembly.data import DocumentTable, DocumentTableOptions
options = DocumentTableOptions()
options.first_row_contains_column_names = True
contracts = DocumentTable("contracts.xlsx", 0, options)
contracts.columns["Price"].type = float
assembler = DocumentAssembler()
assembler.known_types.add("System.Math") # templates can call <<[Math.Round(x, 1)]>>
assembler.assemble_document("table-row.docx", "table-row-report.docx", DataSourceInfo(contracts, "contracts"))
환경에서 라이선스 가져오기
GROUPDOCS_LIC_PATH를 라이선스 파일 경로나 파일을 제공하는 URL로 설정하면 첫 엔진 호출 시 라이선스가 적용됩니다(라이선스 코드 필요 없음). 25.5는 변수를 읽지 않았습니다. 해당 라이선스를 적용할 수 없을 경우(파일 누락, 구독 만료, 다른 제품용 라이선스) 모든 엔진 호출은 LicenseError를 발생시키며 변수와 엔진 이유를 명시합니다. License().set_license()가 라이선스를 적용할 때까지 계속됩니다. GROUPDOCS_LIC_STRICT=0을 설정하면 하나의 LicenseWarning과 평가 모드가 제공됩니다.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler, LicenseError
customer = {"Name": "Quayside Bistro", "Product": "Harbor Blend whole bean coffee"}
try:
DocumentAssembler().assemble_document("hello-world.docx", "hello-world-report.docx", DataSourceInfo(customer, "customer"))
except LicenseError as e:
print(e) # GROUPDOCS_LIC_PATH=... could not be applied: <reason>
오류 종류별
25.5는 모든 엔진 오류에 대해 단순 RuntimeError("Proxy error(<.NET exception>): ...")를 발생시켰습니다. 26.11은 템플릿이나 데이터 파일이 없을 경우 FileNotFoundError를 발생시키며 이는 여전히 RuntimeError를 상속합니다; 템플릿 오류나 데이터에 없는 멤버에 대해서는 엔진 메시지만 포함한 RuntimeError; 적용할 수 없는 라이선스는 LicenseError; 기타 엔진 오류는 GroupDocsAssemblyException을 발생시킵니다. LicenseError와 GroupDocsAssemblyException은 groupdocs.assembly에서 import 가능하며 RuntimeError를 상속하지 않습니다.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler, GroupDocsAssemblyException
try:
DocumentAssembler().assemble_document("no-such-template.docx", "report.docx", DataSourceInfo({"Name": "A"}, "customer"))
except FileNotFoundError as e:
print("missing:", e)
except (RuntimeError, GroupDocsAssemblyException) as e:
print("engine:", e)
코드 예시
from groupdocs.assembly import DataSourceInfo, DocumentAssembler, FileFormat, LoadSaveOptions, OoxmlCompliance
options = LoadSaveOptions(FileFormat.DOCX)
options.ooxml_compliance = OoxmlCompliance.STRICT
customer = {"Name": "Quayside Bistro", "Product": "Harbor Blend whole bean coffee"}
DocumentAssembler().assemble_document("hello-world.docx", "hello-world-strict.docx", options, DataSourceInfo(customer, "customer"))
업데이트 받는 방법
PyPI
PyPI를 통해 최신 패키지로 업그레이드하십시오:
groupdocs-assembly-net 26.11.0
pip install groupdocs-assembly-net==26.11.0
직접 다운로드
플랫폼에 맞는 휠을 GroupDocs.Assembly for Python v26.11 페이지에서 다운로드하십시오.