This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


An mixin for PyDocX that uploads the images to an S3 bucket instead of returning them as Data URIs when converting from .docx to html.


  • Python 2.7
  • Works on Linux, Windows, Mac OSX, BSD


The quick way:

pip install pydocxs3upload


First of all, to use this mixin, you need to create you own amazon s3 bucket and give public permission so that uploaded images can be accessed from generated html files. Here you can find a guide how to do that. Once we have the bucket created, we need to generate a singed request that will be used to upload data to s3. So, because of this signed request you have full control over the uploaded images. Using this gist you can simple generate such signature using boto library.

Here is an example of mixin usage:

from pydocx.export import PyDocXHTMLExporter
from pydocxs3upload import S3ImageUploadMixin

class PyDocXHTMLExporterS3ImageUpload(S3ImageUploadMixin, PyDocXHTMLExporter):

docx_path = 'path/to/file/doc.docx'
signed_request = '<signed json string>'
exporter = PyDocXHTMLExporterS3ImageUpload(docx_path, s3_upload=signed_request)

html = exporter.parsed

Note that you can use the same signed request to convert any docs you want. So, in order to avoid uploading images with the same name and overriding previous one, each image is appended a timestamp which makes it unique. If, for some reasons, you don’t want this feature by default you can change it by passing parameter 'unique_filename': False.

exporter = PyDocXHTMLExporterS3ImageUpload(docx_path,
    s3_upload=signed_request, unique_filename=False)

In this case all images are named as image1, image2, ..., imagen.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting