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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-docraptor-1.2.3.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file python-docraptor-1.2.3.tar.gz.

File metadata

  • Download URL: python-docraptor-1.2.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for python-docraptor-1.2.3.tar.gz
Algorithm Hash digest
SHA256 35edfa93e00016c4a960ae71c05f9c63b92c627cbcca266dba87cbfede074c61
MD5 0b50dfe72c9c63235e4e595e0266e4aa
BLAKE2b-256 683d9a4d7c29a5edb405ca42e5f7b7a9c6a9ec984809253395924d0773bcbae4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.3 This release

1 file

1.2.2

1 file

1.2.1

1 file

1.2

1 file

1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page