Skip to main content

[Deprecated] Future development has been directed to IDRCloudClient, which can be used for the same purpose.

Project description

THIS PACKAGE HAS BEEN DEPRECATED

Future development has been directed to the idrsolutions client, which can be used for the same purpose. This package will receive no more updates.

BuildVu Python Client

Convert PDF to HTML5 or SVG with Python, using the BuildVu Python Client to interact with IDRsolutions’ BuildVu Microservice Example.

The BuildVu Microservice Example is an open source project that allows you to convert PDF to HTML5 or SVG by running BuildVu as an online service.

IDR Solutions offer a free trial service for running BuildVu with Python, more infomation on this can be found here.


Installation

Using PIP:

pip install buildvu

For other methods / ways to install, check out the Python Docs.


Usage

Basic:

First, import BuildVu and setup the converter details by creating a new BuildVu object :

from BuildVuClient import BuildVu
buildvu = BuildVu('http://localhost:8080/buildvu-microservice')

You can now convert files by calling the methods available. convert() will start the conversion process. For example to convert to html5 :

# Convert the file with the input method specified
results = buildvu.convert(input=BuildVu.UPLOAD, file='path/to/file.pdf')

# Return a URL where you can view the converted output.
print(results['downloadUrl'])

Alternatively, you can specify a url from which the server will download the file to convert.

# Convert the file with the input method specified
results = buildvu.convert(input=BuildVu.DOWNLOAD, url="http://link.to/filename")

# Return a URL where you can download the converted output.
print(results['downloadUrl'])

Once you have converted the file you can also specify a directory to download the converted output to:

# Download the converted output to a specified directory:
buildvu.downloadResult(results, 'path/to/output/dir')

Additional parameters can be used in convert(), they are defined in our API


Changes for docker version

If your BuildVu service requires authentication, you can set the username and password by passing an additional tuple argument as shown below:

from BuildVuClient import BuildVu
buildvu = BuildVu('http://localhost:8080/buildvu-microservice', auth=("username","password"))

Who do I talk to?

Found a bug, or have a suggestion / improvement? Let us know through the Issues page.

Got questions? You can contact us here.


Code of Conduct

Short version: Don’t be an awful person.

Longer version: Everyone interacting in the BuildVu Python Client project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.


Copyright 2018 IDRsolutions

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

buildvu-4.1.5-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file buildvu-4.1.5-py3-none-any.whl.

File metadata

  • Download URL: buildvu-4.1.5-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/3.8.5

File hashes

Hashes for buildvu-4.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7c6a20b2cad96444a37622cc59d17b66b8a4834d01873be4059b50f8bbf9311c
MD5 fa6fd0b023760674c6c0daae75928237
BLAKE2b-256 9b97c4b7ee6e9499b61a9de0dac85000ad8ac6da26c0f12d91d7fa09c6686d1a

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