Document editor REST API は、外部アプリケーションのインストールを求めることなく、任意の WYSIWYG HTML エディタを使用して、一般的な文書フォーマットを編集できます。
無料トライアルを開始GroupDocs.Editor Cloud SDK for Python は、Python ベースのアプリケーションに文書編集機能を組み込む際に、GroupDocs.Editor Cloud REST API と統合することで開発者の負担を軽減します。GroupDocs.Editor Cloud API を使用して任意のフロントエンド HTML エディタでサポートされている文書タイプ(Microsoft Word、Excel スプレッドシート、PowerPoint、TXT、HTML、XML)を取得するだけで高度な文書編集操作を実行でき、編集後は元の文書形式に保存できます。
GroupDocs.Editor Cloud SDK for Python は、GroupDocs.Editor Cloud REST API の上にレイヤーとして構築されており、低レベルのリクエスト管理やレスポンス処理を行うことで開発時間を大幅に削減します。開発者はプロジェクトで必要な特定のコードの記述に専念できます。
クラウド上でファイルに注釈を付けるためのソースコードをお探しの場合は、GroupDocs.Editor Cloud SDK for Python at GitHubをご確認ください。
制限なく Low-Code Python APIs を try GroupDocs.Editor できます。
GroupDocs.Editor Cloud は、サービスを self-host できる Docker イメージとしても利用できます。また、現在当社の REST APIs を駆動している GroupDocs.Editor High-code 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)