עורך מסמכים REST API לעריכת פורמטים פופולריים, באמצעות כל עורך WYSIWYG HTML, מבלי לבקש להתקין יישומים חיצוניים.
התחל ניסיון חינםGroupDocs.Editor Cloud SDK עבור Python מקל על המפתחים לשלב תכונות עריכת מסמכים ביישומים מבוססי Python על-ידי אינטגרציה עם GroupDocs.Editor Cloud REST API. בצע פעולות עריכת מסמכים מתקדמות על-ידי שליפת סוגי המסמכים הנתמכים (Microsoft Word, גיליונות אלקטרוניים של Excel, PowerPoint, TXT, HTML, XML) בכל עורך HTML Front-End באמצעות GroupDocs.Editor Cloud API ושמור אותם בחזרה בפורמט המסמך המקורי לאחר עריכת המסמך.
GroupDocs.Editor Cloud SDK עבור Python נבנה כשכבה מעל GroupDocs.Editor Cloud REST API שחוסכת זמן פיתוח יקר על-ידי ניהול בקשות ברמת-הנמוכה וטיפול בתגובות. המפתחים יכולים להתמקד בכתיבת הקוד הספציפי רק לפי הצורך בפרויקט.
עיין ב-GroupDocs.Editor Cloud SDK for Python at GitHub אם אתה מחפש את קוד המקור להוספת הערות לקובץ בענן.
ניתן לנסות GroupDocs.Editor (https://purchase.groupdocs.cloud/trial) Low-Code Python APIs ללא מגבלות.
GroupDocs.Editor Cloud זמין גם כתמונת Docker שניתן להשתמש בה כדי self-host את השירות. או שתוכל לבנות את השירותים שלך באמצעות GroupDocs.Editor High-code APIs שמניעים כיום את REST APIs שלנו.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
editApi = groupdocs_editor_cloud.EditApi.from_keys(app_sid, app_key)
fileApi = groupdocs_editor_cloud.FileApi.from_keys(app_sid, app_key)
# The document already uploaded into the storage.
# Load it into editable state
fileInfo = groupdocs_editor_cloud.FileInfo("WordProcessing/password-protected.docx", None, None, "password")
loadOptions = groupdocs_editor_cloud.WordProcessingLoadOptions()
loadOptions.file_info = fileInfo
loadOptions.output_path = "output"
loadResult = editApi.load(groupdocs_editor_cloud.LoadRequest(loadOptions))
# Download html document
htmlFile = fileApi.download_file(groupdocs_editor_cloud.DownloadFileRequest(loadResult.html_path))
html = ""
with open(htmlFile, 'r') as file:
html = file.read()
# Edit something...
html = html.replace("Sample test text", "Hello world")
# Upload html back to storage
with open(htmlFile, 'w') as file:
file.write(html)
fileApi.upload_file(groupdocs_editor_cloud.UploadFileRequest(loadResult.html_path, htmlFile))
# Save html back to docx
saveOptions = groupdocs_editor_cloud.WordProcessingSaveOptions()
saveOptions.file_info = fileInfo
saveOptions.output_path = "output/edited.docx"
saveOptions.html_path = loadResult.html_path
saveOptions.resources_path = loadResult.resources_path
saveResult = editApi.save(groupdocs_editor_cloud.SaveRequest(saveOptions))
# Done
print("Document edited: " + saveResult.path)