blob: d944aaebdb89f7d5d3b84749c01fb7b4fcd9ad4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
=================
Tutorial Approach
=================
This tutorial uses conventions to keep the introduction focused and concise.
Details, references, and deeper discussions are mentioned in "See also" notes.
.. seealso:: This is an example "See also" note.
This "Getting Started" tutorial is broken into independent steps, starting with
the smallest possible "single file WSGI app" example. Each of these steps
introduce a topic and a very small set of concepts via working code. The steps
each correspond to a directory in this repository, where each step's directory is
a Python package.
To successfully run each step, you'll usually copy the current step's directory to a new directory, change your working directory to the new directory, then install your project:
.. code-block:: bash
$ cd ..; cp -r package ini; cd ini
$ $VENV/bin/pip install -e .
For a few steps, you won't copy the step's directory.
Directory tree
==============
As we develop our tutorial, our directory tree will resemble the structure
below:
.. code-block:: text
quick_tutorial
│── env
`── request_response
`── tutorial
│ │── __init__.py
│ │── tests.py
│ `── views.py
│── development.ini
`── setup.py
Each of the first-level directories (e.g., ``request_response``) is a *Python
project* (except as noted for the ``hello_world`` step). The ``tutorial``
directory is a *Python package*. At the start of each step, we usually copy a previous
directory into a new directory to use as a starting point.
|