Free Support Forum -

How to Manipulate Microsoft Word Documents in Python using Aspose.Words REST API

Are there any programming examples how to use the Python SDK together with the Words cloud service API?

Hi Andreas,

Sorry, Python SDK examples are not available in the Words documentation at the moment. We are in the process of revamping our Cloud API documentation and SDKs and these examples will also be added once the process is done. The process will be completed soon.

Can you please share which SDK examples do you want? We will share your required examples with you as soon as possible.

I am looking for a simple example to upload a DOCX file to the server and retrieving the converted result as HTML or something else.

Hi Andreas,

You can use the following SDK example for this purpose; output format can be passed to convert method.

from common import *<?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" />

from storage import Folder

from words import WordsConverter

import json

import os



# sepcify App SID

SaasposeApp.app_sid = "77******-1***-4***-****-************"

# sepcify App Key

SaasposeApp.app_key = "**************"

SaasposeApp.output_location = 'd:\\temp\\'

# specify product URI

Product.base_product_uri = ''

# create Folder object

folder = Folder()


# create OcrExtractor object

extractor = WordsConverter("Sample.doc")

print extractor.convert("html")

#responseStream = Folder.getFolders(folder)

#jsonData = json.loads(responseStream)

#print jsonData

print 'Done'

except Exception, ex:

print type(ex) # the exception instance

print ex.args # arguments stored in .args

print ex.errno

print ex.strerror


raw_input("Press any Key")

Once revamp is done, updated examples will be available in the documentation and you will be able to download migrated SDK from

Please feel free to contact us in case you have further comments or questions.

Best Regards,


Is this response still current? Or is there an updated Python API example?

thank you,


Python examples are available in the documentation now. Please check Aspose.Words documentation for Aspose.Words examples.

Please feel free to contact us in case you have further comments or questions.

Best Regards,