GroupDocs.Conversion Cloud Python SDK
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file groupdocs_conversion_cloud-25.12.tar.gz.
File metadata
- Download URL: groupdocs_conversion_cloud-25.12.tar.gz
- Upload date:
- Size: 79.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3aa80f29f599532dc57bb4ab6c2d5e6374f7e1f12f8d4b6ebd2976ee304b956
|
|
| MD5 |
1468aaeaaf4028a16b0c5b9cd58d0fa8
|
|
| BLAKE2b-256 |
3d09220f8bb23648c73f1ba36a514648b1de3c5a2f5b2f5eac8787a3af924533
|
File details
Details for the file groupdocs_conversion_cloud-25.12-py3-none-any.whl.
File metadata
- Download URL: groupdocs_conversion_cloud-25.12-py3-none-any.whl
- Upload date:
- Size: 218.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8df7008a7bf814fc145c9f6697c31415c32e8ae1260a4cc4785fbc574e24b5e
|
|
| MD5 |
7bf357340171fefcf7f34eaefa40f525
|
|
| BLAKE2b-256 |
c9173a6c4c5caebc3c9d522cf4bb7f6af6eea37a8dde14e2c97a7f1097d4d18d
|