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 hashes)

Uploaded Python 3

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