Introduction to Python

[![python logo][1].

Aspose Cloud Python SDK

[![Aspose Cloud APIs][2] as per Aspose Cloud 1.1.7.1. With this new release it is possible to create, read, manipulate and export features are greatly improved. You can extract sections, paragraphs, runs, page setup and fonts and update page setup and font in a Word document. read more

New Aspose.Words Methods

As per the latest version of Aspose Cloud 1.1.7.1, we’ve implemented the following functions to the Aspose Cloud Python SDK:

  • [Save Word documents as other formats][3] – This feature allows you to save Word documents as DOC, DOCX, DOCM, DOT, DOTX, DOTM, OOXML, HTML, HTMLFixed, WordML, MHTML, ODT, PDF, XPS, TIFF, EPUB, image and several other formats. Now this feature also supports export to XAML_FIXED format. You can use [saveAs][4] “Aspose.Cells Cloud”) resource and send a POST request (specifying save options in the request body) to convert to any supported format.
  • [Split Word documents][5] – This feature allows you to split all or specific pages of a Word document to many formats. This feature was already supported but now it supports split to XAML_FIXED format. You can use [splitDocument][6] resource and send a POST request to split to any supported format.
  • [Get all sections][7] – This feature allows you to get a list of all sections present in a Word document. You can use [sections][8] resource and send a GET request to get this list.
  • [Get a specific section][9] – This feature allows you to get any section from a Word document. You can use [section][10] resource and send a GET request to get a section.
  • [Get all paragraphs][11] – This feature allows you to get a list of all paragraphs present in a Word document. You can use [paragraphs][12] resource and send a GET request to get this list.
  • [Get a specific paragraph][13] – This feature allows you to get any paragraph from a Word document. You can use [paragraph][14] resource and send a GET request to get a paragraph.
  • [Get a specific run][15] – This feature allows you to get any run of any paragraph from a Word document. You can use [run][16] resource and send a GET request to get a run.
  • [Get font information][17] – This feature allows you to get font information from any run of a paragraph. You can use [font][18] resource and send a GET request for this purpose.
  • [Update a run’s font][19] – This feature allows you to update font of any run in a Word document. You can use [font][20] resource and send a POST request (specifying font options in the request body) to update font.
  • [Get page setup information][21] – This feature allows you to get page setup information from any section of a Word document. You can use [pageSetup][22] resource and send a GET request for this purpose.
  • [Update page setup][23] – This feature allows you to update page setup of any section in a Word document. You can use [pageSetup][24] resource and send a POST request (specifying page setup options in the request body) to update page setup.
  • [Get mustache field names][25] – This feature allows you to get mail merge and mustache field names. You can use [mailMergeFieldNames][26] resource and send a GET request (passing useNonMergeFields parameter in the request URI) to get all merge fields including mustache fields.

Code Snippets

Sample Code Aspose.Words - Get Sections

import asposecloud
from asposecloud.storage import Folder
from asposecloud.words import Extractor

asposecloud.AsposeApp.app_key = '****'
asposecloud.AsposeApp.app_sid = '****'

fld = Folder()
response = fld.upload_file('./data/test_multi_pages.docx')

extractor = Extractor('test_multi_pages.docx')
response = extractor.get_sections() 

Sample Code Aspose.Words - Get Paragraphs

import asposecloud
from asposecloud.storage import Folder
from asposecloud.words import Extractor

asposecloud.AsposeApp.app_key = '****'
asposecloud.AsposeApp.app_sid = '****'

fld = Folder()
response = fld.upload_file('./data/test_multi_pages.docx')

extractor = Extractor('test_multi_pages.docx')
response = extractor.get_paragraphs() 

Download

Start a Free Trial Today

Start a free trial today - all you need is to [sign up][27] with Aspose Cloud service. Once you have signed up, you are ready to try powerful file processing features offered by Aspose Cloud.

[1]: https://blogs.asposeptyltd.com/cloudsite/wp-content/uploads/sites/15/2014/07/python-logo-master-v3-TM1-300x101.png “python logo”)](https://blogs.asposeptyltd.com/cloudsite/wp-content/uploads/sites/15/2014/07/python-logo-master-v3-TM1.png)Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs. Python can be easy to pick up whether you’re a first time programmer or you’re experienced with other languages. The community hosts conferences and meetups, collaborates on code, and much more. [Read more about Python](https://www.python.org “Python Language” [2]: https://blogs.asposeptyltd.com/cloudsite/wp-content/uploads/sites/15/2013/12/asposeCloudAPIs.png “Aspose Cloud APIs”)](https://blogs.asposeptyltd.com/cloudsite/wp-content/uploads/sites/15/2013/12/asposeCloudAPIs.png)We are pleased to announce the release of [Aspose Cloud Python SDK](https://github.com/asposeforcloud/Aspose_Cloud_SDK_For_Python “Aspose Cloud Python SDK” [3]: http://www.aspose.com/docs/display/wordscloud/Convert+Word+Documents+to+any+Format+with+Additional+Settings [4]: http://www.aspose.com/docs/display/wordscloud/saveAs+(Controller+resource [5]: http://www.aspose.com/docs/display/wordscloud/Working+with+Split+Resource [6]: http://www.aspose.com/docs/display/wordscloud/splitDocument+%28Controller+Resource%29 “Aspose.Cells Cloud” [7]: http://www.aspose.com/docs/display/wordscloud/Get+a+List+of+Sections+from+a+Word+Document [8]: http://www.aspose.com/docs/display/wordscloud/sections “Aspose.Cells Cloud” [9]: http://www.aspose.com/docs/display/wordscloud/Get+a+specific+Section+from+a+Word+Document [10]: http://www.aspose.com/docs/display/wordscloud/section “Aspose.Cells Cloud” [11]: http://www.aspose.com/docs/display/wordscloud/Get+a+List+of+Paragraphs+from+a+Word+Document [12]: http://www.aspose.com/docs/display/wordscloud/paragraphs “Aspose.Cells Cloud” [13]: http://www.aspose.com/docs/display/wordscloud/Get+a+Paragraph+from+a+Word+Document [14]: http://www.aspose.com/docs/display/wordscloud/paragraph “Aspose.Cells Cloud” [15]: http://www.aspose.com/docs/display/wordscloud/Get+a+specific+Run+of+a+Paragraph+from+a+Word+Document [16]: http://www.aspose.com/docs/display/wordscloud/run “Aspose.Cells Cloud” [17]: http://www.aspose.com/docs/display/wordscloud/Get+Font+Information+of+a+Run+from+a+Word+Document [18]: http://www.aspose.com/docs/display/wordscloud/font “Aspose.Cells Cloud” [19]: http://www.aspose.com/docs/display/wordscloud/Update+Font+of+a+Run+in+a+Word+Document [20]: http://www.aspose.com/docs/display/wordscloud/font “Aspose.Cells Cloud” [21]: http://www.aspose.com/docs/display/wordscloud/Extract+Page+Setup+Information+from+a+Word+Document [22]: http://www.aspose.com/docs/display/wordscloud/pageSetup “Aspose.Cells Cloud” [23]: http://www.aspose.com/docs/display/wordscloud/Update+Page+Setup+of+a+Section+in+a+Word+Document [24]: http://www.aspose.com/docs/display/wordscloud/pageSetup “Aspose.Cells Cloud” [25]: http://www.aspose.com/docs/display/wordscloud/Get+All+Merge+Field+Names+from+a+Word+Document [26]: http://www.aspose.com/docs/display/wordscloud/mailMergeFieldNames “Aspose.Cells Cloud” [27]: https://cloud.aspose.com/SignUp