merge master

This commit is contained in:
Ben Norquist
2018-11-20 12:10:31 -06:00
111 changed files with 751 additions and 381 deletions
+2
View File
@@ -10,3 +10,5 @@ docs/_build
# Ignore files generated during build
build/
venv/
+4 -2
View File
@@ -1,6 +1,8 @@
sudo: false
language: python
python:
- "3.6"
install: pip install sphinx
script:
- make doctest
- make html
- make doctest
- make html
+5 -5
View File
@@ -4,7 +4,7 @@ How to contribute
This guide is under heavy development. If you would like to contribute, please
see:
http://docs.python-guide.org/en/latest/notes/contribute/
https://docs.python-guide.org/notes/contribute/
How to test your changes
------------------------
@@ -15,15 +15,15 @@ The html version of this guide is built with [sphinx](http://www.sphinx-doc.org/
pip install --user sphinx
```
Then navigate to the directory of the makefile and ```make build``` or ```make html```. Sphinx will then generate the html in a folder called _build/html
Then navigate to the directory of the Makefile and ```make build``` or ```make html```. Sphinx will then generate the HTML in a folder called `_build/html/`
After navigating to this folder, you can then use python's built in webserver to view your changes locally:
After navigating to this folder, you can then use Python's built in webserver to view your changes locally:
``` bash
python3 -m http.server
```
By default, http.server listens on every ip address bound on your host on port 8000. To bind to a specific one, say, localhost on port 8005:
By default, `http.server` listens on every IP address bound on your host on port 8000. To bind to a specific one, say, localhost on port 8005:
``` bash
python3 -m http.server 8005 --bind 127.0.0.1
@@ -34,4 +34,4 @@ Style Guide
For all contributions, please follow the `Guide Style Guide`:
http://docs.python-guide.org/en/latest/notes/styleguide/
https://docs.python-guide.org/notes/styleguide/
+1 -1
View File
@@ -33,4 +33,4 @@ Topics include:
If you aren't fond of reading reStructuredText, there is an
almost up-to-date `HTML version at docs.python-guide.org
<http://docs.python-guide.org>`_.
<https://docs.python-guide.org>`_.
+25
View File
@@ -0,0 +1,25 @@
404 — Not Found
===============
**Sorry, but we couldn't find the page you requested.**
It looks like this was the result of either:
- a mistyped address
- an out-of-date link
`Click here to go back to the homepage. <https://docs.python-guide.org/>`_
Or, try `searching <https://docs.python-guide.org/search/>`_.
.. raw:: html
<script>
ga('send', {
hitType: 'event',
eventCategory: 'error',
eventAction: '404',
eventLabel: document.referrer,
nonInteraction: true
});
</script>
+9
View File
@@ -59,6 +59,12 @@ dirhtml:
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
netlify: dirhtml
@cp $(BUILDDIR)/dirhtml/404/index.html $(BUILDDIR)/dirhtml/404.html
@sed -i -e 's/src="..\//src="\//g' $(BUILDDIR)/dirhtml/404.html
@sed -i -e 's/href="..\//href="\//g' $(BUILDDIR)/dirhtml/404.html
@cp _extra/* $(BUILDDIR)/dirhtml/
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@@ -175,3 +181,6 @@ pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
serve:
cd $(BUILDDIR)/dirhtml && python3 -m http.server 8005
+18
View File
@@ -0,0 +1,18 @@
# Redirect rules
# Docs: https://www.netlify.com/docs/redirects/
# Redirect http to https (avoid one extra hop with an explicit rule for /en/latest/)
http://docs.python-guide.org/en/latest/* https://docs.python-guide.org/:splat 301!
http://docs.python-guide.org/* https://docs.python-guide.org/:splat 301!
# Redirect RTD prefix to /
/en/latest/* /:splat 301!
# Redirect domain aliases to primary domain
http://python-guide.org/* http://docs.python-guide.org/:splat 301!
https://python-guide.org/* https://docs.python-guide.org/:splat 301!
# Redirect Netlify version to primary domain
https://python-guide.netlify.com/* https://docs.python-guide.org/:splat 301!
/guide-book https://www.amazon.com/Hitchhikers-Guide-Python-Practices-Development/dp/1491933178/ref=as_li_ss_il?ie=UTF8&linkCode=li2&tag=bookforkind-20&linkId=804806ebdacaf3b56567347f3afbdbca 302
+105
View File
@@ -0,0 +1,105 @@
google.com, pub-2802445174821308, RESELLER, f08c47fec0942fa0
appnexus.com, 8692, DIRECT, f5ab79cb980f11d1
districtm.io, 100835, DIRECT
appnexus.com, 1908, RESELLER, f5ab79cb980f11d1
google.com, pub-9685734445476814, RESELLER, f08c47fec0942fa0
appnexus.com, 1613, reseller
appnexus.com, 3326, reseller
google.com, pub-1409765517756851, reseller
google.com, pub-4075894099602271, reseller
freewheel.tv, 146081, reseller
rubiconproject.com, 8861, reseller, 0bfd66d529a55807
aol.com, 11119, DIRECT
adtech.com, 11341, DIRECT
coxmt.com, 2000067907202, RESELLER
Openx.com, 537143344, RESELLER
indexexchange.com, 175407, RESELLER
sonobi.com, 337f0e70cc, DIRECT
rhythmone.com, 1059622079, RESELLER
contextweb.com, 560606, RESELLER
sovrn.com, 217352, DIRECT, fafdf38b16bf6b2b
lijit.com, 217352, DIRECT, fafdf38b16bf6b2b
openx.com, 537120960, RESELLER
openx.com, 83499, RESELLER
openx.com, 538959099, RESELLER
pubmatic.com, 137711, RESELLER
pubmatic.com, 156212, RESELLER
pubmatic.com, 62483, RESELLER
contextweb.com, 558511, RESELLER
gumgum.com, 11645, RESELLER, ffdef49475d318a9
openx.com, 539824308, RESELLER, 6a698e2ec38604c6
rubiconproject.com, 17822, DIRECT, 0bfd66d529a55807
gumgum.com, 13174, DIRECT, ffdef49475d318a9
33across.com, 0013300001r0t9mAAA, RESELLER
adtech.com, 9904, RESELLER
Advertising.com, 16736, RESELLER
aolcloud.net, 9904, RESELLER
appnexus.com, 1001, RESELLER, f5ab79cb980f11d1
appnexus.com, 1942, RESELLER, f5ab79cb980f11d1
appnexus.com, 2758, RESELLER, f5ab79cb980f11d1
appnexus.com, 3135, RESELLER, f5ab79cb980f11d1
appnexus.com, 7597, RESELLER, f5ab79cb980f11d1
bidtellect.com, 1407, RESELLER, 1c34aa2d85d45e93
contextweb.com, 558355, RESELLER
criteo.com, 109412, DIRECT, 9fac4a4a87c2a44f
google.com, pub-3848273848634341, RESELLER, f08c47fec0942fa0
google.com, pub-9557089510405422, RESELLER, f08c47fec0942fa0
indexexchange.com, 177754, RESELLER, 50b1c356f2c5c8fc
lkqd.com, 470, RESELLER, 59c49fa9598a0117
lkqd.net, 470, RESELLER, 59c49fa9598a0117
openx.com, 537120563, RESELLER, 6a698e2ec38604c6
openx.com, 537149485, RESELLER, 6a698e2ec38604c6
openx.com, 540003333, RESELLER, 6a698e2ec38604c6
outbrain.com, 01a755b08c8c22b15d46a8b753ab6955d4, RESELLER
outbrain.com, 01a755b08c8c22b15d46a8b753ab6955d4, DIRECT
pubmatic.com, 50758, RESELLER, 5d62403b186f2ace
revcontent.com, 76611, RESELLER
rhythmone.com, 78519861, RESELLER
smaato.com, 1100033117, RESELLER
spotx.tv, 147949, RESELLER, 7842df1d2fe2db34
spotxchange.com, 147949, RESELLER, 7842df1d2fe2db34
springserve.com, 686, DIRECT, a24eb641fc82e93d
indexexchange.com, 187196, DIRECT
rhythmone.com, 1059622079, RESELLER, a670c89d4a324e47
contextweb.com, 560606, RESELLER, 89ff185a4c4e857
ccoxmt.com, 2000067997702, RESELLER
adtech.com, 11119, RESELLER
33across.com, 0013300001r0t9mAAA, RESELLER
adtech.com, 9904, RESELLER
Advertising.com, 16736, RESELLER
aolcloud.net, 9904, RESELLER
appnexus.com, 7597, RESELLER, f5ab79cb980f11d1
bidtellect.com, 1407, RESELLER, 1c34aa2d85d45e93
contextweb.com, 558355, RESELLER
criteo.com, 109412, DIRECT, 9fac4a4a87c2a44f
indexexchange.com, 177754, RESELLER, 50b1c356f2c5c8fc
lkqd.com, 470, RESELLER, 59c49fa9598a0117
lkqd.net, 470, RESELLER, 59c49fa9598a0117
outbrain.com, 01a755b08c8c22b15d46a8b753ab6955d4, RESELLER
outbrain.com, 01a755b08c8c22b15d46a8b753ab6955d4, DIRECT
revcontent.com, 76611, RESELLER
smaato.com, 1100033117, RESELLER
spotx.tv, 147949, RESELLER, 7842df1d2fe2db34
spotxchange.com, 147949, RESELLER, 7842df1d2fe2db34
springserve.com, 686, DIRECT, a24eb641fc82e93d
+2
View File
@@ -0,0 +1,2 @@
User-agent: *
Disallow:
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File
-46
View File
@@ -1,47 +1 @@
<!-- Alabaster (krTheme++) Hacks -->
<aside id="python27">
<a href="https://www.kennethreitz.org/requests3"><strong>Requests 3.0</strong> development is underway, and your financial help is appreciated!</a>
</aside>
<!-- Python 2 Death Clock™ -->
<style type="text/css">
body { margin-top: 4em; }
#python27 {
position: fixed;
top: 0;
left: 0; right: 0;
height: auto;
text-align: center;
color: white;
background-color: black;
font-size: larger;
line-height: 3;
}
#python27 a {
color: white;
}
</style>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<script>
var death = new Date('2020-04-12');
var diff = moment.duration(death - moment());
document.querySelector('#python27 time').innerText = (diff.years() * 12) + diff.months();
</script>
-->
<script type="text/javascript">
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '56ca79a64b2ffa7a470027ea');
t.setAttribute('data-track-path', 'https://track.gaug.es/track.gif');
t.src = 'https://d36ee2fcip1434.cloudfront.net/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
+113
View File
@@ -0,0 +1,113 @@
{% extends "!layout.html" %}
{%- block extrahead %}
{# No super() because we want to avoid loading an empty custom.css file #}
{# <meta name="viewport" content="width=device-width, initial-scale=0.75, maximum-scale=0.75" /> #}
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
div.body {
min-width: initial;
max-width: initial;
}
</style>
{% if pagename == 'index' %}
<link rel="canonical" href="https://docs.python-guide.org/"/>
<meta property="og:url" content="https://docs.python-guide.org/">
{% elif pagename == '404' %}
{# No canonical on our 404 template. #}
{% else %}
<link rel="canonical" href="https://docs.python-guide.org/{{ pagename }}/"/>
<meta property="og:url" content="https://docs.python-guide.org/{{ pagename }}">
{% endif %}
<link rel="icon" type="image/png" href="https://media.readthedocs.org/images/favicon.png">
<meta name="google-site-verification" content="013PxE2_8KX9jdUSC5gr8QsfdxTXr1mFgmD9zplp5II" />
<meta name="twitter:card" content="summary">
<meta property="twitter:image" content="https://docs.python-guide.org/_static/social-card.jpg">
<meta property="og:image" content="https://docs.python-guide.org/_static/social-card.jpg">
<meta property="og:title" content="{{ title }}{{ titlesuffix }}">
<meta property="og:type" content="article">
{%- if metatags is defined %}
{# FIXME: For some reason the `meta` dict is always empty. Extract the desc from the `metatags` text. #}
<meta property="og:description" content="{{ metatags[15:-24] }}">
{%- endif %}
<script>window.rp_prop_id = '29182759436';</script>
<script src="https://srv.realpython.net/tag.js" async></script>
<script src="https://d31vxm9ubutrmw.cloudfront.net/static/js/2169.js"></script>
{# Alabaster theme native GA integration is outdated (ga.js). #}
{# Insert our own GA snippet instead. #}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-37242602-11', 'auto');
ga('send', 'pageview');
</script>
{% endblock %}
{# From: https://github.com/bitprophet/alabaster/blob/5f249677242be96601e034edb3697b7482a6abcf/alabaster/layout.html #}
{# Nav should appear before content, not after #}
{%- block content %}
{%- if theme_fixed_sidebar|lower == 'true' %}
<div class="document">
{{ sidebar() }}
{%- block document %}
<div class="documentwrapper">
{%- if render_sidebar %}
<div class="bodywrapper">
{%- endif %}
{%- block relbar_top %}
{%- if theme_show_relbar_top|tobool %}
<div class="related top">
&nbsp;
{{- rellink_markup () }}
</div>
{%- endif %}
{% endblock %}
<div class="body" role="main">
<div style="display:block;position:relative; margin-bottom: 1em;">
<div style="display:block;width:100%;padding-top:12.5%;"></div>
<div class="rpad" data-unit="8x1" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;"></div>
</div>
{% block body %} {% endblock %}
</div>
{%- block relbar_bottom %}
{%- if theme_show_relbar_bottom|tobool %}
<div class="related bottom">
&nbsp;
{{- rellink_markup () }}
</div>
{%- endif %}
{% endblock %}
{%- if render_sidebar %}
</div>
{%- endif %}
</div>
{%- endblock %}
<div class="clearer"></div>
</div>
{%- else %}
{{ super() }}
{%- endif %}
{%- endblock %}
{%- block footer %}
<div class="footer">
<div style="text-align: center;" id="waldo-tag-2171"></div>
{% if show_copyright %}<p>&copy;{{ copyright }}</p>{% endif %}
</div>
{% endblock %}
+37 -40
View File
@@ -4,72 +4,69 @@
</a>
</p>
<p style="margin-left:auto; margin-right: auto;"><iframe src="https://ghbtns.com/github-btn.html?user=realpython&repo=python-guide&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe></p>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<style>
.algolia-autocomplete{
width: 100%;
height: 1.5em
}
.algolia-autocomplete a{
border-bottom: none !important;
}
#doc_search{
width: 100%;
height: 100%;
}
</style>
<input id="doc_search" placeholder="Search the Guide" autofocus/>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: '512b0d6c0c8578bed7662f5279c2249c',
indexName: 'python-guide',
inputSelector: "#doc_search",
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
<p>
This opinionated guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis.
</p>
<h3>Stay Informed</h3>
<p>Receive updates on new releases and upcoming projects.</p>
<p><iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&type=follow&count=false"
allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
<p><a href="https://twitter.com/kennethreitz" class="twitter-follow-button" data-show-count="false">Follow @kennethreitz</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
<p><a href="http://tinyletter.com/kennethreitz">Join Mailing List</a>.</p>
<p><a href="https://saythanks.io/to/kennethreitz">Say Thanks!</a></p>
<a href="http://www.dataquest.io/?utm_source=hitchhikersguide&utm_medium=ad">
<img src="{{ pathto('_static/ad.png', 1) }}" alt="">
</a>
<hr>
<div style="display:block;position:relative;margin: 1em 0 1em 0;">
<div style="display:block;width:100%;padding-top:100%;"></div>
<div class="rpad" data-unit="1x1" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;"></div>
</div>
<h3>O'Reilly Book</h3>
<p>This guide is now available in tangible book form!</p>
<a href="https://www.amazon.com/Hitchhikers-Guide-Python-Practices-Development/dp/1491933178/ref=as_li_ss_il?ie=UTF8&linkCode=li2&tag=bookforkind-20&linkId=804806ebdacaf3b56567347f3afbdbca" target="_blank"><img border="0" src="https://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=1491933178&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=bookforkind-20" ></a><img src="//ir-na.amazon-adsystem.com/e/ir?t=bookforkind-20&l=li2&o=1&a=1491933178" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
<p><a href="/guide-book" target="_blank"><img style="max-width: 100%; text-align: center;" src="/_static/guide-book-cover.jpg" alt="Python Guide Book Cover"></a></p>
<p>All proceeds are being directly donated to the <a href="https://djangogirls.org">DjangoGirls</a> organization.</p>
<h3>Other Projects</h3>
<p>More <a href="http://kennethreitz.org/">Kenneth Reitz</a> projects:</p>
<ul>
<li><a href="http://howtopython.org/">howtopython.org</a></li>
<li><a href="http://wsl-guide.org/">wsl-guide.org</a></li>
<li><a href="http://pipenv.org/">pipenv</a></li>
<li><a href="http://pep8.org/">pep8.org</a></li>
<li><a href="http://python-requests.org">Requests: HTTP for Humans</a></li>
<li><a href="https://github.com/kennethreitz/maya">Maya: Datetimes for Humans</a></li>
<li><a href="https://github.com/kennethreitz/records">Records: SQL for Humans</a></li>
<li><a href="http://www.git-legit.org">Legit: Git for Humans</a></li>
<li><a href="http://docs.python-tablib.org/en/latest/">Tablib: Tabular Datasets</a></li>
</ul>
<h3>Contributors</h3>
<p>
This guide is the result of the collaboration of
<a href="https://github.com/kennethreitz/python-guide/graphs/contributors">hundreds of people</a>
around the world, and your contributions
<a href="http://docs.python-guide.org/en/latest/notes/contribute/">are welcome</a>!
<a href="https://docs.python-guide.org/notes/contribute/">are welcome</a>!
</p>
<h3>Useful Links</h3>
<ul>
<li><a href="http://python-guide.org/">The Guide Website</a></li>
<li><a href="http://github.com/kennethreitz/python-guide">The Guide @ GitHub</a></li>
<li><a href="http://github.com/kennethreitz/python-guide/issues">Issue Tracker</a></li>
<li><a href="https://docs.python-guide.org/">The Guide Website</a></li>
<li><a href="http://github.com/realpython/python-guide">The Guide @ GitHub</a></li>
<li><a href="http://github.com/realpython/python-guide/issues">Issue Tracker</a></li>
<li><a href="https://media.readthedocs.org/pdf/python-guide/latest/python-guide.pdf">The Guide as a PDF</a></li>
</ul>
<h3>Translations</h3>
<ul>
<li><a href="http://docs.python-guide.org/en/latest/">English</a></li>
<li><a href="https://docs.python-guide.org/">English</a></li>
<li><a href="https://python-guide-fr.readthedocs.io/fr/latest/">French</a></li>
<li><a href="https://pythonguidecn.readthedocs.io/zh/latest/">Chinese</a></li>
<li><a href="http://python-guideja.readthedocs.io/ja/latest/">Japanese</a></li>
+8 -35
View File
@@ -4,55 +4,28 @@
</a>
</p>
<p style="margin-left:auto; margin-right: auto;"><iframe src="https://ghbtns.com/github-btn.html?user=realpython&repo=python-guide&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe></p>
<p>
This opinionated guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis.
</p>
<h3>Get Updates</h3>
<p>Receive updates on new releases and upcoming projects.</p>
<p><iframe src="http://ghbtns.com/github-btn.html?user=kennethreitz&type=follow&count=false"
allowtransparency="true" frameborder="0" scrolling="0" width="200" height="20"></iframe></p>
<p><a href="https://twitter.com/kennethreitz" class="twitter-follow-button" data-show-count="false">Follow @kennethreitz</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
<p><a href="https://saythanks.io/to/kennethreitz">Say Thanks!</a></p>
<p><a href="http://tinyletter.com/kennethreitz">Join Mailing List</a>.</p>
<a href="http://www.dataquest.io/?utm_source=hitchhikersguide&utm_medium=ad">
<img src="{{ pathto('_static/ad.png', 1) }}" alt="">
</a>
<hr>
<div style="display:block;position:relative;margin: 1em 0 1em 0;">
<div style="display:block;width:100%;padding-top:100%;"></div>
<div class="rpad" data-unit="1x1" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;"></div>
</div>
<h3>O'Reilly Book</h3>
<p>This guide is now available in tangible book form!</p>
<a href="https://www.amazon.com/Hitchhikers-Guide-Python-Practices-Development/dp/1491933178/ref=as_li_ss_il?ie=UTF8&linkCode=li2&tag=bookforkind-20&linkId=804806ebdacaf3b56567347f3afbdbca" target="_blank"><img border="0" src="https://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=1491933178&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=bookforkind-20" ></a><img src="//ir-na.amazon-adsystem.com/e/ir?t=bookforkind-20&l=li2&o=1&a=1491933178" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
<p><a href="/guide-book" target="_blank"><img style="max-width: 100%; text-align: center;" src="/_static/guide-book-cover.jpg" alt="Python Guide Book Cover"></a></p>
<p>All proceeds are being directly donated to the <a href="https://djangogirls.org">DjangoGirls</a> organization.</p>
<h3>Other Projects</h3>
<p>More <a href="http://kennethreitz.org/">Kenneth Reitz</a> projects:</p>
<ul>
<li><a href="http://howtopython.org/">howtopython.org</a></li>
<li><a href="http://wsl-guide.org/">wsl-guide.org</a></li>
<li><a href="http://pipenv.org/">pipenv</a></li>
<li><a href="http://pep8.org/">pep8.org</a></li>
<li><a href="http://python-requests.org">Requests: HTTP for Humans</a></li>
<li><a href="https://github.com/kennethreitz/maya">Maya: Datetimes for Humans</a></li>
<li><a href="https://github.com/kennethreitz/records">Records: SQL for Humans</a></li>
<li><a href="http://www.git-legit.org">Legit: Git for Humans</a></li>
<li><a href="http://docs.python-tablib.org/en/latest/">Tablib: Tabular Datasets</a></li>
</ul>
<h3>Translations</h3>
<ul>
<li><a href="http://docs.python-guide.org/en/latest/">English</a></li>
<li><a href="https://docs.python-guide.org/">English</a></li>
<li><a href="https://python-guide-fr.readthedocs.io/fr/latest/">French</a></li>
<li><a href="https://pythonguidecn.readthedocs.io/zh/latest/">Chinese</a></li>
<li><a href="http://python-guideja.readthedocs.io/ja/latest/">Japanese</a></li>
+4 -4
View File
@@ -46,7 +46,7 @@ master_doc = 'index'
# General information about the project.
project = u'pythonguide'
copyright = u'2016. A <a href="http://kennethreitz.com/pages/open-projects.html">Kenneth Reitz</a> Project. <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>'
copyright = u'20112018 <a href="http://kennethreitz.com/pages/open-projects.html">Kenneth Reitz</a> &amp; <a href="https://realpython.com">Real Python</a>. <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -106,11 +106,11 @@ html_theme = 'alabaster'
# documentation.
html_theme_options = {
'show_powered_by': False,
'github_user': 'kennethreitz',
'github_user': 'realpython',
'github_repo': 'python-guide',
'github_banner': True,
'show_related': False,
'note_bg': '#FFF59C'
'note_bg': '#FFF59C',
}
# Add any paths that contain custom themes here, relative to this directory.
@@ -241,7 +241,7 @@ man_pages = [
epub_title = u'pythonguide'
epub_author = u'Kenneth Reitz'
epub_publisher = u'Kenneth Reitz'
epub_copyright = u'2016, Kenneth Reitz'
epub_copyright = u'20112018, Kenneth Reitz & Real Python'
# The language of the text. It defaults to the language option
# or en if the language is not set.
+1 -1
View File
@@ -1,7 +1,7 @@
Your Development Environment
============================
.. image:: https://farm3.staticflickr.com/2930/33175624924_7febc46cc4_k_d.jpg
.. image:: /_static/photos/33175624924_7febc46cc4_k_d.jpg
Text Editors
+1 -1
View File
@@ -3,7 +3,7 @@
Further Configuration of Pip and Virtualenv
===========================================
.. image:: https://farm4.staticflickr.com/3934/34018732105_f0e6758859_k_d.jpg
.. image:: /_static/photos/34018732105_f0e6758859_k_d.jpg
Requiring an active virtual environment for ``pip``
---------------------------------------------------
+11 -7
View File
@@ -3,7 +3,7 @@
Pipenv & Virtual Environments
=============================
.. image:: https://farm5.staticflickr.com/4290/35294660055_42c02b2316_k_d.jpg
.. image:: /_static/photos/35294660055_42c02b2316_k_d.jpg
This tutorial walks you through installing and using Python packages.
@@ -47,7 +47,7 @@ install the latest 3.x version from `python.org`_ or refer to the
`getting started tutorial`_ for an introduction to using your operating
system's shell and interacting with Python.
Additionally, you'll need to make sure you have :ref:`pip` available. You can
Additionally, you'll need to make sure you have `pip`_ available. You can
check this by running:
.. code-block:: bash
@@ -60,22 +60,23 @@ using your OS package manager, you may have to `install pip <https://pip.pypa.io
.. _getting started tutorial: https://opentechschool.github.io/python-beginners/en/getting_started.html#what-is-python-exactly
.. _python.org: https://python.org
.. _pip: https://pypi.org/project/pip/
.. _Homebrew: https://brew.sh
.. _Installing Python: http://docs.python-guide.org/en/latest/starting/installation/
.. _Installing Python: https://docs.python-guide.org/starting/installation/
Installing Pipenv
-----------------
:ref:`Pipenv` is a dependency manager for Python projects. If you're familiar
`Pipenv`_ is a dependency manager for Python projects. If you're familiar
with Node.js' `npm`_ or Ruby's `bundler`_, it is similar in spirit to those
tools. While :ref:`pip` can install Python packages, Pipenv is recommended as
tools. While `pip`_ can install Python packages, Pipenv is recommended as
it's a higher-level tool that simplifies dependency management for common use
cases.
Use ``pip`` to install Pipenv:
.. code-block:: python
.. code-block:: console
$ pip install --user pipenv
@@ -100,6 +101,7 @@ Use ``pip`` to install Pipenv:
user ``PATH`` permanently in the `Control Panel`_. You may need to log
out for the ``PATH`` changes to take effect.
.. _Pipenv: https://docs.pipenv.org/
.. _npm: https://www.npmjs.com/
.. _bundler: http://bundler.io/
.. _user base: https://docs.python.org/3/library/site.html#site.USER_BASE
@@ -120,11 +122,13 @@ tutorial) and run:
$ pipenv install requests
Pipenv will install the excellent `Requests`_ library and create a ``Pipfile``
for you in your project's directory. The :ref:`Pipfile` is used to track which
for you in your project's directory. The `Pipfile`_ is used to track which
dependencies your project needs in case you need to re-install them, such as
when you share your project with others. You should get output similar to this
(although the exact paths shown will vary):
.. _Pipfile: https://github.com/pypa/pipfile
.. code-block:: text
Creating a Pipfile for this project...
+4 -1
View File
@@ -3,13 +3,16 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. meta::
:description: An opinionated guide to the Python programming language and a best practice handbook to the installation, configuration, and usage of Python on a daily basis.
The Hitchhiker's Guide to Python!
=================================
Greetings, Earthling! Welcome to The Hitchhiker's Guide to Python.
**This is a living, breathing guide.** If you'd like to contribute,
`fork us on GitHub <https://github.com/kennethreitz/python-guide>`_!
`fork us on GitHub <https://github.com/realpython/python-guide>`_!
This handcrafted guide exists to provide both novice and expert Python
developers a best practice handbook to the installation, configuration, and
+12 -3
View File
@@ -3,7 +3,7 @@
The Community
=============
.. image:: https://farm5.staticflickr.com/4225/34689432801_78d97ecec9_k_d.jpg
.. image:: /_static/photos/34689432801_78d97ecec9_k_d.jpg
BDFL
----
@@ -71,7 +71,7 @@ Here's an overview of the PEP acceptance workflow:
Python Conferences
--------------------------
------------------
The major events for the Python community are developer conferences. The two
most notable conferences are PyCon, which is held in the US, and its European
@@ -81,8 +81,17 @@ A comprehensive list of conferences is maintained at `pycon.org <http://www.pyco
Python User Groups
--------------------------
------------------
User Groups are where a bunch of Python developers meet to present or talk
about Python topics of interest. A list of local user groups is maintained at
the `Python Software Foundation Wiki <http://wiki.python.org/moin/LocalUserGroups>`_.
Online Communities
------------------
`PythonistaCafe <https://www.pythonistacafe.com>`_ is an invite-only, online community
of Python and software development enthusiasts helping each other succeed and grow.
Think of it as a club of mutual improvement for Pythonistas where a broad range of
programming questions, career advice, and other topics are discussed every day.
+1 -1
View File
@@ -1,7 +1,7 @@
Documentation
=============
.. image:: https://farm5.staticflickr.com/4178/33928823133_2f3d32cf32_k_d.jpg
.. image:: /_static/photos/33928823133_2f3d32cf32_k_d.jpg
Official Documentation
----------------------
+1 -1
View File
@@ -1,7 +1,7 @@
Introduction
============
.. image:: https://farm5.staticflickr.com/4180/34725946825_0f85497e60_k_d.jpg
.. image:: /_static/photos/34725946825_0f85497e60_k_d.jpg
From the `official Python website <http://python.org/about/>`_:
+35 -14
View File
@@ -1,7 +1,7 @@
Learning Python
===============
.. image:: https://farm3.staticflickr.com/2840/32800783863_11a00db52c_k_d.jpg
.. image:: /_static/photos/32800783863_11a00db52c_k_d.jpg
Beginner
--------
@@ -15,8 +15,22 @@ quick-start guide to the language.
`The Python Tutorial <http://docs.python.org/tutorial/index.html>`_
Real Python
~~~~~~~~~~~
Real Python is a repository of free and in-depth Python tutorials created by a diverse team of professional Python developers. At Real Python you can learn all things Python from the ground up. Everything from the absolute basics of Python, to web development and web scraping, to data visualization, and beyond.
`Real Python <https://realpython.com/>`_
Python Basics
~~~~~~~~~~~~~
pythonbasics.org is an introductiory tutorial for beginners. The tutorial includes exercises. It covers the basics and there are also in-depth lessons like object oriented programming and regular expressions.
`Python basics <https://pythonbasics.org/>`_
Python for Beginners
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
thepythonguru.com is a tutorial focuses on beginner programmers. It covers many python concepts
in depth. It also teaches you some advance constructs of python like lambda expression, regular expression.
@@ -25,14 +39,6 @@ At last it finishes off with tutorial "How to access MySQL db using python"
`Python for beginners <http://thepythonguru.com/>`_
Learn Python for Data Science Interactively
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you prefer an online interactive environment to learn Python for Data Science, `this free python tutorial by DataCamp <https://www.datacamp.com/courses/intro-to-python-for-data-science?tap_a=5644-dce66f&tap_s=116411-750171>`_ is a great way to get started. If you're already somewhat advanced and interested in machine learning, check out this `course on Supervised Learning with scikit-learn <https://www.datacamp.com/courses/supervised-learning-with-scikit-learn?tap_a=5644-dce66f&tap_s=116411-750171>`_, by one the core developers of scikit-learn.
`Python for data science <http://datacamp.com/?tap_a=5644-dce66f&tap_s=116411-750171>`_
Learn Python Interactive Tutorial
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -44,12 +50,10 @@ without having to install Python locally.
`Learn Python <http://www.learnpython.org/>`_
If you want a more traditional book, *Python For You and Me* is an excellent
resource for learning all aspects of the language.
`Python for You and Me <https://pymbook.readthedocs.io/>`_
`Learn Python Interactively with DataCamp! <https://www.datacamp.com/>`_
Learn Python Step by Step
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -116,7 +120,7 @@ Dive Into Python 3 is a good book for those ready to jump in to Python 3. It's
a good read if you are moving from Python 2 to 3 or if you already have some
experience programming in another language.
`Dive Into Python 3 <http://www.diveintopython3.net/>`_
`Dive Into Python 3 <http://diveintopython3.problemsolving.io/>`_
Think Python: How to Think Like a Computer Scientist
@@ -191,6 +195,15 @@ making the process of learning Python fun and engaging.
Intermediate
------------
Python Tricks: The Book
~~~~~~~~~~~~~~~~~~~~~~~
Discover Python's best practices with simple examples and start writing even more beautiful + Pythonic code. "Python Tricks: The Book" shows you exactly how.
Youll master intermediate and advanced-level features in Python with practical examples and a clear narrative:
`Python Tricks: The Book <https://realpython.com/products/python-tricks-book/>`_
Effective Python
~~~~~~~~~~~~~~~~
@@ -266,7 +279,7 @@ puts the emphasis on numerical methods and how to implement them in Python.
`Numerical Methods in Engineering with Python <http://www.cambridge.org/us/academic/subjects/engineering/engineering-mathematics-and-programming/numerical-methods-engineering-python-2nd-edition>`_
Miscellaneous topics
Miscellaneous Topics
--------------------
Problem Solving with Algorithms and Data Structures
@@ -315,6 +328,14 @@ web app from scratch.
`Fullstack Python <https://www.fullstackpython.com>`_
PythonistaCafe
~~~~~~~~~~~~~~
PythonistaCafe is an invite-only, online community of Python and software development enthusiasts helping each other succeed and grow. Think of it as a club of mutual improvement for Pythonistas where a broad range of programming questions, career advice, and other topics are discussed every day.
`PythonistaCafe <https://www.pythonistacafe.com>`_
References
----------
+16 -9
View File
@@ -1,7 +1,22 @@
News
====
.. image:: https://farm4.staticflickr.com/3804/33573767786_eececc5d27_k_d.jpg
.. image:: /_static/photos/33573767786_eececc5d27_k_d.jpg
PyCoders Weekly
~~~~~~~~~~~~~~~~
PyCoders Weekly is a free weekly Python newsletter for Python developers
by Python developers (Projects, Articles, News, and Jobs).
`PyCoders Weekly <https://pycoders.com/>`_
Real Python
~~~~~~~~~~~
At Real Python you can learn all things Python from the ground up, with weekly free and in-depth tutorials. Everything from the absolute basics of Python, to web development and web scraping, to data visualization, and beyond.
`Real Python <https://realpython.com/>`_
Planet Python
~~~~~~~~~~~~~
@@ -32,14 +47,6 @@ A short-form Python podcast covering recent developer headlines.
`Python Bytes <https://pythonbytes.fm>`_
Pycoder's Weekly
~~~~~~~~~~~~~~~~
Pycoder's Weekly is a free weekly Python newsletter for Python developers
by Python developers (Projects, Articles, News, and Jobs).
`Pycoder's Weekly <http://www.pycoders.com/>`_
Python Weekly
~~~~~~~~~~~~~
+1 -1
View File
@@ -1,7 +1,7 @@
Contribute
~~~~~~~~~~
.. image:: https://farm3.staticflickr.com/2858/33573769116_49c1ef51e7_k_d.jpg
.. image:: /_static/photos/33573769116_49c1ef51e7_k_d.jpg
Python-guide is under active development, and contributors are welcome.
+1 -1
View File
@@ -2,6 +2,6 @@
License
=======
.. image:: https://farm4.staticflickr.com/3762/32800805573_568d6b72fd_k_d.jpg
.. image:: /_static/photos/32800805573_568d6b72fd_k_d.jpg
The Guide is licensed under the `Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license <https://creativecommons.org/licenses/by-nc-sa/3.0/>`_.
+1 -1
View File
@@ -4,7 +4,7 @@
The Guide Style Guide
=====================
.. image:: https://farm4.staticflickr.com/3684/33573755856_7f43d43adf_k_d.jpg
.. image:: /_static/photos/33573755856_7f43d43adf_k_d.jpg
As with all documentation, having a consistent format helps make the
document more understandable. In order to make The Guide easier to digest,
+1 -1
View File
@@ -1,7 +1,7 @@
Systems Administration
======================
.. image:: https://farm5.staticflickr.com/4179/34435690580_3afec7d4cd_k_d.jpg
.. image:: /_static/photos/34435690580_3afec7d4cd_k_d.jpg
Fabric
------
+1 -1
View File
@@ -1,7 +1,7 @@
Continuous Integration
======================
.. image:: https://farm5.staticflickr.com/4173/33907150594_9abba7ad0a_k_d.jpg
.. image:: /_static/photos/33907150594_9abba7ad0a_k_d.jpg
.. note::
For advice on writing your tests, see :doc:`/writing/tests`.
+12 -1
View File
@@ -1,7 +1,7 @@
Command-line Applications
=========================
.. image:: https://farm5.staticflickr.com/4272/34435690330_11930b5987_k_d.jpg
.. image:: /_static/photos/34435690330_11930b5987_k_d.jpg
Command-line applications, also referred to as
`Console Applications <http://en.wikipedia.org/wiki/Console_application>`_,
@@ -74,3 +74,14 @@ for both simple and complex command line applications as well
as support rapid development needs without sacrificing quality.
Cement is flexible, and it's use cases span from the simplicity of a micro-framework
to the complexity of a meg-framework.
Python Fire
-----------
`Python Fire <https://github.com/google/python-fire/>`_ is a library for
automatically generating command line interfaces from absolutely any Python
object. It can help debug Python code more easily from the command line,
create CLI interfaces to existing code, allow you to interactively explore
code in a REPL, and simplify transitioning between Python and Bash (or any
other shell).
+1 -1
View File
@@ -1,7 +1,7 @@
Interfacing with C/C++ Libraries
================================
.. image:: https://farm5.staticflickr.com/4173/34725951345_c8f5959a2e_k_d.jpg
.. image:: /_static/photos/34725951345_c8f5959a2e_k_d.jpg
C Foreign Function Interface
----------------------------
+1 -1
View File
@@ -1,7 +1,7 @@
Network Applications
====================
.. image:: https://farm5.staticflickr.com/4251/34364815780_bea6614025_k_d.jpg
.. image:: /_static/photos/34364815780_bea6614025_k_d.jpg
HTTP
::::
+1 -1
View File
@@ -1,7 +1,7 @@
Cryptography
============
.. image:: https://farm5.staticflickr.com/4220/33907152824_bf91078cc1_k_d.jpg
.. image:: /_static/photos/33907152824_bf91078cc1_k_d.jpg
Cryptography
------------
+1 -1
View File
@@ -1,7 +1,7 @@
Databases
=========
.. image:: https://farm5.staticflickr.com/4225/33907152464_a99fdcc8de_k_d.jpg
.. image:: /_static/photos/33907152464_a99fdcc8de_k_d.jpg
DB-API
------
+14 -2
View File
@@ -1,7 +1,7 @@
GUI Applications
================
.. image:: https://farm5.staticflickr.com/4250/33907143624_cd621b535c_k_d.jpg
.. image:: /_static/photos/33907143624_cd621b535c_k_d.jpg
Alphabetical list of GUI Applications.
@@ -59,7 +59,9 @@ PySide
------
PySide is a Python binding of the cross-platform GUI toolkit Qt.
pip install pyside
.. code-block:: console
$ pip install pyside
https://wiki.qt.io/Category:LanguageBindings::PySide::Downloads
@@ -88,6 +90,16 @@ Qt
is widely used for developing software with a GUI but can also be used for
non-GUI applications.
PySimpleGUI
------
`PySimpleGUI <https://pysimplegui.readthedocs.io/>`_ is a wrapper for the Tkinter. The amount of code required to implement custom GUIs is much shorter using PySimpleGUI than if the same GUI were written directly using tkinter. Having Tkinter as a base results in the ability to run on a larger number of platforms than other GUI frameworks.
.. code-block:: console
$ pip install pysimplegui
PySimpleGUI is contained in a single PySimpleGUI.py file. Should pip installation be impossible, pasting the PySimpleGUI.py file into a project's folder is all that's required to import and begin using.
Toga
----
`Toga <https://toga.readthedocs.io/en/latest/>`_ is a Python native, OS
+1 -1
View File
@@ -2,7 +2,7 @@
Image Manipulation
==================
.. image:: https://farm5.staticflickr.com/4157/34575689432_3de8e9a348_k_d.jpg
.. image:: /_static/photos/34575689432_3de8e9a348_k_d.jpg
Most image processing and manipulation techniques can be carried out
effectively using two libraries: Python Imaging Library (PIL) and OpenSource
+1 -1
View File
@@ -1,7 +1,7 @@
JSON
====
.. image:: https://farm5.staticflickr.com/4174/33928819683_97b5c6a184_k_d.jpg
.. image:: /_static/photos/33928819683_97b5c6a184_k_d.jpg
The `json <https://docs.python.org/2/library/json.html>`_ library can parse
JSON from strings or files. The library parses JSON into a Python dictionary
+1 -1
View File
@@ -2,7 +2,7 @@
Machine Learning
================
.. image:: https://farm4.staticflickr.com/3954/34018729885_002ced9b54_k_d.jpg
.. image:: /_static/photos/34018729885_002ced9b54_k_d.jpg
Python has a vast number of libraries for data analysis, statistics and Machine Learning itself, making it a language of choice for many data scientists.
+1 -1
View File
@@ -1,7 +1,7 @@
Networking
==========
.. image:: https://farm3.staticflickr.com/2892/34151833832_6bdfd930af_k_d.jpg
.. image:: /_static/photos/34151833832_6bdfd930af_k_d.jpg
Twisted
-------
+1 -1
View File
@@ -2,7 +2,7 @@
Scientific Applications
=======================
.. image:: https://farm3.staticflickr.com/2890/33925223870_97e44f5629_k_d.jpg
.. image:: /_static/photos/33925223870_97e44f5629_k_d.jpg
Context
:::::::
+1 -3
View File
@@ -1,7 +1,7 @@
HTML Scraping
=============
.. image:: https://farm3.staticflickr.com/2900/34268661876_442428e122_k_d.jpg
.. image:: /_static/photos/34268661876_442428e122_k_d.jpg
Web Scraping
------------
@@ -105,5 +105,3 @@ using Python or we can save it to a file and share it with the world.
Some more cool ideas to think about are modifying this script to iterate
through the rest of the pages of this example dataset, or rewriting this
application to use threads for improved speed.
If you want to learn how to import data using python - this `DataCamp course on Importing Data <https://www.datacamp.com/courses/importing-data-in-r-part-1?tap_a=5644-dce66f&tap_s=116411-750171>`_ is a great place to start.
+1 -1
View File
@@ -2,7 +2,7 @@
Data Serialization
==================
.. image:: https://farm3.staticflickr.com/2927/33467946364_3e59bd376a_k_d.jpg
.. image:: /_static/photos/33467946364_3e59bd376a_k_d.jpg
What is data serialization?
---------------------------
+1 -1
View File
@@ -1,7 +1,7 @@
Speed
=====
.. image:: https://farm3.staticflickr.com/2826/33175625804_e225b90f3e_k_d.jpg
.. image:: /_static/photos/33175625804_e225b90f3e_k_d.jpg
CPython, the most commonly used implementation of Python, is slow for CPU bound
tasks. `PyPy`_ is fast.
+37 -10
View File
@@ -2,7 +2,7 @@
Web Applications & Frameworks
=============================
.. image:: https://farm3.staticflickr.com/2891/34309496175_b82d104282_k_d.jpg
.. image:: /_static/photos/34309496175_b82d104282_k_d.jpg
As a powerful scripting language adapted to both fast prototyping
and bigger projects, Python is widely used in web application
@@ -51,7 +51,7 @@ Development Web Server
Django
------
`Django <http://www.djangoproject.com>`_ is a "batteries included" web
`Django <https://www.djangoproject.com>`_ is a "batteries included" web
application framework, and is an excellent choice for creating content-oriented
websites. By providing many utilities and patterns out of the box, Django aims
to make it possible to build complex, database-backed web applications quickly,
@@ -91,6 +91,19 @@ suit your needs. Or, you can easily use any library you want yourself!
Flask is default choice for any Python web application that isn't a good
fit for Django.
Falcon
------
`Falcon <https://falconframework.org/>`_ is a good choice when your goal is
to build RESTful API microservices that are fast and scalable.
It is a reliable, high-performance Python web framework for building large-scale
app backends and microservices. Falcon encourages the REST architectural style of
mapping URIs to resources, trying to do as little as possible while remaining highly effective.
Falcon highlights four main focuses: speed, reliability, flexibility and debuggability.
It implements HTTP through "responders" such as ``on_get()``, ``on_put()``, etc.
These responders receive intuitive request and response objects.
Tornado
--------
@@ -107,12 +120,26 @@ Pyramid
`Pyramid <https://trypyramid.com/>`_ is a very flexible framework with a heavy
focus on modularity. It comes with a small number of libraries ("batteries")
built-in, and encourages users to extend its base functionality.
built-in, and encourages users to extend its base functionality. A set of
provided cookiecutter templates helps making new project decisions for users.
It poweres one of the most important parts of python infrastucture
`PyPI <https://pypi.org/>`_.
Pyramid does not have a large user base, unlike Django and Flask. It's a
capable framework, but not a very popular choice for new Python web
applications today.
Masonite
--------
`Masonite <https://docs.masoniteproject.com>`_ is a modern and developer centric, "batteries included", web framework.
The Masonite framework follows the MVC (Model-View-Controller) architecture pattern and is heavily inspired by frameworks such as Rails and Laravel, so if you are coming to Python from a Ruby or PHP background then you will feel right at home!
Masonite comes with a lot of functionality out of the box including a powerful IOC container with auto resolving dependency injection, craft command line tools and the Orator active record style ORM.
Masonite is perfect for beginners or experienced developers alike and works hard to be fast and easy from install through to deployment. Try it once and youll fall in love.
Web Servers
:::::::::::
@@ -142,7 +169,7 @@ servers and provide top performance [3]_.
Gunicorn
--------
`Gunicorn <http://gunicorn.org/>`_ (Green Unicorn) is a pure-python WSGI
`Gunicorn <https://gunicorn.org/>`_ (Green Unicorn) is a pure-python WSGI
server used to serve Python applications. Unlike other Python web servers,
it has a thoughtful user-interface, and is extremely easy to use and
configure.
@@ -210,14 +237,14 @@ details.
Heroku
------
`Heroku <http://www.heroku.com/python>`_ offers first-class support for
`Heroku <https://www.heroku.com/python>`_ offers first-class support for
Python 2.73.5 applications.
Heroku supports all types of Python web applications, servers, and frameworks.
Applications can be developed on Heroku for free. Once your application is
ready for production, you can upgrade to a Hobby or Professional application.
Heroku maintains `detailed articles <https://devcenter.heroku.com/categories/python>`_
Heroku maintains `detailed articles <https://devcenter.heroku.com/categories/python-support>`_
on using Python with Heroku, as well as `step-by-step instructions
<https://devcenter.heroku.com/articles/getting-started-with-python>`_ on
how to set up your first application.
@@ -227,7 +254,7 @@ Heroku is the recommended PaaS for deploying Python web applications today.
Eldarion
--------
`Eldarion <http://eldarion.cloud/>`_ (formely known as Gondor) is a PaaS powered
`Eldarion <https://eldarion.cloud/>`_ (formely known as Gondor) is a PaaS powered
by Kubernetes, CoreOS, and Docker. They support any WSGI application and have a
guide on deploying `Django projects <https://eldarion-gondor.github.io/docs/how-to/setup-deploy-first-django-project/>`_.
@@ -390,12 +417,12 @@ Chameleon
---------
`Chameleon <https://chameleon.readthedocs.io/>`_ Page Templates are an HTML/XML template
engine implementation of the `Template Attribute Language (TAL) <http://en.wikipedia.org/wiki/Template_Attribute_Language>`_,
engine implementation of the `Template Attribute Language (TAL) <https://en.wikipedia.org/wiki/Template_Attribute_Language>`_,
`TAL Expression Syntax (TALES) <https://chameleon.readthedocs.io/en/latest/reference.html#expressions-tales>`_,
and `Macro Expansion TAL (Metal) <https://chameleon.readthedocs.io/en/latest/reference.html#macros-metal>`_ syntaxes.
Chameleon is available for Python 2.5 and up (including 3.x and pypy), and
is commonly used by the `Pyramid Framework <http://trypyramid.com>`_.
is commonly used by the `Pyramid Framework <https://trypyramid.com/>`_.
Page Templates add within your document structure special element attributes
and text markup. Using a set of simple language constructs, you control the
@@ -492,5 +519,5 @@ Mako is well respected within the Python web community.
.. rubric:: References
.. [1] `The mod_python project is now officially dead <http://blog.dscpl.com.au/2010/06/modpython-project-is-now-officially.html>`_
.. [2] `mod_wsgi vs mod_python <http://www.modpython.org/pipermail/mod_python/2007-July/024080.html>`_
.. [2] `mod_wsgi vs mod_python <http://modpython.org/pipermail/mod_python/2007-July/024080.html>`_
.. [3] `Benchmark of Python WSGI Servers <http://nichol.as/benchmark-of-python-web-servers>`_
+1 -1
View File
@@ -1,7 +1,7 @@
XML parsing
===========
.. image:: https://farm3.staticflickr.com/2808/33888714601_a1f7d020a2_k_d.jpg
.. image:: /_static/photos/33888714601_a1f7d020a2_k_d.jpg
untangle
--------
+2 -2
View File
@@ -4,7 +4,7 @@
Freezing Your Code
==================
.. image:: https://farm5.staticflickr.com/4227/33907151034_e0a9e53402_k_d.jpg
.. image:: /_static/photos/33907151034_e0a9e53402_k_d.jpg
"Freezing" your code is creating a single-file executable file to distribute
to end-users, that contains all of your application code as well as the
@@ -116,7 +116,7 @@ resides.
py2exe
~~~~~~
Prerequisite is to install :ref:`Python on Windows <install-windows>`.
Prerequisite is to install :ref:`Python on Windows <install-windows>`. The last release of py2exe is from the year 2014. There is not active development.
1. Download and install http://sourceforge.net/projects/py2exe/files/py2exe/
+1 -1
View File
@@ -4,7 +4,7 @@
Packaging Your Code
===================
.. image:: https://farm5.staticflickr.com/4325/36137234682_be6898bf57_k_d.jpg
.. image:: /_static/photos/36137234682_be6898bf57_k_d.jpg
Package your code to share it with other developers. For example
to share a library for other developers to use in their application,
+1 -1
View File
@@ -3,7 +3,7 @@
Installing Python 2 on Linux
=============================
.. image:: https://farm5.staticflickr.com/4268/34435688560_4cc2a7bcbb_k_d.jpg
.. image:: /_static/photos/34435688560_4cc2a7bcbb_k_d.jpg
.. note::
Check out our :ref:`guide for installing Python 3 on Linux<install3-linux>`.
+1 -1
View File
@@ -3,7 +3,7 @@
Installing Python 2 on Mac OS X
===============================
.. image:: https://farm5.staticflickr.com/4268/34435688560_4cc2a7bcbb_k_d.jpg
.. image:: /_static/photos/34435688560_4cc2a7bcbb_k_d.jpg
.. note::
Check out our :ref:`guide for installing Python 3 on OS X<install3-osx>`.
+2 -2
View File
@@ -3,12 +3,12 @@
Installing Python 2 on Windows
==============================
.. image:: https://farm5.staticflickr.com/4268/34435688560_4cc2a7bcbb_k_d.jpg
.. image:: /_static/photos/34435688560_4cc2a7bcbb_k_d.jpg
.. note::
Check out our :ref:`guide for installing Python 3 on Windows<install3-windows>`.
First, download the `latest version <https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi>`_
First, download the `latest version <https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi>`_
of Python 2.7 from the official website. If you want to be sure you are installing a fully
up-to-date version, click the Downloads > Windows link from the home page of the
`Python.org web site <http://python.org>`_ .
+1 -1
View File
@@ -3,7 +3,7 @@
Installing Python 3 on Linux
============================
.. image:: https://farm5.staticflickr.com/4276/34435689480_2e6f358510_k_d.jpg
.. image:: /_static/photos/34435689480_2e6f358510_k_d.jpg
This document describes how to install Python 3.6 on Ubuntu Linux machines.
+3 -3
View File
@@ -5,7 +5,7 @@
Installing Python 3 on Mac OS X
===============================
.. image:: https://farm5.staticflickr.com/4276/34435689480_2e6f358510_k_d.jpg
.. image:: /_static/photos/34435689480_2e6f358510_k_d.jpg
The latest version of Mac OS X, High Sierra, **comes with Python 2.7 out of the box**.
@@ -112,8 +112,8 @@ The rest of the guide will assume that ``python`` references Python 3.
# Do I have a Python 3 installed?
$ python --version
Python 3.6.4 # Success!
# If you still see 2.7 ensure in PATH /usr/local/bin/ takes precedence over /usr/bin/
Python 3.7.1 # Success!
Pipenv & Virtual Environments
-----------------------------
+1 -1
View File
@@ -3,7 +3,7 @@
Installing Python 3 on Windows
==============================
.. image:: https://farm5.staticflickr.com/4276/34435689480_2e6f358510_k_d.jpg
.. image:: /_static/photos/34435689480_2e6f358510_k_d.jpg
First, follow the installation instructions for `Chocolatey <https://chocolatey.org/install>`_.
It's a community system packager manager for Windows 7+. (It's very much like Homebrew on OSX.)
+1 -1
View File
@@ -3,7 +3,7 @@
Properly Installing Python
==========================
.. image:: https://farm5.staticflickr.com/4303/36137232412_fdcb0f84eb_k_d.jpg
.. image:: /_static/photos/36137232412_fdcb0f84eb_k_d.jpg
There's a good chance that you already have Python on your operating system.

Some files were not shown because too many files have changed in this diff Show More