| | |
| | | for web requests. |
| | | |
| | | Pyramid has always fit nicely into the existing world of Python web development |
| | | (virtual environments, packaging, scaffolding, one of the first to embrace |
| | | (virtual environments, packaging, cookiecutters, one of the first to embrace |
| | | Python 3, etc.). Pyramid turned to the well-regarded :term:`WebOb` Python |
| | | library for request and response handling. In our example above, Pyramid hands |
| | | ``hello_world`` a ``request`` that is :ref:`based on WebOb <webob_chapter>`. |
| | |
| | | .. seealso:: See also: |
| | | :ref:`Quick Tutorial Cookiecutters <qtut_cookiecutters>`, |
| | | :ref:`project_narr`, and |
| | | :doc:`../narr/scaffolding` |
| | | :doc:`../narr/cookiecutters` |
| | | |
| | | Application running with ``pserve`` |
| | | =================================== |
| | |
| | | |
| | | #. *Interfaces:* ``listen = 127.0.0.1:6543 [::1]:6543`` tells ``waitress`` to listen on all interfaces on port 6543 for both IPv4 and IPv6. |
| | | |
| | | Additionally the ``development.ini`` generated by this scaffold wired up |
| | | Additionally the ``development.ini`` generated by this cookiecutter wired up |
| | | Python's standard logging. We'll now see in the console, for example, a log on |
| | | every request that comes in, as well as traceback information. |
| | | |
| | |
| | | $ $VENV/bin/pserve development.ini |
| | | |
| | | The ORM eases the mapping of database structures into a programming language. |
| | | SQLAlchemy uses "models" for this mapping. The scaffold generated a sample |
| | | SQLAlchemy uses "models" for this mapping. The cookiecutter generated a sample |
| | | model: |
| | | |
| | | .. literalinclude:: quick_tour/sqla_demo/sqla_demo/models/mymodel.py |