Python Document Editor REST API & SDK

Document editor REST API to edit popular document formats using any WYSIWYG HTML editor without asking to install external applications.

  • GroupDocs.Editor for cURL
  • GroupDocs.Editor for .NET
  • GroupDocs.Editor for Java
  • GroupDocs.Editor for PHP
  • GroupDocs.Editor for Ruby
  • GroupDocs.Editor for Node.js
  • GroupDocs.Editor for Android
Start Free Trial

GroupDocs.Editor Cloud SDK for Python makes it easier for developers to incorporate document editing features within Python based applications by integrating it with GroupDocs.Editor Cloud REST API. Perform advanced document editing operations by simply fetching the supported document types (Microsoft Word, Excel spreadsheets, PowerPoint, TXT, HTML, XML) in any front-end HTML editor using GroupDocs.Editor Cloud API and save it back to original document format after editing the document.

GroupDocs.Editor Cloud SDK for Python is built as a layer on top of GroupDocs.Editor Cloud REST API that saves valuable development time by managing low-level requests and handling responses. The developers can focus on writing up the specific code only as needed in the project.

Frequently Asked Questions

I want to create my own Python application to edit documents?

Check out GroupDocs.Editor Cloud SDK for Python at GitHub if you are looking for the source code to annotate file in the Cloud.

Can I try GroupDocs.Editor REST APIs on Python for free?

You can try GroupDocs.Editor Low-Code Python APIs without any limitations.

I do not want to upload my confidential files anywhere for editing? What are my options?

GroupDocs.Editor Cloud is also available as Docker image which can be used to self-host the service. Or you may build your own services using GroupDocs.Editor High-code APIs which currently drive our REST APIs.

Advanced Document Editor REST API Features

Integrates easily within any WYSIWYG editor

Edit Word documents as a whole or define pages range

Multi-tabbed spreadsheet editing is supported

Optimized memory usage for large CSV or TSV files

Extract document information (type, size, page count etc)

Cloud REST API to be used with any language or platform

Working with WordProcessing Documents - Python

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

Support and Learning Resources

GroupDocs.Editor offers document viewing APIs for other popular development environments

  English
262a188