Registry / devops / cloudmersive-convert-api-client

cloudmersive-convert-api-client

JSON →
library3.3.0pypypi✓ verified 85d ago

Python client for Cloudmersive Convert API, providing document, image, and file conversion capabilities. Current version 3.3.0, updated monthly. The API requires an API key for authentication. Note: This is an API client for a paid cloud service; free tier is limited.

pip install cloudmersive-convert-api-client
INSTALL
IMPORT
SIG · CLOUDMERSIVE-CONVE
C
cloudmersive-convert-api-client
devopspythonv3.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ConvertDocumentApi
from cloudmersive_convert_api_client import ConvertDocumentApi
from cloudmersive_convert_api_client.rest import ConvertDocumentApi
ConvertDocumentApi is not under rest module; it's a top-level client class.
ApiClient
from cloudmersive_convert_api_client import ApiClient
from cloudmersive_convert_api_client.api_client import ApiClient
ApiClient is directly importable from the package root, not from a submodule.

Initialize the API client with your Cloudmersive API key and convert a docx file to PDF.

import os from cloudmersive_convert_api_client import ApiClient, ConvertDocumentApi # Configure API key configuration = ApiClient() configuration.set_api_key('Apikey', os.environ.get('CLOUDMERSIVE_API_KEY', '')) api_instance = ConvertDocumentApi(configuration) # Convert a Word document to PDF with open('input.docx', 'rb') as f: result = api_instance.convert_document_docx_to_pdf(input_file=f) # Save output with open('output.pdf', 'wb') as f: f.write(result.read() if hasattr(result, 'read') else result)
Debug
Known issues
breakingAPI key must be set via set_api_key('Apikey', ...) not via default header. The method name changed in v2.x from add_default_header to set_api_key.
fix
Use configuration.set_api_key('Apikey', 'your_key_here')
affects: >=1.0.0
gotchaAll file conversion endpoints expect a file-like object (opened with 'rb') or a byte string. Passing a file path will fail.
fix
Open file with open('file.pdf', 'rb') before passing to the API method.
affects: all
deprecatedSome old method names like convert_document_autodetect_get_info may be deprecated in favor of convert_document_autodetect_get_info_with_http_info. Check the official documentation for current method signatures.
fix
Refer to the API reference for the correct method name.
affects: <=2.x
gotchaThe library has a known issue with SSL certificate validation on some systems. You may see requests.exceptions.SSLError.
fix
Install certifi and set SSL_CERT_FILE environment variable, or use configuration.verify_ssl = False (not recommended for production).
affects: all
Errors
Common errors & fixes
AttributeError: module 'cloudmersive_convert_api_client' has no attribute 'ConvertDocumentApi'
Incorrect import path (e.g., from cloudmersive_convert_api_client.rest import ...)
fix
Use: from cloudmersive_convert_api_client import ConvertDocumentApi
TypeError: a bytes-like object is required, not 'str'
Passing a file path string instead of a file object to an API method.
fix
Open the file with open('file.pdf', 'rb') and pass the file handle.
cloudmersive_convert_api_client.rest.ApiException: (401) Reason: Unauthorized
Missing or invalid API key.
fix
Ensure you set the API key using configuration.set_api_key('Apikey', 'YOUR_API_KEY') and that the key is active.
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.cloudmersive.com', port=443): Max retries exceeded with url: /convert/...
Network issues or SSL certificate problems.
fix
Check internet connection and try setting verify=False on the configuration object (temporary workaround).
Upgrade
Version history
3.3.0latest on PyPI · released Dec 11, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
cloudmersive-convert-api-client — pip install cloudmersive-convert-api-client · libregistry