<metaname="description" content="Full Stack Python explains each layer of the web application stack, from the server up through the rendering in a user's browser.">
shows the open source Python projects trending today, this week, and this
month.</p>
</li>
<li>
<p>This list of <ahref="http://freepythontips.wordpress.com/2013/07/30/20-python-libraries-you-cant-live-without/">20 Python libraries you can’t live without</a>
is a wide-ranging collection from data analysis to testing tools.</p>
</li>
<li>
<p>Wikipedia actually has an extensive
<ahref="http://en.wikipedia.org/wiki/List_of_Python_software">page dedicated to Python libraries</a>
grouped by categories.</p>
</li>
</ul>
<h2>Isolating dependencies</h2>
<p>Dependencies are installed separately from system-level packages to prevent
library version conflicts. The most common isolation method is
<ahref="http://www.virtualenv.org/en/latest/">virtualenv</a>. Each virtualenv is its
own copy of the Python interpreter and depedencies in the site-packages
directory. To use a virtualenv it must first be created with the virtualenv
command and then activated.</p>
<p>The virtualenv stores dependencies in an isolated environment. The web
application then relies only on that virtualenv instance which has a separate
copy of the Python interpreter and site-packages directory. A high level of
how a server configured with virtualenv can look is shown in the picture below.</p>
<p><imgsrc="theme/img/server-setup.png" alt="How the virtualenv separates dependencies on the server." width="100%" class="technical-diagram" /></p>
<h2>Installing Python dependencies</h2>
<p>The recommended way to install Python library dependencies is with the
<ahref="http://www.pip-installer.org/en/latest/">pip</a> command when a virtualenv
is activated.</p>
<p>Pip and virtualenv work together and have complementary responsibilities.
Pip downloads and installs application dependencies from the central
Setup.py is a standard for distributing and installing Python libraries.
If you're building a Python library, such as
<ahref="http://www.python-requests.org/en/latest/">requests</a> or
<ahref="https://github.com/makaimc/underwear">underwear</a> you must include setup.py
so a dependency manager can correctly install both the library as well as
additional dependencies for the library. There's still quite a bit of
confusion in the Python community over the difference between
requirements.txt and setup.py, so read this
<ahref="https://caremad.io/blog/setup-vs-requirement/">well written post</a> for
further clarification.</p>
<h2>Application dependency resources</h2>
<ul>
<li>
<p><ahref="https://twitter.com/jonathanchu">Jon Chu</a> wrote a great introduction on
<ahref="http://www.jontourage.com/2011/02/09/virtualenv-pip-basics/">virtualenv and pip basics</a>.</p>
</li>
<li>
<p>"<ahref="http://dabapps.com/blog/introduction-to-pip-and-virtualenv-python/">A non-magical introduction to virtualenv and pip</a>
breaks down what problems these tools solve and how to use them.</p>
</li>
<li>
<p><ahref="http://www.clemesha.org/blog/modern-python-hacker-tools-virtualenv-fabric-pip/">Tools of the modern Python hacker</a>
contains detailed explanations of virtualenv, Fabric, and pip.</p>
</li>
<li>
<p>Occasionally arguments about using Python's dependency manager versus
one of Linux's depenency managers comes up. This provides
<ahref="http://notes.pault.ag/debian-python/">one perspective on that debate</a>.</p>
</li>
<li>
<p>This Stack Overflow question details how to set up a
<ahref="http://askubuntu.com/questions/244641/how-to-set-up-and-use-a-virtual-python-environment-in-ubuntu">virtual environment for Python development</a>.</p>
</li>
<li>
<p>An alternative approach for managing dependencies with Docker instead of
through virtualenv is explained in this post entitled
"<ahref="http://continuousdelivery.uglyduckling.nl/uncategorized/using-docker-as-a-python-development-environment/">Using Docker as a Python Development Environment</a>."</p>
<h4>Interested in a complete Full Stack Python book with detailed tutorials and example code? Sign up here and you'll get an alert email if a book is created. No other emails will be sent other than sign up confirmation.</h4>
$("#mc-embedded-subscribe-form").unbind('submit');//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator