GroupDocs.Viewer Cloud Python SDK
Python package for communicating with the GroupDocs.Viewer Cloud API. This SDK allows you to work with GroupDocs.Viewer Cloud REST APIs in your python applications, which allows rendering a specific document in HTML, image or PDF format with the flexibility to render the whole document or custom range of pages.
Requirements
Python 3.4+
Installation
Install groupdocs-viewer-cloud with PIP from PyPI by:
pip install groupdocs-viewer-cloud
Or clone repository and install it via Setuptools:
python setup.py install
Getting Started
Please follow the installation procedure and then run following:
# Import module
import groupdocs_viewer_cloud
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required).
client_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
client_secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
apiInstance = groupdocs_viewer_cloud.ViewApi.from_keys(client_id, client_secret)
format = "jpg"
file = File.open("myfile.txt", "r")
request = ConvertAndDownloadRequest.new format, file
response = apiInstance.convert_and_download(request)
Below is an example demonstrating how to upload the document, render it, and download the result using GroupDocs.Viewer Cloud SDK for Python.
# Import module
import groupdocs_viewer_cloud
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required).
client_id = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
client_secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# Upload input file to cloud storage
fileApiInstance = groupdocs_viewer_cloud.FileApi.from_keys(client_id, client_secret)
request = groupdocs_viewer_cloud.UploadFileRequest("myfile.txt", "C:\\Data\\myfile.txt")
fileApiInstance.upload_file(request)
# Render to html format
apiInstance = groupdocs_viewer_cloud.ViewApi.from_keys(client_id, client_secret)
view_options = groupdocs_viewer_cloud.ViewOptions()
view_options.file_info = groupdocs_viewer_cloud.FileInfo()
view_options.file_info.file_path = "myfile.txt"
view_options.view_format = "HTML"
view_options.output_path = "myfile.html"
request = groupdocs_viewer_cloud.CreateViewRequest(view_options)
response = apiInstance.create_view(request)
# Download result
request = groupdocs_viewer_cloud.DownloadFileRequest("myfile.html")
response = fileApiInstance.download_file(request)
print("Expected response type is Stream: " + str(len(response)))
Licensing
GroupDocs.Viewer 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.
Metadata
Release files for groupdocs-viewer-cloud 26.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| groupdocs_viewer_cloud-26.6.tar.gz | 65.0 kB | Without provenance | Details for groupdocs_viewer_cloud-26.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| groupdocs_viewer_cloud-26.6-py3-none-any.whl | Python 3 | none | any | Details for groupdocs_viewer_cloud-26.6-py3-none-any.whl |
Total release size: 248.6 kB
Release files / groupdocs_viewer_cloud-26.6.tar.gz
| Download URL | groupdocs_viewer_cloud-26.6.tar.gz |
|---|---|
| Size | 65.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15c7f93db247374494fd63437fb31742e2e53359b9c2b932c012fcee651a3f37
|
|
BLAKE2b-256 checksum How to use checksums |
34b4fb271facfb73abc6b7383b5b41ede9192fb5abb0bdcf2ee7efb008b9247f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|
Release files / groupdocs_viewer_cloud-26.6-py3-none-any.whl
| Download URL | groupdocs_viewer_cloud-26.6-py3-none-any.whl |
|---|---|
| Size | 183.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
978986dc2debfef85039d81755577a4ddfceb3a57de9529986d8aa618780e095
|
|
BLAKE2b-256 checksum How to use checksums |
5665346dc5601065ce1d43934dad1a5a26004fabb4be6a8c907e6667ec6478e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|
Security for groupdocs-viewer-cloud 26.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.