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 Provenance
python-docraptor-1.2.3.tar.gz 3.9 kB Without provenance 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

Security for python-docraptor 1.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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