Here’s how you can convert a directory of thousands of files quickly with our API
submit_and_poll_pdf_conversion(...)
function to support all this!
batch_convert_pdf(...)
to submit multiple files at once. We can do this with multithreading in python.
We’ll add max_workers
to process documents in parallel.
submit_and_poll_pdf_conversion(...)
function from the previous example to respect rate limits and retry as needed.
Let’s use urllib3's
retry system with requests.adapters.HTTPAdapter
to handle retrying different status codes.
submit_and_poll_pdf_conversion(...)
to use session.post(...)
instead of requests.post(...)