GroupDocs.Conversion Cloud Python SDK
This repository contains GroupDocs.Conversion Cloud SDK for Python source code. This SDK has been developed to help you get started with using our document conversion REST API, allowing to seamlessly convert your documents to any format you need. With this single API, you can convert back and forth between over 50 types of documents and images, including all Microsoft Office and OpenDocument file formats, PDF documents, HTML, CAD, raster images and many more.
Requirements
Python 2.7 or 3.4+
Installation
Install groupdocs-conversion-cloud with PIP from PyPI by:
pip install groupdocs-conversion-cloud
Or clone repository and install it via Setuptools:
python setup.py install
Create an account
Creating an account is very simple. Go to Dashboard to create a free account. We’re using Single Sign On across our websites, therefore, if you already have an account with our services, you can use it to also access the Dashboard.
Create an API client app
Before you can make any requests to GroupDocs Cloud API you need to get a Client Id and a Client Secret. This will be used to invoke GroupDocs Cloud API. You can get it by creating a new Application.
Convert document
Please follow the installation procedure and then run following:
# Import module
import groupdocs_conversion_cloud
# Get your clientId and clientSecret at https://dashboard.groupdocs.cloud (free registration is required).
client_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
client_secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# Create instance of the API
apiInstance = groupdocs_conversion_cloud.ConvertApi.from_keys(client_id, client_secret)
# Prepare request
request = groupdocs_conversion_cloud.ConvertDocumentDirectRequest("pdf", "myFile.docx")
# Convert
result = apiInstance.convert_document_direct(request)
print("Document converted: " + result)
Convert document using cloud storage
# Import module
import groupdocs_conversion_cloud
# Get your clientId and clientSecret at https://dashboard.groupdocs.cloud (free registration is required).
client_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
client_secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# Create instances of the APIs
fileApi = groupdocs_conversion_cloud.FileApi.from_keys(client_id, client_secret)
convertApi = groupdocs_conversion_cloud.ConvertApi.from_keys(client_id, client_secret)
# Upload file
fileApi.upload_file(groupdocs_conversion_cloud.UploadFileRequest("myFile.docx", "myFile.docx"))
# Prepare convert settings
settings = groupdocs_conversion_cloud.ConvertSettings()
settings.file_path = "myFile.docx"
settings.format = "pdf"
settings.output_path = "converted"
# Convert
result = convertApi.convert_document(groupdocs_conversion_cloud.ConvertDocumentRequest(settings))
print("Document converted: " + result)
# Download result
response = fileApi.download_file(groupdocs_conversion_cloud.DownloadFileRequest("converted/myFile.pdf", None))
Licensing
GroupDocs.Conversion Cloud Python SDK licensed under MIT License.
Resources
Contact Us
Your feedback is very important to us. Please feel free to contact us using our Support Forums.
Release files for groupdocs-conversion-cloud 26.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| groupdocs_conversion_cloud-26.8.tar.gz | 80.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| groupdocs_conversion_cloud-26.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 298.6 kB
Release files / groupdocs_conversion_cloud-26.8.tar.gz
| Download URL | groupdocs_conversion_cloud-26.8.tar.gz |
|---|---|
| Size | 80.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e3d49e4f5b7747be78a85e5694b2748045ff36f711cc963bb96f886aa6f9ec7
|
|
BLAKE2b-256 checksum How to use checksums |
89912a142867962403fc12c4fade8824137eab933099531edf0f8d57dc8283a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|
Release files / groupdocs_conversion_cloud-26.8-py3-none-any.whl
| Download URL | groupdocs_conversion_cloud-26.8-py3-none-any.whl |
|---|---|
| Size | 218.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1939681e221261311ef99313c261e8318de1ec336983f76679b765b1680002e1
|
|
BLAKE2b-256 checksum How to use checksums |
78c3e07d2565dadda72451c35f5bf0d0e6cd284c60f2e2e32cac5ca2fbbea229
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|