Blader door onze producten

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.


Product Docs Swagger Examples Blog Support Dashboard

Installation

Das Paket ist verfügbar bei PyPI und kann über pip mit folgendem Befehl installiert werden:

pip install groupdocs-assembly-cloud

PyPI - Version PyPI - Downloads Python-GroupDocsCloud


Anforderungen

Abhängigkeiten

Das SDK installiert automatisch die folgenden Pakete:

PackageConstraint
urllib3>= 1.16
six>= 1.10
certifi
python-dateutil

Schnellstart

API-Anmeldeinformationen abrufen

Um GroupDocs.Assembly Cloud zu verwenden, registrieren Sie sich im GroupDocs.Cloud Dashboard und holen Sie sich Ihre Client ID und Ihr Client Secret.

API initialisieren

Verwenden Sie den folgenden Code, um mit der Verwendung des GroupDocs.Assembly Cloud SDK für Python zu beginnen:

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"

Dokument aus Vorlage und JSON-Daten zusammenstellen

Verwenden Sie nach der Initialisierung dieses einfache Beispiel, um ein Dokument aus einer Vorlage und einer JSON-Datenquelle zu generieren:

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)))

Mit dieser Kurzanleitung können Sie mit der Automatisierung der Dokumentgenerierung mithilfe von GroupDocs.Assembly Cloud in Ihren Python-Anwendungen beginnen. Weitere Informationen finden Sie in der Dokumentation.

Dokument zu PDF zusammenstellen

Generieren Sie einen PDF-Bericht aus einer OpenDocument-Vorlage und JSON-Daten.

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)))

Unterstützte Dateiformate abrufen

Rufen Sie die vollständige Liste der über die Assembly API verfügbaren unterstützten Dateiformate ab.

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)

Beispielprojekte auf GitHub

Das GroupDocs.Assembly Cloud Python SDK-Repository enthält betriebsbereite Unit-Tests und Beispiele zu folgenden Themen:

KategorieBeispiele
DokumentenzusammenstellungDokument aus Vorlage und JSON-Daten zusammenstellen, PDF-Ausgabe generieren
DateioperationenVorlagendateien in den Cloud-Speicher hochladen
InfoUnterstützte Dateiformate

So führen Sie die Beispiele aus

  1. Klonen oder laden Sie das SDK-Repository herunter
  2. Bearbeiten Sie Settings/servercreds.json und setzen Sie Ihre AppSid und AppKey
  3. Installieren Sie Abhängigkeiten: pip install groupdocs-assembly-cloud -U
  4. Führen Sie Tests im Repository-Stammverzeichnis aus: python -m unittest discover -s test

Weitere Informationen finden Sie unter Erste Schritte.


Product Docs Swagger Examples Blog Support Dashboard


Tags

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



 Deutsch