Package: asposehtmlcloud
Aspose.HTML Cloud SDK for PythonThis repository contains Aspose.HTML Cloud SDK for Python source code. This SDK allows you to work with Aspose.HTML Cloud REST APIs in your Python applications quickly and easily.How to use the SDK?The complete source code is available in this repository folder, you can either directly use it in your project via pip package manager.PrerequisitesTo use Aspose HTML for Cloud Python SDK you need to register an account withAspose Cloudand lookup/create App Key and SID atCloud Dashboard. There is free quota available. For more details, seeAspose Cloud Pricing.InstallationInstall Aspose.HTML CloudFrom the command line:python setup.py installpippip install asposehtmlcloudExampleThe examples below show how your application have to initiate and convert url to image using Aspose.HTML Cloud library:Possible conversions:HTML -> PDF, XPS, DOCX, MD, MHTML, JPEG, BMP, PNG, TIFF, GIFEPUB -> PDF, XPS, DOCX, JPEG, BMP, PNG, TIFF, GIFMD -> PDF, XPS, DOCX, HTML, MHTML, JPEG, BMP, PNG, TIFF, GIFMHTML -> PDF, XPS, DOCX, JPEG, BMP, PNG, TIFF, GIFSVG -> PDF, XPS, JPEG, BMP, PNG, TIFF, GIFJPEG, BMP, PNG, TIFF, GIF -> SVGimportosfromasposehtmlcloud.configurationimportConfigurationfromasposehtmlcloud.api.html_apiimportHtmlApifromasposehtmlcloud.api_clientimportApiClientasClientfromasposehtmlcloud.restimportApiException# Get keys from aspose site.# There is free quota available.# For more details, see https://purchase.aspose.cloud/pricingconfiguration=Configuration(apiKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",appSid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",basePath="https://api.aspose.cloud/v4.0",authPath="https://api.aspose.cloud/connect/token",debug=True)client=Client(configuration)html_api=HtmlApi(client)source_url="https://stallman.org/articles/anonymous-payments-thru-phones.html"try:res=html_api.convert_url_to_local(input_file=source_url,output_file="result.pdf")ifnotos.path.exists(res.file):print('conversion failed')exceptApiExceptionasex:print("Exception")print("Info: "+str(ex))raiseexDocumentation for Html API EndpointsAll URIs are relative tohttps://api.aspose.cloud/v4.0ConversionApiSee possible conversions.
| Method                                                           | Description                                               |
|------------------------------------------------------------------|-----------------------------------------------------------|
|convert_local_to_local| Convert a document from local disk to a local disk.       |
|convert_local_to_storage| Convert a document from local disk to user's storage.     |
|convert_storage_to_local| Convert a document from user's storage to local disk.     |
|convert_storage_to_storage| Convert a document from user's storage to user's storage. |
|convert_url_to_local| Convert the HTML document by URL to local disk.           |
|convert_url_to_storage| Convert the HTML document by URL to user's storage.       |
|convert| Convert a document to the specified format.               |VectorizeApiFor vectorization images to svg format.
| Method                                                               | Description                                             |
|----------------------------------------------------------------------|---------------------------------------------------------|
|vectorize_local_to_local| Vectorize images from local disk to a local disk.       |
|vectorize_local_to_storage| Vectorize images from local disk to user's storage.     |
|vectorize_storage_to_local| Vectorize images from user's storage to local disk.     |
|vectorize_storage_to_storage| Vectorize images from user's storage to user's storage. |
|vectorize| Vectorize images to the svg format.                     |Documentation for Storage API EndpointsStorageApiMethodHTTP requestDescriptiondelete_fileDELETE/html/file/Delete filedownload_fileGET/html/storage/fileDownload fileupload_filePOST/html/storage/fileUpload filecreate_folderPOST/html/folderCreate the folderdelete_folderDELETE/html/folderDelete folderget_files_listGET/html/folderGet all files and folders within a folderget_disc_usageGET/html/storage/discGet disc usageobject_existsGET/html/storage/existCheck if file or folder existsstorage_existsGET/html/storage/exist/storageCheck if storage existsTestscontain various examples of using the Aspose.HTML SDK.DocsFull documentation for Aspose.HTML SDK in html format.DependenciesSee requirements.txtContact UsYour feedback is very important to us. Please feel free to contact us using ourSupport Forums.