Skip to content

Commit

Permalink
Merge pull request #200 from stevepiercy/master
Browse files Browse the repository at this point in the history
Spring cleaning - Give the cookbook a good scrubbing
  • Loading branch information
stevepiercy committed May 20, 2018
2 parents 7f5ef45 + 2177100 commit 6e21950
Show file tree
Hide file tree
Showing 17 changed files with 76 additions and 50 deletions.
4 changes: 2 additions & 2 deletions docs/auth/enterprise.rst
Expand Up @@ -10,10 +10,10 @@ are listing places that may be worth looking at for ideas when developing one:
Authentication
--------------

* `adpasswd project on pypi <https://pypi.python.org/pypi/adpasswd/0.2>`_
* `adpasswd project on pypi <https://pypi.org/project/adpasswd/>`_
* `Tim Golden's Active Directory Cookbook <http://timgolden.me.uk/python/ad_cookbook.html>`_
* `python-ad <https://code.google.com/archive/p/python-ad/>`_
* `python-ldap.org <https://www.python-ldap.org/>`_
* `python-ldap.org <https://www.python-ldap.org/en/latest/>`_
* `python-ntmlm <https://github.com/mullender/python-ntlm>`_
* `Blog post on managing AD from Python in Linux <http://marcitland.blogspot.com/2011/02/python-active-directory-linux.html>`_

Expand Down
4 changes: 0 additions & 4 deletions docs/conf.py
Expand Up @@ -152,10 +152,6 @@
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
html_use_smartypants = False # people use cutnpaste in some places

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}

Expand Down
4 changes: 2 additions & 2 deletions docs/database/couchdb.rst
Expand Up @@ -2,7 +2,7 @@ CouchDB and Pyramid
===================

If you want to use CouchDB (via the
`couchdbkit package <https://pypi.python.org/pypi/couchdbkit>`_)
`couchdbkit package <https://pypi.org/project/couchdbkit/>`_)
in Pyramid, you can use the following pattern to make your CouchDB database
available as a ``request`` attribute. This example uses the starter scaffold.
(This follows the same pattern as the :doc:`mongodb` example.)
Expand Down Expand Up @@ -74,7 +74,7 @@ CouchDB Views
First let's create a view for our page data in CouchDB. We will use the
ApplicationCreated event and make sure our view containing our page data.
For more information on views in CouchDB see
`Introduction to CouchDB views <https://wiki.apache.org/couchdb/Introduction_to_CouchDB_views>`_.
`Introduction to Views <http://docs.couchdb.org/en/latest/ddocs/views/intro.html>`_.
In __init__.py::

from pyramid.events import subscriber, ApplicationCreated
Expand Down
2 changes: 1 addition & 1 deletion docs/database/mongodb.rst
Expand Up @@ -82,7 +82,7 @@ Scaffolds
---------

Niall O'Higgins provides a `pyramid_mongodb
<https://pypi.python.org/pypi/pyramid_mongodb>`_ scaffold for Pyramid that
<https://pypi.org/project/pyramid_mongodb/>`_ scaffold for Pyramid that
provides an easy way to get started with Pyramid and MongoDB.


Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/deployment.rst
Expand Up @@ -16,7 +16,7 @@ from a client, into your application, and return the response.
Client <---> WSGI Server <---> Your Application

Due to the beauty of standards, many different configurations can be used to
generate this basic setup, injecting caching layers, load balancers, etc into
generate this basic setup, injecting caching layers, load balancers, and so on into
the basic workflow.

Disclaimer
Expand All @@ -36,7 +36,7 @@ application. The entry point to your pyramid application is an object
implementing the WSGI interface. Thus, your application can be served by any
server supporting WSGI.

There are many different servers implementing the WSGI standard in existance.
There are many different servers implementing the WSGI standard in existence.
A short list includes:

+ ``waitress``
Expand Down
9 changes: 3 additions & 6 deletions docs/deployment/dotcloud.rst
Expand Up @@ -5,14 +5,14 @@ DotCloud

`DotCloud <https://cloud.docker.com/>`_ offers support for all WSGI frameworks.
Below is a quickstart guide for Pyramid apps. You can also read the `DotCloud
Python documentation <http://docs.dotcloud.com/services/python/>`_ for
Python documentation <https://docs.docker.com/samples/library/python/>`_ for
a complete overview.

Step 0: Install DotCloud
========================

`Install DotCloud's CLI
<http://docs.dotcloud.com/firststeps/install/>`_ by running:
<https://docs.docker.com/docker-cloud/installing-cli/>`_ by running:

.. code-block:: bash
Expand Down Expand Up @@ -54,7 +54,7 @@ root directory of your app. Here are some samples for a basic Pyramid app:
db:
type: postgresql
Learn more about the `DotCloud buildfile <http://docs.dotcloud.com/guides/build-file/>`_.
Learn more about the `DotCloud buildfile <https://docs.docker.com/engine/reference/builder/>`_.

``wsgi.py``:

Expand Down Expand Up @@ -97,9 +97,6 @@ your pyramid app:
db_uri = env["DOTCLOUD_DATA_POSTGRESQL_URL"]
Learn more about the `DotCloud environment.json
<http://docs.dotcloud.com/guides/environment/>`_.

Step 3: Deploy your app
=======================

Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/gae.rst
@@ -1,7 +1,7 @@
.. _appengine_tutorial:

:app:`Pyramid` on Google App Engine
===================================
Google App Engine and :app:`Pyramid`
====================================

It is possible to run a :app:`Pyramid` application on `Google App Engine <https://cloud.google.com/appengine/>`_. This tutorial is written in terms of using the command line on a UNIX system. It should be possible to perform similar actions on a Windows system. This tutorial also assumes you've already installed and created a :app:`Pyramid` application, and that you have a Google App Engine account.

Expand Down
19 changes: 9 additions & 10 deletions docs/deployment/gae_buildout.rst
@@ -1,8 +1,7 @@
.. _appengine_buildout_tutorial:


:app:`Pyramid` on Google's App Engine (using buildout)
======================================================
Google App Engine (using buildout) and :app:`Pyramid`
=====================================================

This is but one way to develop applications to run on Google's `App
Engine <https://cloud.google.com/appengine/>`_. This one uses `buildout
Expand All @@ -16,11 +15,11 @@ Install the pyramid_appengine scaffold
Let's take it step by step.

You can get `pyramid_appengine
<https://pypi.python.org/pypi/pyramid_appengine/>`_ from pypi via `pip <https://pypi.python.org/pypi/pip>`_
<https://pypi.org/project/pyramid_appengine/>`_ from pypi via `pip <https://pypi.org/project/pip/>`_
just as you typically would any other python package, however to reduce the
chances of the system installed python packages intefering with tools
you use for your own development you should install it in a local
`virtual environment <https://pypi.python.org/pypi/virtualenv>`_
`virtual environment <https://pypi.org/project/virtualenv/>`_

Creating a virtual environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -99,7 +98,7 @@ commands.
~/newproject $ ../bin/python2.7 bootstrap.py
You typically only need to do this once to generate your
buildout command. See the `buildout documentation <http://www.buildout.org/en/latest/docs/tutorial.html#buildout-steps>`_ for more information.
buildout command. See the `buildout documentation <http://www.buildout.org/en/latest/getting-started.html>`_ for more information.


Run buildout
Expand All @@ -117,13 +116,13 @@ edit to suit your needs.
In the case of this particular buildout, when run, it will take care
of several things that you need to do....

#. install the app engine SDK in parts/google_appengine `more info <https://pypi.python.org/pypi/rod.recipe.appengine>`_
#. install the app engine SDK in parts/google_appengine `more info <https://pypi.org/project/rod.recipe.appengine/>`_
#. Place tools from the appengine SDK in the buildout's "bin" directory.
#. Download/install the dependencies for your project including pyramid and all it's
dependencies not already provided by the app engine SDK.
`more info <https://pypi.python.org/pypi/rod.recipe.appengine>`_
`more info <https://pypi.org/project/rod.recipe.appengine/>`_
#. A directory structure appropriate for deploying to app engine at
newproject/parts/newproject. `more info <https://pypi.python.org/pypi/rod.recipe.appengine>`_
newproject/parts/newproject. `more info <https://pypi.org/project/rod.recipe.appengine/>`_
#. Download/Install tools to support unit testing including `pytest <https://docs.pytest.org/en/latest/>`_, and `coverage <http://coverage.readthedocs.io/en/latest/>`_.


Expand Down Expand Up @@ -170,7 +169,7 @@ The above command will most likely not work for you, it is just an
example. the "-A" switch indicates an `Application ID <https://cloud.google.com/appengine/docs/standard/python/console/>`_ to deploy to and overrides the setting in the app.yaml, use the Application ID you created when you registered the application instead. The "-V" switch specifies the version and overrides the setting in your app.yaml.

You can set which version of your application handles requests by
default in the `admin console <https://console.cloud.google.com/appengine?project=handy-platform-116923&pli=1>`_. However you can also specify a version of your application to hit in the URL like so...
default in the `admin console <https://console.cloud.google.com/appengine>`_. However you can also specify a version of your application to hit in the URL like so...

.. code-block:: text
Expand Down
33 changes: 30 additions & 3 deletions docs/deployment/index.rst
@@ -1,19 +1,46 @@
Deployment
++++++++++

Introduction
------------

.. toctree::
:maxdepth: 1

deployment


Web Servers
-----------

.. toctree::
:maxdepth: 1

apache
asgi
gevent
gunicorn
nginx
windows


Cloud Providers
---------------

.. toctree::
:maxdepth: 1

aws_via_eb
dotcloud
gae_buildout
gae
gae_buildout
heroku
expresscloud
asgi


Windows
-------

.. toctree::
:maxdepth: 1

windows
2 changes: 1 addition & 1 deletion docs/deployment/windows.rst
Expand Up @@ -29,7 +29,7 @@ the downloaded installer. For example::

easy_install pywin32-217.win32-py2.7.exe

Since the web server for `CherryPy <http://cherrypy.org>`_ has good
Since the web server for `CherryPy <https://cherrypy.org>`_ has good
Windows support, is available for Python 2 and 3, and can be gracefully
started and stopped on demand from the service, we'll use that as the web
server. You could also substitute another web server, like the one from
Expand Down
14 changes: 7 additions & 7 deletions docs/development_tools/pycharm.rst
Expand Up @@ -4,7 +4,7 @@ Using PyCharm with Pyramid
**************************

This tutorial is a very brief overview of how to use PyCharm with Pyramid.
`PyCharm <http://www.jetbrains.com/pycharm/>`_ is an Integrated Development
`PyCharm <https://www.jetbrains.com/pycharm/>`_ is an Integrated Development
Environment (IDE) for Python programmers. It has numerous features including
code completion, project management, version control system (git, Subversion,
etc.), debugger, and more.
Expand All @@ -21,10 +21,10 @@ document, and corrections and improvements through a pull request are most
welcome.

.. note:: This guide was written for PyCharm 2.7.3, although many of the
topics apply for `PyCharm 5 <https://www.jetbrains.com/pycharm/>`_. There
are now `two editions for PyCharm 5
topics apply for `current versions of PyCharm <https://www.jetbrains.com/pycharm/>`_. There
are now `two editions for PyCharm
<https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html>`_:
Professional Edition and a free Community Edition. PyCharm 5 Professional
Professional Edition and a free Community Edition. PyCharm Professional
Edition includes support for Pyramid, making installation and configuration
of Pyramid much easier. Pyramid integration is not available in the free
edition, so this tutorial will help you get started with Pyramid in that
Expand Down Expand Up @@ -250,7 +250,7 @@ Template languages

To configure the template languages Mako, Jinja 2, and Chameleon first see the
PyCharm documentation `Python Template Languages
<https://www.jetbrains.com/help/pycharm/python-template-languages.html>`_ to
<https://www.jetbrains.com/help/pycharm/template-languages.html>`_ to
select the template language for your project, then see `Configuring Template
Languages
<https://www.jetbrains.com/help/pycharm/configuring-template-languages.html>`_
Expand Down Expand Up @@ -361,8 +361,8 @@ automatically by using the Script parameters `development.ini --reload`.
Debugging
=========

See the PyCharm documentation `Running and Debugging
<https://www.jetbrains.com/help/pycharm/running-and-debugging.html>`_ for
See the PyCharm documentation `Working with Run/Debug Configurations
<https://www.jetbrains.com/help/pycharm/run-debug-configuration.html>`_ for
details on how to debug your Pyramid app in PyCharm.

First, you cannot simultaneously run and debug your app. Terminate your app if
Expand Down
8 changes: 8 additions & 0 deletions docs/index.rst
Expand Up @@ -21,7 +21,15 @@ Table of contents
configuration/index
database/index
debugging/index

.. toctree::
:maxdepth: 3

deployment/index

.. toctree::
:maxdepth: 2

development_tools/index
forms/index
logging/index
Expand Down
2 changes: 1 addition & 1 deletion docs/links.rst
Expand Up @@ -33,7 +33,7 @@
.. _pyramid_routehelper: https://github.com/Pylons/pyramid_routehelper/blob/master/pyramid_routehelper/__init__.py

.. _Deform: https://docs.pylonsproject.org/projects/deform/en/latest/
.. _pyramid_simpleform: http://pythonhosted.org/pyramid_simpleform/
.. _pyramid_simpleform: https://pythonhosted.org/pyramid_simpleform/

.. _Kotti: https://kotti.readthedocs.io/en/latest/
.. _Ptah: https://ptahproject.readthedocs.io/en/latest/
Expand Down
2 changes: 1 addition & 1 deletion docs/misc/videos.rst
Expand Up @@ -2,7 +2,7 @@ Pyramid Tutorial and Informational Videos
-----------------------------------------

* Six Feet Up's `Intro to Basic Pyramid
<http://www.sixfeetup.com/blog/intro-to-the-python-framework-pyramid-and-a-sample-app>`_.
<https://sixfeetup.com/blog/intro-to-the-python-framework-pyramid-and-a-sample-app>`_.

* Daniel Nouri's "Writing A Pyramid Application" (long, 3+ hours), from
EuroPython 2012:
Expand Down
8 changes: 4 additions & 4 deletions docs/todo.rst
Expand Up @@ -26,15 +26,15 @@ TODO

- Explore static file return from handler action using wsgiapp2 + fileapp.

- http://dannynavarro.net/2011/01/14/async-web-apps-with-pyramid/
- https://dannynavarro.net/2011/01/14/async-web-apps-with-pyramid/

- http://alexmarandon.com/articles/zodb_bfg_pyramid_notes/

- https://groups.google.com/forum/#!msg/pylons-devel/0QxHTgeswrw/yTWxlDU1WKsJ
(pyramid_jinja2 i18n), also
https://github.com/Pylons/pyramid_jinja2/pull/14

- Simple asynchronous task queue: http://dannynavarro.net/2011/01/23/async-pyramid-example-done-right/
- Simple asynchronous task queue: https://dannynavarro.net/2011/01/23/async-pyramid-example-done-right/

- `Installing Pyramid on Red Hat Enterprise Linux 6
<http://fultonj.xen.prgmr.com/?page=Code&file=pyramid1-rhel6-install.php>`_ (John Fulton).
Expand All @@ -45,7 +45,7 @@ TODO

- http://whippleit.blogspot.com/2011/04/pyramid-on-google-app-engine-take-1-for.html

- Custom events: http://dannynavarro.net/2011/06/12/using-custom-events-in-pyramid/
- Custom events: https://dannynavarro.net/2011/06/12/using-custom-events-in-pyramid/

- TicTacToe and Long Polling With Pyramid: https://michael.merickel.org/2011/6/21/tictactoe-and-long-polling-with-pyramid/

Expand All @@ -57,7 +57,7 @@ TODO

- Outgrowing Pyramid Handlers: https://michael.merickel.org/2011/8/23/outgrowing-pyramid-handlers/

- Incorporate Custom Configuration (Google Analytics) into a Pyramid Application: http://russell.ballestrini.net/how-to-incorporate-custom-configuration-in-a-pyramid-application/
- Incorporate Custom Configuration (Google Analytics) into a Pyramid Application: https://russell.ballestrini.net/how-to-incorporate-custom-configuration-in-a-pyramid-application/

- Cookbook docs reorg

Expand Down
2 changes: 1 addition & 1 deletion docs/traversal_tutorial/sqlroot.rst
Expand Up @@ -28,7 +28,7 @@ transaction-awareness, and a root factory that gives us a context. We will use
.. note::

Traversal's usage of SQLAlchemy's adjacency list relationship and polymorphic
table inheritance came from `Kotti <https://pypi.python.org/pypi/Kotti>`_, a
table inheritance came from `Kotti <https://pypi.org/project/Kotti/>`_, a
Pyramid-based CMS inspired by Plone. Daniel Nouri has advanced the ideas of
first-class traversal in SQL databases with a variety of techniques and
ideas. Kotti is certainly the place to look for the most modern approach to
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Expand Up @@ -40,12 +40,11 @@
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: Pyramid",
Expand Down

0 comments on commit 6e21950

Please sign in to comment.