Skip to content

Commit 4ec7d2a

Browse files
committed
Started working on documentation.
So far just the stable parts :)
1 parent b15ad39 commit 4ec7d2a

9 files changed

Lines changed: 641 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.pyc
33
*.pyo
44
env
5+
*.egg-info

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_build

docs/Makefile

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
BUILDDIR = _build
9+
10+
# Internal variables.
11+
PAPEROPT_a4 = -D latex_paper_size=a4
12+
PAPEROPT_letter = -D latex_paper_size=letter
13+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14+
15+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp epub latex changes linkcheck doctest
16+
17+
help:
18+
@echo "Please use \`make <target>' where <target> is one of"
19+
@echo " html to make standalone HTML files"
20+
@echo " dirhtml to make HTML files named index.html in directories"
21+
@echo " singlehtml to make a single large HTML file"
22+
@echo " pickle to make pickle files"
23+
@echo " json to make JSON files"
24+
@echo " htmlhelp to make HTML files and a HTML help project"
25+
@echo " qthelp to make HTML files and a qthelp project"
26+
@echo " devhelp to make HTML files and a Devhelp project"
27+
@echo " epub to make an epub"
28+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
29+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
30+
@echo " changes to make an overview of all changed/added/deprecated items"
31+
@echo " linkcheck to check all external links for integrity"
32+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
33+
34+
clean:
35+
-rm -rf $(BUILDDIR)/*
36+
37+
html:
38+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
39+
@echo
40+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
41+
42+
dirhtml:
43+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
44+
@echo
45+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
46+
47+
singlehtml:
48+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
49+
@echo
50+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
51+
52+
pickle:
53+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
54+
@echo
55+
@echo "Build finished; now you can process the pickle files."
56+
57+
json:
58+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
59+
@echo
60+
@echo "Build finished; now you can process the JSON files."
61+
62+
htmlhelp:
63+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
64+
@echo
65+
@echo "Build finished; now you can run HTML Help Workshop with the" \
66+
".hhp project file in $(BUILDDIR)/htmlhelp."
67+
68+
qthelp:
69+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
70+
@echo
71+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
72+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
73+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Flask.qhcp"
74+
@echo "To view the help file:"
75+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Flask.qhc"
76+
77+
devhelp:
78+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) _build/devhelp
79+
@echo
80+
@echo "Build finished."
81+
@echo "To view the help file:"
82+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Flask"
83+
@echo "# ln -s _build/devhelp $$HOME/.local/share/devhelp/Flask"
84+
@echo "# devhelp"
85+
86+
epub:
87+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
88+
@echo
89+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
90+
91+
latex:
92+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
93+
@echo
94+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
95+
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
96+
"run these through (pdf)latex."
97+
98+
latexpdf: latex
99+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
100+
@echo "Running LaTeX files through pdflatex..."
101+
make -C _build/latex all-pdf
102+
@echo "pdflatex finished; the PDF files are in _build/latex."
103+
104+
changes:
105+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
106+
@echo
107+
@echo "The overview file is in $(BUILDDIR)/changes."
108+
109+
linkcheck:
110+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
111+
@echo
112+
@echo "Link check complete; look for any errors in the above output " \
113+
"or in $(BUILDDIR)/linkcheck/output.txt."
114+
115+
doctest:
116+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
117+
@echo "Testing of doctests in the sources finished, look at the " \
118+
"results in $(BUILDDIR)/doctest/output.txt."

docs/api.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
API
2+
===
3+
4+
.. module:: flask
5+
6+
This part of the documentation covers all the interfaces of Flask. For
7+
parts where Flask depends on external libraries, we document the most
8+
important right here and provide links to the canonical documentation.
9+
10+
11+
General Structure
12+
-----------------
13+
14+
.. autoclass:: Flask
15+
:members:

docs/conf.py

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Flask documentation build configuration file, created by
4+
# sphinx-quickstart on Tue Apr 6 15:24:58 2010.
5+
#
6+
# This file is execfile()d with the current directory set to its containing dir.
7+
#
8+
# Note that not all possible configuration values are present in this
9+
# autogenerated file.
10+
#
11+
# All configuration values have a default; values that are commented out
12+
# serve to show the default.
13+
14+
import sys, os
15+
16+
# If extensions (or modules to document with autodoc) are in another directory,
17+
# add these directories to sys.path here. If the directory is relative to the
18+
# documentation root, use os.path.abspath to make it absolute, like shown here.
19+
#sys.path.append(os.path.abspath('.'))
20+
21+
# -- General configuration -----------------------------------------------------
22+
23+
# If your documentation needs a minimal Sphinx version, state it here.
24+
#needs_sphinx = '1.0'
25+
26+
# Add any Sphinx extension module names here, as strings. They can be extensions
27+
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28+
extensions = ['sphinx.ext.autodoc']
29+
30+
# Add any paths that contain templates here, relative to this directory.
31+
templates_path = ['_templates']
32+
33+
# The suffix of source filenames.
34+
source_suffix = '.rst'
35+
36+
# The encoding of source files.
37+
#source_encoding = 'utf-8-sig'
38+
39+
# The master toctree document.
40+
master_doc = 'index'
41+
42+
# General information about the project.
43+
project = u'Flask'
44+
copyright = u'2010, Armin Ronacher'
45+
46+
import pkg_resources
47+
48+
# The version info for the project you're documenting, acts as replacement for
49+
# |version| and |release|, also used in various other places throughout the
50+
# built documents.
51+
release = __import__('pkg_resources').get_distribution('Flask').version
52+
version = '.'.join(release.split('.')[:2])
53+
54+
# The language for content autogenerated by Sphinx. Refer to documentation
55+
# for a list of supported languages.
56+
#language = None
57+
58+
# There are two options for replacing |today|: either, you set today to some
59+
# non-false value, then it is used:
60+
#today = ''
61+
# Else, today_fmt is used as the format for a strftime call.
62+
#today_fmt = '%B %d, %Y'
63+
64+
# List of patterns, relative to source directory, that match files and
65+
# directories to ignore when looking for source files.
66+
exclude_patterns = ['_build']
67+
68+
# The reST default role (used for this markup: `text`) to use for all documents.
69+
#default_role = None
70+
71+
# If true, '()' will be appended to :func: etc. cross-reference text.
72+
#add_function_parentheses = True
73+
74+
# If true, the current module name will be prepended to all description
75+
# unit titles (such as .. function::).
76+
#add_module_names = True
77+
78+
# If true, sectionauthor and moduleauthor directives will be shown in the
79+
# output. They are ignored by default.
80+
#show_authors = False
81+
82+
# The name of the Pygments (syntax highlighting) style to use.
83+
pygments_style = 'sphinx'
84+
85+
# A list of ignored prefixes for module index sorting.
86+
#modindex_common_prefix = []
87+
88+
89+
# -- Options for HTML output ---------------------------------------------------
90+
91+
# The theme to use for HTML and HTML Help pages. Major themes that come with
92+
# Sphinx are currently 'default' and 'sphinxdoc'.
93+
html_theme = 'nature'
94+
95+
# Theme options are theme-specific and customize the look and feel of a theme
96+
# further. For a list of options available for each theme, see the
97+
# documentation.
98+
#html_theme_options = {}
99+
100+
# Add any paths that contain custom themes here, relative to this directory.
101+
#html_theme_path = []
102+
103+
# The name for this set of Sphinx documents. If None, it defaults to
104+
# "<project> v<release> documentation".
105+
#html_title = None
106+
107+
# A shorter title for the navigation bar. Default is the same as html_title.
108+
#html_short_title = None
109+
110+
# The name of an image file (relative to this directory) to place at the top
111+
# of the sidebar.
112+
#html_logo = None
113+
114+
# The name of an image file (within the static path) to use as favicon of the
115+
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
116+
# pixels large.
117+
#html_favicon = None
118+
119+
# Add any paths that contain custom static files (such as style sheets) here,
120+
# relative to this directory. They are copied after the builtin static files,
121+
# so a file named "default.css" will overwrite the builtin "default.css".
122+
html_static_path = ['_static']
123+
124+
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
125+
# using the given strftime format.
126+
#html_last_updated_fmt = '%b %d, %Y'
127+
128+
# If true, SmartyPants will be used to convert quotes and dashes to
129+
# typographically correct entities.
130+
#html_use_smartypants = True
131+
132+
# Custom sidebar templates, maps document names to template names.
133+
#html_sidebars = {}
134+
135+
# Additional templates that should be rendered to pages, maps page names to
136+
# template names.
137+
#html_additional_pages = {}
138+
139+
# If false, no module index is generated.
140+
#html_use_modindex = True
141+
142+
# If false, no index is generated.
143+
#html_use_index = True
144+
145+
# If true, the index is split into individual pages for each letter.
146+
#html_split_index = False
147+
148+
# If true, links to the reST sources are added to the pages.
149+
#html_show_sourcelink = True
150+
151+
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
152+
#html_show_sphinx = True
153+
154+
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
155+
#html_show_copyright = True
156+
157+
# If true, an OpenSearch description file will be output, and all pages will
158+
# contain a <link> tag referring to it. The value of this option must be the
159+
# base URL from which the finished HTML is served.
160+
#html_use_opensearch = ''
161+
162+
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
163+
#html_file_suffix = ''
164+
165+
# Output file base name for HTML help builder.
166+
htmlhelp_basename = 'Flaskdoc'
167+
168+
169+
# -- Options for LaTeX output --------------------------------------------------
170+
171+
# The paper size ('letter' or 'a4').
172+
#latex_paper_size = 'letter'
173+
174+
# The font size ('10pt', '11pt' or '12pt').
175+
#latex_font_size = '10pt'
176+
177+
# Grouping the document tree into LaTeX files. List of tuples
178+
# (source start file, target name, title, author, documentclass [howto/manual]).
179+
latex_documents = [
180+
('index', 'Flask.tex', u'Flask Documentation',
181+
u'Armin Ronacher', 'manual'),
182+
]
183+
184+
# The name of an image file (relative to this directory) to place at the top of
185+
# the title page.
186+
#latex_logo = None
187+
188+
# For "manual" documents, if this is true, then toplevel headings are parts,
189+
# not chapters.
190+
#latex_use_parts = False
191+
192+
# Additional stuff for the LaTeX preamble.
193+
#latex_preamble = ''
194+
195+
# Documents to append as an appendix to all manuals.
196+
#latex_appendices = []
197+
198+
# If false, no module index is generated.
199+
#latex_use_modindex = True
200+
201+
202+
# -- Options for Epub output ---------------------------------------------------
203+
204+
# Bibliographic Dublin Core info.
205+
#epub_title = ''
206+
#epub_author = ''
207+
#epub_publisher = ''
208+
#epub_copyright = ''
209+
210+
# The language of the text. It defaults to the language option
211+
# or en if the language is not set.
212+
#epub_language = ''
213+
214+
# The scheme of the identifier. Typical schemes are ISBN or URL.
215+
#epub_scheme = ''
216+
217+
# The unique identifier of the text. This can be a ISBN number
218+
# or the project homepage.
219+
#epub_identifier = ''
220+
221+
# A unique identification for the text.
222+
#epub_uid = ''
223+
224+
# HTML files that should be inserted before the pages created by sphinx.
225+
# The format is a list of tuples containing the path and title.
226+
#epub_pre_files = []
227+
228+
# HTML files shat should be inserted after the pages created by sphinx.
229+
# The format is a list of tuples containing the path and title.
230+
#epub_post_files = []
231+
232+
# A list of files that should not be packed into the epub file.
233+
#epub_exclude_files = []
234+
235+
# The depth of the table of contents in toc.ncx.
236+
#epub_tocdepth = 3

docs/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Welcome to Flask
2+
================
3+
4+
Welcome to Flask's documentation.
5+
6+
Contents:
7+
8+
.. toctree::
9+
:maxdepth: 2
10+
11+
api

0 commit comments

Comments
 (0)