skip to navigation
skip to content

Sphinx-PyPI-upload 0.2.1

setuptools command for uploading Sphinx documentation to PyPI

This package contains a setuptools command for uploading Sphinx documentation to the Python Package Index (PyPI) at the dedicated URL

The upload_sphinx command

upload_sphinx will create the necessary zip file out of an arbitrary documentation directory and posts it to the correct URL.

It’s also loosely based on Sphinx’ own setuptools command build_sphinx which allows to easily build documentation from the command line.

The upload_sphinx command has the following options:

  • --repository (-r): url of repository [default:]
  • --show-response: display full response text from server
  • --upload-dir: directory to upload


Assuming there is an Example package with Sphinx documentation to be uploaded to, with the following structure:

|-- setup.cfg
|-- docs
|   |-- build
|   |   `-- html
|   |--
|   |-- index.txt
|   `-- tips_tricks.txt

As with any other setuptools based command, you can define useful defaults in the setup.cfg of your Python package. The following snippet shows how to set the option defaults of the build_sphinx and upload_sphinx commands:

source-dir = docs/
build-dir  = docs/build
all_files  = 1

upload-dir = docs/build/html

To build and upload the Sphinx documentation you are now able to run:

$ python build_sphinx
$ python upload_sphinx

Alternatively, you can of course just pass the appropriate options directly to the commands:

$ python build_sphinx --source-dir=docs/ --build-dir=docs/build --all-files
$ python upload_sphinx --upload-dir=docs/build/html
File Type Py Version Uploaded on Size
Sphinx-PyPI-upload-0.2.1.tar.gz (md5) Source 2009-08-25 4KB
  • Downloads (All Versions):
  • 14 downloads in the last day
  • 226 downloads in the last week
  • 807 downloads in the last month