An example pypi project Documentation
[Pages:31]an_example_pypi_project Documentation
Release 0.0.1
Andrew Carter
November 11, 2009
CONTENTS
1 Introduction: This Package is a Tutorial
3
2 Getting Started With setuptools and setup.py
5
2.1 Installing setuptools and easy_install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 setup.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Documenting Your Project Using Sphinx
7
3.1 Installing Sphinx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Sphinx QuickStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 reStructured Text (reST) Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4 Bold/Italics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.6 Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.7 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.8 Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.9 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.10 Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.11 Substitutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.12 Includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.13 Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.14 Paragraph Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.15 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.16 Python Cross Referencing Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.17 `Auto' Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.18 Function Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.19 Full Code Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4 Documentation for the Code
23
4.1 useful #1 ? auto members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 useful #2 ? explicit members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5 Documentation for the Code
25
5.1 useful #1 ? auto members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2 useful #2 ? explicit members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Index
27
i
ii
Contents:
an_example_pypi_project Documentation, Release 0.0.1
CONTENTS
1
an_example_pypi_project Documentation, Release 0.0.1
2
CONTENTS
CHAPTER
ONE
INTRODUCTION: THIS PACKAGE IS A TUTORIAL
This is just a demonstration vehicle used to take you through the process ? start to finish ? of creating a Python project that can be:
1. Uploaded to 2. Distributed from and 1. Documented on the Python Package Index (aka pypi or the cheeseshop) at . This project uses setuptools, sphinx, and the Sphinx-PyPI-upload (). This demonstration is not meant to be complete nor authoritative. It's just a recording of the steps I took to get some projects onto pypi and hopefully it might save someone some time from googling around. To be sure, this is simply just one way to make a project, document it, and get it on pypi. NOTE: This was originally given as a talk to the Minnesota Python Users Group and was developed for a spoken presentation format.
3
an_example_pypi_project Documentation, Release 0.0.1
4
Chapter 1. Introduction: This Package is a Tutorial
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.