Skip to main content

Python SDK for the Zamzar file conversion API

Project description

pyzamzar

Python SDK for the Zamzar file conversion API

Installation

pip install pyzamzar

Usage

Initialize Zamzar client

from zamzar import ZamzarClient

client = ZamzarClient('YOUR_API_KEY')

Start conversion job

Example:

job_info = client.start_conversion_jo('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


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.0.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

pyzamzar-1.0.0-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file pyzamzar-1.0.0.tar.gz.

File metadata

  • Download URL: pyzamzar-1.0.0.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for pyzamzar-1.0.0.tar.gz
Algorithm Hash digest
SHA256 19ef28f91a8338bbd5271e06802c72f8e7bb68703c15b29e0e9d8a8b7efc4a5c
MD5 601dbb2ecd68fa38ab9c281c17c44033
BLAKE2b-256 2f5c9dd53eaa92b269d6a2334bcb29932c2e950143f261bd737003fbe839c983

See more details on using hashes here.

File details

Details for the file pyzamzar-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyzamzar-1.0.0-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

Hashes for pyzamzar-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e83b8bb2e460f6a5a8c6b33b52d32e5d05e7126695df5ce1cfa914a15f21e53e
MD5 c6e32c9bdb2b82657ae8ca98bed98254
BLAKE2b-256 1042b9042daafde1dfcd2d332c6ab059fc607c920dde3a99977854dcc822ea31

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page