How to Begin Editing a Document in Python

Editing a document online can be a challenging task if you’re not sure where to start. Fortunately, we’re here to provide you with the tools you need to produce safe and successful edits. The following API will call a begin editing function on your document and create a secure URL that you can perform one or more editing operations on, including inserting tables, deleting pages, or replacing matching paragraphs.

To use this Cloudmersive API, run this command to install the SDK:

Then, you can call the begin editing function with the following code:

# Configure API key authorization: Apikey
configuration = cloudmersive_convert_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'
# create an instance of the API class
api_instance = cloudmersive_convert_api_client.EditDocumentApi(cloudmersive_convert_api_client.ApiClient(configuration))
input_file = '/path/to/inputfile' # file | Input file to perform the operation on.
try:
# Begin editing a document
api_response = api_instance.edit_document_begin_editing(input_file)
pprint(api_response)
except ApiException as e:
print("Exception when calling EditDocumentApi->edit_document_begin_editing: %s\n" % e)

As mentioned earlier, this will return a ready-to-edit URL for your document. To ensure the security of your information, the URL is temporary and will automatically expire from the in-memory cache after 30 minutes. To retrieve your personal API key and access to 800 calls/month, simply register for free on the Cloudmersive website.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store