If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

安装
该软件包在PyPI可用,可以通过执行以下命令通过pip安装:
pip install groupdocs-assembly-cloud

要求
依赖关系
SDK自动安装以下软件包:
| Package | Constraint |
|---|
| urllib3 | >= 1.16 |
| six | >= 1.10 |
| certifi | — |
| python-dateutil | — |
文档自动化 Python 云 REST API
GroupDocs.Assembly Cloud Python SDK 使开发人员能够无缝地自动创建复杂文档,例如报告、发票和演示文稿。利用模板、合并来自 JSON 或 XML 源的数据、应用丰富的格式并生成条形码和图表,所有这些都在可扩展且安全的云环境中进行。该 API 简化了文档工作流程,提高了工作效率,并提供跨平台兼容性,以便轻松集成到您的 Python Web 应用程序、脚本和自动化工作流程中。
核心特性
模板驱动文档生成 - 从模板创建复杂的 Word、Excel、PowerPoint、PDF 文档。
动态数据合并 - 使用 JSON 或 XML 数据填充模板以生成自定义报告。
丰富的格式和样式 - 将高级格式应用于文本、表格、图表,以制作精美的文档。
条件内容控制 - 使用条件逻辑根据数据生成动态内容。
列表和表格自动化 - 创建根据数据自动更新的动态列表、表格、图表。
高级功能
条形码生成 - 将条形码直接嵌入到文档中。
超链接插入 - 添加指向外部资源或文档内的可点击链接。
书签创建 - 创建书签以便于导航。
复选框操作 - 根据数据动态设置复选框值。
邮件合并功能 - 大规模生成个性化电子邮件和附件。
公式计算 - 在电子表格中执行计算以获得动态结果。
处理数据
数据过滤 - 应用过滤器来选择报告的特定数据子集。
数据排序 - 根据标准按特定顺序(升序/降序)排列数据。
数据分组 - 将数据组织成组,以便于分析和演示。
数据格式 - 控制报告中数据的外观,例如数字、日期、文本格式。
使用变量 - 在整个模板中存储和重用值以实现高效处理。
使用扩展方法 - 利用内置函数在模板内进行复杂操作。
使用列表、表格和图表
动态列表生成 - 生成包含动态内容的段落内、项目符号、编号列表。
动态表生成 - 生成具有动态内容、计算和格式的表。
图表生成 - 使用动态数据创建折线图、柱状图、条形图、饼图、散点图、气泡图。
图表定制 - 通过表达式定制图表标题、系列、轴标题、图例。
条件图表系列 - 根据条件有条件地包含/排除图表系列。
使用超链接、书签和条形码
插入超链接 - 将超链接插入到 Word、电子邮件、电子表格和演示文稿文档中。
动态书签插入 - 将书签添加到文档/电子邮件并定义导航名称。
复选框状态控制 - 使用复选标记在 Word 文档中设置复选框选中/取消选中。
条形码图像生成 - 生成并插入 QR、DataMatrix、UPC、EAN、ISBN、PDF417 和许多其他条形码类型。
开发人员友好的功能
REST API 架构 - 利用 REST 轻松集成和可扩展。
综合文档 - 访问详细的 API 参考、代码示例、教程。
活跃的社区支持 - 从活跃的社区论坛和专门支持中获取帮助。
基于云的灵活性 - 享受基于云的处理的可扩展性和可靠性。
JWT 身份验证 - 通过 JWT 身份验证保护数据和 API 请求。
许可和身份验证
评估模式 - 使用免费试用帐户试用 API。
安全身份验证 - 使用 Client ID 和 Client Secret 进行安全 API 访问。
MIT License - Python SDK 根据 MIT License 获得许可。
支持的文件格式
GroupDocs.Assembly Cloud 支持多种文档类型的模板驱动生成和转换:
- 文字处理: DOC、DOCX、DOCM、DOT、DOTX、DOTM、RTF、ODT、OTT、HTML、MD、TXT、MHTML、MHT
- 电子表格: XLS、XLSX、XLSM、XLTX、XLTM、XLSB、ODS
- 演示文稿: PPT、PPTX、PPTM、PPS、PPSX、PPSM、POT、POTX、POTM、ODP、OTP
- 电子邮件: MSG、EML、EMLX
- 网络和其他: PDF、EPUB、XPS、OXPS、TIFF、SVG、XAML
支持的输出格式因源模板类型而异。有关完整的格式矩阵,请参阅文档。
快速入门
获取您的 API 凭证
要使用GroupDocs.Assembly Cloud,请在GroupDocs.Cloud仪表板注册并获取您的Client ID和Client Secret。
初始化API
使用以下代码开始使用GroupDocs.Assembly Cloud SDK for Python:
import groupdocsassemblycloud
# Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
client_id = "YourClientId"
client_secret = "YourClientSecret"
# Create instance of the Assembly API
assembly_api = groupdocsassemblycloud.AssemblyApi(client_id, client_secret)
assembly_api.api_client.configuration.host = "https://api.groupdocs.cloud"
从模板和 JSON 数据组装文档
初始化后,使用此基本示例从模板和 JSON 数据源生成文档:
import groupdocsassemblycloud
from groupdocsassemblycloud.models import requests
client_id = "YourClientId"
client_secret = "YourClientSecret"
assembly_api = groupdocsassemblycloud.AssemblyApi(client_id, client_secret)
assembly_api.api_client.configuration.host = "https://api.groupdocs.cloud"
# Upload the template file to cloud storage
with open("template.docx", "rb") as template_file:
upload_request = requests.UploadFileRequest(template_file, path="template.docx")
assembly_api.upload_file(upload_request)
# Read JSON data source
with open("data.json") as f:
data = f.read()
template_file_info = groupdocsassemblycloud.TemplateFileInfo("template.docx")
options = groupdocsassemblycloud.AssembleOptions(template_file_info, save_format="docx", report_data=data)
request = requests.AssembleDocumentRequest(options)
result = assembly_api.assemble_document(request)
print("Generated document size = " + str(len(result)))
通过本快速入门指南,您已准备好开始在 Python 应用程序中使用 GroupDocs.Assembly Cloud 自动生成文档。欲了解更多详情,请访问文档。
将文档组装为 PDF
从 OpenDocument 模板和 JSON 数据生成 PDF 报告。
import groupdocsassemblycloud
from groupdocsassemblycloud.models import requests
client_id = "YourClientId"
client_secret = "YourClientSecret"
assembly_api = groupdocsassemblycloud.AssemblyApi(client_id, client_secret)
assembly_api.api_client.configuration.host = "https://api.groupdocs.cloud"
filename = "TableFeatures.odt"
remote_name = "GroupDocs.Assembly/TableFeatures.odt"
with open("TableData.json") as f:
data = f.read()
with open(filename, "rb") as template_file:
upload_request = requests.UploadFileRequest(template_file, remote_name)
assembly_api.upload_file(upload_request)
template_file_info = groupdocsassemblycloud.TemplateFileInfo(remote_name)
assemble_data = groupdocsassemblycloud.AssembleOptions(template_file_info, "pdf", data)
request = requests.AssembleDocumentRequest(assemble_data)
result = assembly_api.assemble_document(request)
print("Generated document size = " + str(len(result)))
获取支持的文件格式
通过 Assembly API 检索可用的受支持文件格式的完整列表。
import groupdocsassemblycloud
from groupdocsassemblycloud.models import requests
client_id = "YourClientId"
client_secret = "YourClientSecret"
assembly_api = groupdocsassemblycloud.AssemblyApi(client_id, client_secret)
assembly_api.api_client.configuration.host = "https://api.groupdocs.cloud"
result = assembly_api.get_supported_file_formats(requests.GetSupportedFileFormatsRequest())
for fmt in result.formats:
print(fmt.file_format)
GitHub 上的示例项目
GroupDocs.Assembly Cloud Python SDK 存储库包含可立即运行的单元测试和示例,涵盖:
| Category | Examples |
|---|
| Document Assembly | Assemble document from template and JSON data, generate PDF output |
| File Operations | Upload template files to cloud storage |
| Info | Supported file formats |
如何运行示例
1.克隆或下载SDK存储库
2. 编辑Settings/servercreds.json并设置AppSid和AppKey
3.安装依赖:pip install groupdocs-assembly-cloud -U
4. 从存储库根运行测试:python -m unittest discover -s test
欲了解更多详情,请访问入门。

标签
Document Automation | Python Cloud API | GroupDocs.Assembly Cloud | REST API | Document Generation | Template-Driven | Dynamic Data Merging | Rich Formatting | Conditional Content Control | List Automation | Table Automation | Barcode Generation | Hyperlink Insertion | Bookmark Creation | Checkbox Manipulation | Mail Merge | Formula Calculations | Chart Generation | Data Filtering | Data Sorting | Data Grouping | JWT Authentication | Microsoft Word | Microsoft Excel | Microsoft PowerPoint | Report Generation | Cloud-Based Flexibility | Secure API Access | Cross-platform API