Python SDK for the Zamzar file conversion API
Project description
pyzamzar
Python SDK for the Zamzar file conversion API
Installation
pip install pyzamzar
Usage
Obtain your API key
Create an account, log in and obtain your API key here
Initialize Zamzar client
from zamzar import ZamzarClient
client = ZamzarClient('YOUR_API_KEY')
Start conversion job
Example:
job_info = client.start_conversion_job('README.md', 'pdf')
job_id = job_info['id']
Poll job status until its completion
Example:
while True:
job_status = client.get_job_status(job_id)
if job_status['status'] == 'successful':
break
elif job_status['status'] == 'failed':
print("Conversion failed.")
return
else:
print("Conversion in progress. Please wait...")
Download converted file(s)
Example:
file_id = job_status['target_files'][0]['id']
client.download_converted_file(file_id, 'readme.pdf')
print("File downloaded successfully as 'readme.pdf'.")
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
pyzamzar-1.0.4.tar.gz
(1.9 kB
view details)
Built Distribution
File details
Details for the file pyzamzar-1.0.4.tar.gz
.
File metadata
- Download URL: pyzamzar-1.0.4.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7a8b0c271562f31f6995f10bce3b5c7dcfdf56df2997c91ddcb85eb4dbd905 |
|
MD5 | 48d2f23ed6915ec5f9bd23ce3edce37e |
|
BLAKE2b-256 | 98cb683ebddc0bbed0b476857df38f5771871860ce95bcacd9c2d81fea2055c0 |
File details
Details for the file pyzamzar-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: pyzamzar-1.0.4-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6da2e162c45ae06114a214f086f48d26a59c856224fdac66c27c4a41233f77fa |
|
MD5 | 011a169e5b44cb1da5c515226c8ee36c |
|
BLAKE2b-256 | bbf103b8709f1fa0178b21c1b8a030570517b4009c60d220a1cfdbd48bc06b77 |