Skip to main content
https://travis-ci.org/jkeyes/python-docraptor.png?branch=master

python-docraptor is an MIT Licensed wrapper for the docraptor API.

Synchronous Example

from docraptor import DocRaptor

docraptor = DocRaptor()
with open("test.pdf", "wb") as f:
    f.write(docraptor.create({
        'document_content': '<p>python-docraptor Test</p>',
        'test': True
    }).content)

Asynchronous Example

import time
from docraptor import DocRaptor

docraptor = DocRaptor()

resp = docraptor.create({
    'document_content': '<p>python-docraptor Async Test</p>',
    'test': True,
    'async': True
})
status_id = resp['status_id']

resp = docraptor.status(status_id)
while resp['status'] != 'completed':
    time.sleep(3)
    resp = docraptor.status(status_id)

with open("test_async.pdf", "wb") as f:
    f.write(docraptor.download(resp['download_key']).content)

Installation

To install python-docraptor, simply:

$ pip install python-docraptor

Metadata

Release files for python-docraptor 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-docraptor 1.2.3
File Size Uploaded
python-docraptor-1.2.3.tar.gz 3.9 kB Details

Release files / python-docraptor-1.2.3.tar.gz

Download URL python-docraptor-1.2.3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
35edfa93e00016c4a960ae71c05f9c63b92c627cbcca266dba87cbfede074c61
BLAKE2b-256 checksum
How to use checksums
683d9a4d7c29a5edb405ca42e5f7b7a9c6a9ec984809253395924d0773bcbae4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

1.2.3 This release

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page