Skip to main content

Sphinx "Google Drive" extension; embed images on Google Drive

Project description


This Sphinx extension allows you to embed images on `Google Drive`_ into your document::

.. image::

.. _Google Drive:




$ pip install sphinxcontrib-googledrive

Prepare your Google Apps

This extension expects you to create Google Apps and its Service Account.
Please read the document of `Google Client Libraries: Using OAuth 2.0 for
Server to Server Applications`_ and create your service account. And
please generate a private key for the account.

.. _Google Client Libraries: Using OAuth 2.0 for Server to Server Applications`:

Configure Sphinx

Add ``sphinxcontrib.googledrive`` to ``extensions`` at ``::

extensions += ['sphinxcontrib.googledrive']

And let the private key for your service account to Sphinx through one of
the following methods:

1. Set content of the private key via environment variable

$ export GOOGLE_DRIVE_SERVICE_ACCOUNT_KEY='{"type": "service_account", ...}'

2. Set a path to the private key file via `googledrive_service_account`
in ``::

googledrive_service_account = '/path/to/private.key'


Please give an URL of caoo diagrams to image_ or figure_ directives
as an argument::

.. image::

.. figure::

caption of figure

.. _image:
.. _figure:

Configuration Options


A path to private key for service account.


Trim white space or not (boolean).


Project details

Download files

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

Files for sphinxcontrib-googledrive, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size sphinxcontrib_googledrive-0.1.0-py2.py3-none-any.whl (6.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size sphinxcontrib-googledrive-0.1.0.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page