mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Fixed all H2 headings
Before, H2 fomratting was not consistent. Now, all H2 headings use over/under asterisks.
This commit is contained in:
@@ -5,8 +5,10 @@ Systems Administration
|
||||
|
||||
.. image:: /_static/photos/34435690580_3afec7d4cd_k_d.jpg
|
||||
|
||||
|
||||
******
|
||||
Fabric
|
||||
------
|
||||
******
|
||||
|
||||
`Fabric <http://docs.fabfile.org>`_ is a library for simplifying system
|
||||
administration tasks. While Chef and Puppet tend to focus on managing servers
|
||||
@@ -73,8 +75,10 @@ programs, and host grouping.
|
||||
|
||||
`Fabric Documentation <http://docs.fabfile.org>`_
|
||||
|
||||
|
||||
****
|
||||
Salt
|
||||
----
|
||||
****
|
||||
|
||||
`Salt <http://saltstack.org/>`_ is an open source infrastructure management
|
||||
tool. It supports remote command execution from a central point (master host)
|
||||
@@ -132,8 +136,9 @@ State files can be written using YAML, the Jinja2 template system or pure Python
|
||||
`Salt Documentation <http://docs.saltstack.com>`_
|
||||
|
||||
|
||||
******
|
||||
Psutil
|
||||
------
|
||||
******
|
||||
|
||||
`Psutil <https://github.com/giampaolo/psutil/>`_ is an interface to different
|
||||
system information (e.g. CPU, memory, disks, network, users and processes).
|
||||
@@ -188,8 +193,10 @@ A full terminal application like a widely extended top which is based on
|
||||
psutil and with the ability of a client-server monitoring is
|
||||
`glance <https://github.com/nicolargo/glances/>`_.
|
||||
|
||||
|
||||
*******
|
||||
Ansible
|
||||
-------
|
||||
*******
|
||||
|
||||
`Ansible <http://ansible.com/>`_ is an open source system automation tool.
|
||||
The biggest advantage over Puppet or Chef is it does not require an agent on
|
||||
@@ -240,8 +247,10 @@ about Ansible, read the `Ansible Docs <http://docs.ansible.com/>`_.
|
||||
great and detailed introduction to getting started with Ansible.
|
||||
|
||||
|
||||
****
|
||||
Chef
|
||||
----
|
||||
****
|
||||
|
||||
`Chef <https://www.chef.io/chef/>`_ is a systems and cloud infrastructure automation
|
||||
framework that makes it easy to deploy servers and applications to any physical,
|
||||
virtual, or cloud location. In case this is your choice for configuration management,
|
||||
@@ -271,8 +280,10 @@ found on the `Chef Supermarket <https://supermarket.chef.io/cookbooks>`_.
|
||||
|
||||
- `Chef Documentation <https://docs.chef.io/>`_
|
||||
|
||||
|
||||
******
|
||||
Puppet
|
||||
------
|
||||
******
|
||||
|
||||
`Puppet <http://puppetlabs.com>`_ is IT Automation and configuration management
|
||||
software from Puppet Labs that allows System Administrators to define the state
|
||||
@@ -367,13 +378,17 @@ everytime the sshd configuration file is changed.
|
||||
|
||||
For more information, refer to the `Puppet Labs Documentation <http://docs.puppetlabs.com>`_
|
||||
|
||||
|
||||
*********
|
||||
Blueprint
|
||||
---------
|
||||
*********
|
||||
|
||||
.. todo:: Write about Blueprint
|
||||
|
||||
|
||||
********
|
||||
Buildout
|
||||
--------
|
||||
********
|
||||
|
||||
`Buildout <http://www.buildout.org>`_ is an open source software build tool.
|
||||
Buildout is created using the Python programming language. It implements a
|
||||
@@ -382,8 +397,10 @@ Buildout is primarily used to download and set up dependencies in Python eggs
|
||||
format of the software being developed or deployed. Recipes for build tasks in any
|
||||
environment can be created, and many are already available.
|
||||
|
||||
|
||||
*******
|
||||
Shinken
|
||||
-------
|
||||
*******
|
||||
|
||||
`Shinken <http://www.shinken-monitoring.org/>`_ is a modern, Nagios compatible
|
||||
monitoring framework written in Python. Its main goal is to give users a flexible
|
||||
|
||||
+12
-7
@@ -8,8 +8,10 @@ Continuous Integration
|
||||
.. note::
|
||||
For advice on writing your tests, see :doc:`/writing/tests`.
|
||||
|
||||
|
||||
****
|
||||
Why?
|
||||
----
|
||||
****
|
||||
|
||||
Martin Fowler, who first wrote about `Continuous Integration <http://martinfowler.com/articles/continuousIntegration.html>`_
|
||||
(short: CI) together with Kent Beck, describes the CI as follows:
|
||||
@@ -22,24 +24,26 @@ Martin Fowler, who first wrote about `Continuous Integration <http://martinfowle
|
||||
significantly reduced integration problems and allows a team to develop
|
||||
cohesive software more rapidly.
|
||||
|
||||
|
||||
*******
|
||||
Jenkins
|
||||
-------
|
||||
*******
|
||||
|
||||
`Jenkins CI <http://jenkins-ci.org>`_ is an extensible continuous integration
|
||||
engine. Use it.
|
||||
|
||||
|
||||
|
||||
********
|
||||
Buildbot
|
||||
--------
|
||||
********
|
||||
|
||||
`Buildbot <http://docs.buildbot.net/current/>`_ is a Python system to
|
||||
automate the compile/test cycle to validate code changes.
|
||||
|
||||
|
||||
|
||||
***
|
||||
Tox
|
||||
---
|
||||
***
|
||||
|
||||
`tox <https://tox.readthedocs.io/en/latest/>`_ is an automation tool providing
|
||||
packaging, testing and deployment of Python software right from the console or
|
||||
@@ -54,8 +58,9 @@ which provides the following features:
|
||||
and merging CI and shell-based testing.
|
||||
|
||||
|
||||
*********
|
||||
Travis-CI
|
||||
---------
|
||||
*********
|
||||
|
||||
`Travis-CI <https://travis-ci.org/>`_ is a distributed CI server which builds
|
||||
tests for open source projects for free. It provides multiple workers to run
|
||||
|
||||
+21
-7
@@ -23,31 +23,39 @@ Some popular command-line applications include:
|
||||
* `mercurial <https://www.mercurial-scm.org/>`_ - A distributed version control
|
||||
system primarily written in Python
|
||||
|
||||
|
||||
*****
|
||||
Clint
|
||||
-----
|
||||
*****
|
||||
|
||||
`clint <https://pypi.python.org/pypi/clint/>`_ is a Python module which is
|
||||
filled with very useful tools for developing command-line applications.
|
||||
It supports features such as; CLI colors and indents, simple and powerful
|
||||
column printer, iterator based progress bars and implicit argument handling.
|
||||
|
||||
|
||||
*****
|
||||
Click
|
||||
-----
|
||||
*****
|
||||
|
||||
`click <http://click.pocoo.org/>`_ is a Python package for creating
|
||||
command-line interfaces in a composable way with as little code as
|
||||
possible. This “Command-line Interface Creation Kit” is highly
|
||||
configurable but comes with good defaults out of the box.
|
||||
|
||||
|
||||
******
|
||||
docopt
|
||||
------
|
||||
******
|
||||
|
||||
`docopt <http://docopt.org/>`_ is a lightweight, highly Pythonic package that
|
||||
allows creating command-line interfaces easily and intuitively, by parsing
|
||||
POSIX-style usage instructions.
|
||||
|
||||
|
||||
****
|
||||
Plac
|
||||
------
|
||||
****
|
||||
|
||||
`Plac <https://pypi.python.org/pypi/plac>`_ is a simple wrapper
|
||||
over the Python standard library `argparse <http://docs.python.org/2/library/argparse.html>`_,
|
||||
@@ -57,8 +65,10 @@ module targets especially unsophisticated users, programmers, sys-admins,
|
||||
scientists and in general people writing throw-away scripts for themselves,
|
||||
who choose to create a command-line interface because it is quick and simple.
|
||||
|
||||
|
||||
*****
|
||||
Cliff
|
||||
------
|
||||
*****
|
||||
|
||||
`Cliff <http://docs.openstack.org/developer/cliff/>`_ is a framework for
|
||||
building command-line programs. It uses setuptools entry points to provide
|
||||
@@ -67,8 +77,10 @@ to be used to create multi-level commands such as subversion and git, where
|
||||
the main program handles some basic argument parsing and then invokes a
|
||||
sub-command to do the work.
|
||||
|
||||
|
||||
******
|
||||
Cement
|
||||
------
|
||||
******
|
||||
|
||||
`Cement <http://builtoncement.com/>`_ is an advanced CLI Application Framework.
|
||||
Its goal is to introduce a standard, and feature-full platform
|
||||
@@ -77,8 +89,10 @@ 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
|
||||
|
||||
@@ -5,8 +5,10 @@ Interfacing with C/C++ Libraries
|
||||
|
||||
.. image:: /_static/photos/34725951345_c8f5959a2e_k_d.jpg
|
||||
|
||||
|
||||
****************************
|
||||
C Foreign Function Interface
|
||||
----------------------------
|
||||
****************************
|
||||
|
||||
`CFFI <https://cffi.readthedocs.io/en/latest/>`_ provides a simple to use
|
||||
mechanism for interfacing with C from both CPython and PyPy. It supports two
|
||||
@@ -29,8 +31,10 @@ ABI Interaction
|
||||
# prints: 23
|
||||
print("{}".format(length))
|
||||
|
||||
|
||||
******
|
||||
ctypes
|
||||
------
|
||||
******
|
||||
|
||||
`ctypes <https://docs.python.org/3/library/ctypes.html>`_ is the de facto
|
||||
library for interfacing with C/C++ from CPython, and it provides not only
|
||||
@@ -68,8 +72,10 @@ Struct Equivalents
|
||||
_fields_ = [("a", c_int),
|
||||
("b", c_int)]
|
||||
|
||||
|
||||
****
|
||||
SWIG
|
||||
----
|
||||
****
|
||||
|
||||
`SWIG <http://www.swig.org>`_, though not strictly Python focused (it supports a
|
||||
large number of scripting languages), is a tool for generating bindings for
|
||||
@@ -124,8 +130,9 @@ Example: Overloading __repr__
|
||||
%include "MyClass.h"
|
||||
|
||||
|
||||
************
|
||||
Boost.Python
|
||||
------------
|
||||
************
|
||||
|
||||
`Boost.Python <http://www.boost.org/doc/libs/1_59_0/libs/python/doc/>`_
|
||||
requires a bit more manual work to expose C++ object functionality, but
|
||||
|
||||
@@ -5,8 +5,10 @@ Network Applications
|
||||
|
||||
.. image:: /_static/photos/34364815780_bea6614025_k_d.jpg
|
||||
|
||||
|
||||
****
|
||||
HTTP
|
||||
::::
|
||||
****
|
||||
|
||||
The Hypertext Transfer Protocol (HTTP) is an application protocol for
|
||||
distributed, collaborative, hypermedia information systems. HTTP is the
|
||||
@@ -31,8 +33,9 @@ Requests.
|
||||
- `GitHub <https://github.com/kennethreitz/requests>`_
|
||||
|
||||
|
||||
*******************
|
||||
Distributed Systems
|
||||
::::::::::::::::::::
|
||||
*******************
|
||||
|
||||
|
||||
ZeroMQ
|
||||
|
||||
@@ -5,8 +5,10 @@ Cryptography
|
||||
|
||||
.. image:: /_static/photos/33907152824_bf91078cc1_k_d.jpg
|
||||
|
||||
|
||||
************
|
||||
Cryptography
|
||||
------------
|
||||
************
|
||||
|
||||
`Cryptography <https://cryptography.io/en/latest/>`_ is an actively developed
|
||||
library that provides cryptographic recipes and primitives. It supports
|
||||
@@ -40,10 +42,9 @@ Example code using high level symmetric encryption recipe:
|
||||
plain_text = cipher_suite.decrypt(cipher_text)
|
||||
|
||||
|
||||
|
||||
|
||||
**************
|
||||
GPGME bindings
|
||||
--------------
|
||||
**************
|
||||
|
||||
The `GPGME Python bindings <https://dev.gnupg.org/source/gpgme/browse/master/lang/python/>`_ provide pythonic access to `GPG Made Easy <https://dev.gnupg.org/source/gpgme/browse/master/>`_, a C API for the entire GNU Privacy Guard suite of projects, including GPG, libgcrypt and gpgsm (the S/MIME engine). It supports Python 2.6, 2.7, 3.4 and above. Depends on the SWIG C interface for Python as well as the GnuPG software and libraries.
|
||||
|
||||
@@ -52,12 +53,12 @@ A more comprehensive `GPGME Python Bindings HOWTO <https://dev.gnupg.org/source/
|
||||
Available under the same terms as the rest of the GnuPG Project: GPLv2 and LGPLv2.1, both with the "or any later version" clause.
|
||||
|
||||
Installation
|
||||
------------
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Included by default when compiling GPGME if the configure script locates a supported python version (which it will if it's in $PATH during configuration).
|
||||
|
||||
Example
|
||||
-------
|
||||
~~~~~~~
|
||||
|
||||
.. code-block:: python3
|
||||
|
||||
@@ -90,9 +91,9 @@ Example
|
||||
|
||||
|
||||
|
||||
|
||||
********
|
||||
PyCrypto
|
||||
--------
|
||||
********
|
||||
|
||||
`PyCrypto <https://www.dlitz.net/software/pycrypto/>`_ is another library,
|
||||
which provides secure hash functions and various encryption algorithms. It
|
||||
|
||||
+20
-8
@@ -5,8 +5,10 @@ Databases
|
||||
|
||||
.. image:: /_static/photos/33907152464_a99fdcc8de_k_d.jpg
|
||||
|
||||
|
||||
******
|
||||
DB-API
|
||||
------
|
||||
******
|
||||
|
||||
The Python Database API (DB-API) defines a standard interface for Python
|
||||
database access modules. It's documented in :pep:`249`.
|
||||
@@ -17,8 +19,10 @@ Tutorials that explain how to work with modules that conform to this interface c
|
||||
`here <http://halfcooked.com/presentations/osdc2006/python_databases.html>`__ and
|
||||
`here <http://web.archive.org/web/20120815130844/http://www.amk.ca/python/writing/DB-API.html>`__.
|
||||
|
||||
|
||||
**********
|
||||
SQLAlchemy
|
||||
----------
|
||||
**********
|
||||
|
||||
`SQLAlchemy <http://www.sqlalchemy.org/>`_ is a commonly used database toolkit.
|
||||
Unlike many database libraries it not only provides an ORM layer but also a
|
||||
@@ -28,8 +32,10 @@ generalized API for writing database-agnostic code without SQL.
|
||||
|
||||
$ pip install sqlalchemy
|
||||
|
||||
|
||||
*******
|
||||
Records
|
||||
-------
|
||||
*******
|
||||
|
||||
`Records <https://github.com/kennethreitz/records>`_ is minimalist SQL library,
|
||||
designed for sending raw SQL queries to various databases. Data can be used
|
||||
@@ -41,8 +47,10 @@ programmatically, or exported to a number of useful data formats.
|
||||
|
||||
Also included is a command-line tool for exporting SQL data.
|
||||
|
||||
|
||||
**********
|
||||
Django ORM
|
||||
----------
|
||||
**********
|
||||
|
||||
The Django ORM is the interface used by `Django <http://www.djangoproject.com>`_
|
||||
to provide database access.
|
||||
@@ -58,8 +66,10 @@ The basics:
|
||||
- Django gives you an automatically-generated database-access API; see
|
||||
`Making queries <https://docs.djangoproject.com/en/dev/topics/db/queries/>`__.
|
||||
|
||||
|
||||
******
|
||||
peewee
|
||||
------
|
||||
******
|
||||
|
||||
`peewee <http://docs.peewee-orm.com/en/latest/>`_ is another ORM with a focus
|
||||
on being lightweight with support for Python 2.6+ and 3.2+ which supports
|
||||
@@ -71,8 +81,10 @@ to query data. While SQLite, MySQL and Postgres are supported out-of-the-box,
|
||||
there is a `collection of add-ons <https://peewee.readthedocs.io/en/latest/peewee/playhouse.html#playhouse>`_
|
||||
available.
|
||||
|
||||
|
||||
*******
|
||||
PonyORM
|
||||
-------
|
||||
*******
|
||||
|
||||
`PonyORM <http://ponyorm.com/>`_ is an ORM that takes a different approach to
|
||||
querying the database. Instead of writing an SQL-like language or boolean
|
||||
@@ -81,9 +93,9 @@ schema editor that can generate PonyORM entities for you. It supports Python
|
||||
2.6+ and Python 3.3+ and can connect to SQLite, MySQL, Postgres & Oracle
|
||||
|
||||
|
||||
|
||||
*********
|
||||
SQLObject
|
||||
---------
|
||||
*********
|
||||
|
||||
`SQLObject <http://www.sqlobject.org/>`_ is yet another ORM. It supports a wide
|
||||
variety of databases: Common database systems MySQL, Postgres and SQLite and
|
||||
|
||||
+56
-14
@@ -8,8 +8,11 @@ GUI Applications
|
||||
|
||||
Alphabetical list of GUI Applications.
|
||||
|
||||
|
||||
*******
|
||||
Camelot
|
||||
-------
|
||||
*******
|
||||
|
||||
`Camelot <http://www.python-camelot.com>`_ provides components for building
|
||||
applications on top of Python, SQLAlchemy and Qt. It is inspired by
|
||||
the Django admin interface.
|
||||
@@ -18,27 +21,39 @@ The main resource for information is the website:
|
||||
http://www.python-camelot.com
|
||||
and the mailing list https://groups.google.com/forum/#!forum/project-camelot
|
||||
|
||||
|
||||
*****
|
||||
Cocoa
|
||||
-----
|
||||
*****
|
||||
|
||||
.. note:: The Cocoa framework is only available on OS X. Don't pick this if you're writing a cross-platform application!
|
||||
|
||||
|
||||
***
|
||||
GTk
|
||||
---
|
||||
***
|
||||
|
||||
PyGTK provides Python bindings for the GTK+ toolkit. Like the GTK+ library
|
||||
itself, it is currently licensed under the GNU LGPL. It is worth noting that
|
||||
PyGTK only currently supports the Gtk-2.X API (NOT Gtk-3.0). It is currently
|
||||
recommended that PyGTK not be used for new projects and that existing
|
||||
applications be ported from PyGTK to PyGObject.
|
||||
|
||||
|
||||
********************
|
||||
PyGObject aka (PyGi)
|
||||
--------------------
|
||||
********************
|
||||
|
||||
`PyGObject <https://wiki.gnome.org/Projects/PyGObject>`_ provides Python bindings, which gives access to the entire GNOME software platform.
|
||||
It is fully compatible with GTK+ 3. Here is a tutorial to get started with `Python GTK+ 3 Tutorial <https://python-gtk-3-tutorial.readthedocs.io/en/latest/>`_.
|
||||
|
||||
`API Reference <http://lazka.github.io/pgi-docs/>`_
|
||||
|
||||
|
||||
****
|
||||
Kivy
|
||||
----
|
||||
****
|
||||
|
||||
`Kivy <http://kivy.org>`_ is a Python library for development of multi-touch
|
||||
enabled media rich applications. The aim is to allow for quick and easy
|
||||
interaction design and rapid prototyping, while making your code reusable
|
||||
@@ -53,12 +68,18 @@ on all major platforms (Linux, OSX, Windows, Android).
|
||||
|
||||
The main resource for information is the website: http://kivy.org
|
||||
|
||||
|
||||
******
|
||||
PyObjC
|
||||
------
|
||||
******
|
||||
|
||||
.. note:: Only available on OS X. Don't pick this if you're writing a cross-platform application.
|
||||
|
||||
|
||||
******
|
||||
PySide
|
||||
------
|
||||
******
|
||||
|
||||
PySide is a Python binding of the cross-platform GUI toolkit Qt.
|
||||
|
||||
.. code-block:: console
|
||||
@@ -67,16 +88,22 @@ PySide is a Python binding of the cross-platform GUI toolkit Qt.
|
||||
|
||||
https://wiki.qt.io/Category:LanguageBindings::PySide::Downloads
|
||||
|
||||
|
||||
****
|
||||
PyQt
|
||||
----
|
||||
****
|
||||
|
||||
.. note:: If your software does not fully comply with the GPL you will need a commercial license!
|
||||
|
||||
PyQt provides Python bindings for the Qt Framework (see below).
|
||||
|
||||
http://www.riverbankcomputing.co.uk/software/pyqt/download
|
||||
|
||||
|
||||
*****************************
|
||||
PyjamasDesktop (pyjs Desktop)
|
||||
-----------------------------
|
||||
*****************************
|
||||
|
||||
PyjamasDesktop is a port of Pyjamas. PyjamasDesktop is application widget set
|
||||
for desktop and a cross-platform framework. (After release v0.6 PyjamasDesktop
|
||||
is a part of Pyjamas (Pyjs)). Briefly, it allows the exact same Python web
|
||||
@@ -86,14 +113,20 @@ application source code to be executed as a standalone desktop application.
|
||||
|
||||
The main website; `pyjs Desktop <http://pyjs.org/>`_.
|
||||
|
||||
|
||||
**
|
||||
Qt
|
||||
--
|
||||
**
|
||||
|
||||
`Qt <http://qt-project.org/>`_ is a cross-platform application framework that
|
||||
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 Tkinter and Qt (others on the way). The amount of code required to implement custom GUIs is much shorter using PySimpleGUI than if the same GUI were written directly using tkinter or Qt. PySimpleGUI code can be "ported" between GUI frameworks by changing import statement.
|
||||
|
||||
.. code-block:: console
|
||||
@@ -102,8 +135,11 @@ 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
|
||||
native, cross platform GUI toolkit. Toga consists of a library of base
|
||||
components with a shared interface to simplify platform-agnostic GUI
|
||||
@@ -112,8 +148,11 @@ development.
|
||||
Toga is available on Mac OS, Windows, Linux (GTK), and mobile platforms such
|
||||
as Android and iOS.
|
||||
|
||||
|
||||
**
|
||||
Tk
|
||||
--
|
||||
**
|
||||
|
||||
Tkinter is a thin object-oriented layer on top of Tcl/Tk. **It has the advantage
|
||||
of being included with the Python standard library, making it the most
|
||||
convenient and compatible toolkit to program with.**
|
||||
@@ -126,8 +165,11 @@ There's a good multi-language Tk tutorial with Python examples at
|
||||
`TkDocs <http://www.tkdocs.com/tutorial/index.html>`_. There's more information
|
||||
available on the `Python Wiki <http://wiki.python.org/moin/TkInter>`_.
|
||||
|
||||
|
||||
********
|
||||
wxPython
|
||||
--------
|
||||
********
|
||||
|
||||
wxPython is a GUI toolkit for the Python programming language. It allows
|
||||
Python programmers to create programs with a robust, highly functional
|
||||
graphical user interface, simply and easily. It is implemented as a Python
|
||||
|
||||
@@ -11,8 +11,10 @@ Computer Vision (OpenCV).
|
||||
|
||||
A brief description of both is given below.
|
||||
|
||||
|
||||
**********************
|
||||
Python Imaging Library
|
||||
----------------------
|
||||
**********************
|
||||
|
||||
The `Python Imaging Library <http://www.pythonware.com/products/pil/>`_, or PIL
|
||||
for short, is one of the core libraries for image manipulation in Python. Unfortunately,
|
||||
@@ -63,8 +65,9 @@ There are more examples of the Pillow library in the
|
||||
`Pillow tutorial <https://pillow.readthedocs.io/en/3.0.x/handbook/tutorial.html>`_.
|
||||
|
||||
|
||||
**************************
|
||||
OpenSource Computer Vision
|
||||
--------------------------
|
||||
**************************
|
||||
|
||||
OpenSource Computer Vision, more commonly known as OpenCV, is a more advanced
|
||||
image manipulation and processing software than PIL. It has been implemented
|
||||
|
||||
@@ -9,8 +9,10 @@ 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
|
||||
or list. It can also convert Python dictionaries or lists into JSON strings.
|
||||
|
||||
|
||||
************
|
||||
Parsing JSON
|
||||
------------
|
||||
************
|
||||
|
||||
Take the following string containing JSON data:
|
||||
|
||||
@@ -46,8 +48,9 @@ You can also convert the following to JSON:
|
||||
'{"first_name": "Guido", "last_name": "Rossum", "titles": ["BDFL", "Developer"]}'
|
||||
|
||||
|
||||
**********
|
||||
simplejson
|
||||
----------
|
||||
**********
|
||||
|
||||
The JSON library was added to Python in version 2.6.
|
||||
If you're using an earlier version of Python, the
|
||||
|
||||
@@ -10,8 +10,10 @@ Python has a vast number of libraries for data analysis, statistics and Machine
|
||||
|
||||
Some widely used packages for Machine Learning and other Data Science applications are enlisted below.
|
||||
|
||||
|
||||
***********
|
||||
Scipy Stack
|
||||
-----------
|
||||
***********
|
||||
|
||||
The Scipy stack consists of a bunch of core helper packages used in data science, for statistical analysis and visualising data. Because of its huge number of functionalities and ease of use, the Stack is considered a must-have for most data science applications.
|
||||
|
||||
@@ -34,8 +36,10 @@ For installing the full stack, or individual packages, you can refer to the inst
|
||||
|
||||
**NB:** `Anaconda <https://www.continuum.io/anaconda-overview>`_ is highly preferred and recommended for installing and maintaining data science packages seamlessly.
|
||||
|
||||
|
||||
************
|
||||
scikit-learn
|
||||
------------
|
||||
************
|
||||
|
||||
Scikit is a free and open-source machine learning library for Python. It offers off-the-shelf functions to implement many algorithms like linear regression, classifiers, SVMs, k-means, Neural Networks etc. It also has a few sample datasets which can be directly used for training and testing.
|
||||
|
||||
|
||||
@@ -5,8 +5,10 @@ Networking
|
||||
|
||||
.. image:: /_static/photos/34151833832_6bdfd930af_k_d.jpg
|
||||
|
||||
|
||||
*******
|
||||
Twisted
|
||||
-------
|
||||
*******
|
||||
|
||||
`Twisted <http://twistedmatrix.com/trac/>`_ is an event-driven networking
|
||||
engine. It can be used to build applications around many different networking
|
||||
@@ -14,8 +16,10 @@ protocols, including http servers and clients, applications using SMTP, POP3,
|
||||
IMAP or SSH protocols, instant messaging
|
||||
and `much more <http://twistedmatrix.com/trac/wiki/Documentation>`_.
|
||||
|
||||
|
||||
*****
|
||||
PyZMQ
|
||||
-----
|
||||
*****
|
||||
|
||||
`PyZMQ <http://zeromq.github.com/pyzmq/>`_ is the Python binding for
|
||||
`ZeroMQ <http://www.zeromq.org/>`_, which is a high-performance asynchronous
|
||||
@@ -32,8 +36,10 @@ message queuing without a message broker. The basic patterns for this are:
|
||||
|
||||
For a quick start, read the `ZeroMQ guide <http://zguide.zeromq.org/page:all>`_.
|
||||
|
||||
|
||||
******
|
||||
gevent
|
||||
------
|
||||
******
|
||||
|
||||
`gevent <http://www.gevent.org/>`_ is a coroutine-based Python networking
|
||||
library that uses greenlets to provide a high-level synchronous API on top of
|
||||
|
||||
@@ -5,8 +5,10 @@ Scientific Applications
|
||||
|
||||
.. image:: /_static/photos/33925223870_97e44f5629_k_d.jpg
|
||||
|
||||
|
||||
*******
|
||||
Context
|
||||
:::::::
|
||||
*******
|
||||
|
||||
Python is frequently used for high-performance scientific applications. It
|
||||
is widely used in academia and scientific projects because it is easy to write
|
||||
@@ -21,8 +23,9 @@ Python ecosystem can be found in the `Python Scientific Lecture Notes
|
||||
<http://scipy-lectures.github.com/>`_
|
||||
|
||||
|
||||
*****
|
||||
Tools
|
||||
:::::
|
||||
*****
|
||||
|
||||
IPython
|
||||
-------
|
||||
@@ -37,8 +40,9 @@ store chunks of Python code along side the results and additional comments
|
||||
file formats.
|
||||
|
||||
|
||||
*********
|
||||
Libraries
|
||||
:::::::::
|
||||
*********
|
||||
|
||||
NumPy
|
||||
-----
|
||||
@@ -112,8 +116,9 @@ The library handles presentation of stimuli, scripting of experimental design
|
||||
and data collection.
|
||||
|
||||
|
||||
*********
|
||||
Resources
|
||||
:::::::::
|
||||
*********
|
||||
|
||||
Installation of scientific Python packages can be troublesome, as many of
|
||||
these packages are implemented as Python C extensions which need to be compiled.
|
||||
|
||||
@@ -5,8 +5,10 @@ HTML Scraping
|
||||
|
||||
.. image:: /_static/photos/34268661876_442428e122_k_d.jpg
|
||||
|
||||
|
||||
************
|
||||
Web Scraping
|
||||
------------
|
||||
************
|
||||
|
||||
Web sites are written using HTML, which means that each web page is a
|
||||
structured document. Sometimes it would be great to obtain some data from
|
||||
@@ -18,8 +20,10 @@ computer program to sift through a web page and gather the data that you need
|
||||
in a format most useful to you while at the same time preserving the structure
|
||||
of the data.
|
||||
|
||||
|
||||
*****************
|
||||
lxml and Requests
|
||||
-----------------
|
||||
*****************
|
||||
|
||||
`lxml <http://lxml.de/>`_ is a pretty extensive library written for parsing
|
||||
XML and HTML documents very quickly, even handling messed up tags in the
|
||||
|
||||
@@ -5,8 +5,10 @@ Data Serialization
|
||||
|
||||
.. image:: /_static/photos/33467946364_3e59bd376a_k_d.jpg
|
||||
|
||||
|
||||
***************************
|
||||
What is data serialization?
|
||||
---------------------------
|
||||
***************************
|
||||
|
||||
Data serialization is the concept of converting structured data into a format
|
||||
that allows it to be shared or stored in such a way that its original
|
||||
@@ -14,8 +16,10 @@ structure to be recovered. In some cases, the secondary intention of data
|
||||
serialization is to minimize the size of the serialized data which then
|
||||
minimizes disk space or bandwidth requirements.
|
||||
|
||||
|
||||
******
|
||||
Pickle
|
||||
------
|
||||
******
|
||||
|
||||
The native data serialization module for Python is called `Pickle
|
||||
<https://docs.python.org/2/library/pickle.html>`_.
|
||||
@@ -35,8 +39,10 @@ Here's an example:
|
||||
#Use loads to de-serialize an object
|
||||
received_grades = pickle.loads( serial_grades )
|
||||
|
||||
|
||||
********
|
||||
Protobuf
|
||||
--------
|
||||
********
|
||||
|
||||
If you're looking for a serialization module that has support in multiple
|
||||
languages, Google's `Protobuf
|
||||
|
||||
@@ -37,8 +37,10 @@ and PyPy's processing.
|
||||
1.54693889618
|
||||
1.60109114647
|
||||
|
||||
|
||||
*******
|
||||
Context
|
||||
:::::::
|
||||
*******
|
||||
|
||||
|
||||
The GIL
|
||||
@@ -65,8 +67,10 @@ The GIL
|
||||
`Special care`_ must be taken when writing C extensions to make sure you
|
||||
register your threads with the interpreter.
|
||||
|
||||
|
||||
************
|
||||
C Extensions
|
||||
::::::::::::
|
||||
************
|
||||
|
||||
|
||||
Cython
|
||||
@@ -226,8 +230,10 @@ Pyrex
|
||||
Shedskin?
|
||||
---------
|
||||
|
||||
|
||||
***********
|
||||
Concurrency
|
||||
:::::::::::
|
||||
***********
|
||||
|
||||
|
||||
Concurrent.futures
|
||||
|
||||
+19
-7
@@ -9,8 +9,10 @@ As a powerful scripting language adapted to both fast prototyping
|
||||
and bigger projects, Python is widely used in web application
|
||||
development.
|
||||
|
||||
|
||||
*******
|
||||
Context
|
||||
:::::::
|
||||
*******
|
||||
|
||||
|
||||
|
||||
@@ -25,8 +27,9 @@ can be deployed in any :ref:`WSGI-compliant web server <wsgi-servers-ref>`.
|
||||
WSGI is documented in :pep:`3333`.
|
||||
|
||||
|
||||
**********
|
||||
Frameworks
|
||||
::::::::::
|
||||
**********
|
||||
|
||||
Broadly speaking, a web framework consists of a set of libraries and a main
|
||||
handler within which you can build custom code to implement a web application
|
||||
@@ -141,8 +144,10 @@ Masonite comes with a lot of functionality out of the box including a powerful I
|
||||
|
||||
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 you’ll fall in love.
|
||||
|
||||
|
||||
***********
|
||||
Web Servers
|
||||
:::::::::::
|
||||
***********
|
||||
|
||||
.. _nginx-ref:
|
||||
|
||||
@@ -159,8 +164,10 @@ to serve high-load websites, Nginx is gradually becoming quite popular.
|
||||
|
||||
.. _wsgi-servers-ref:
|
||||
|
||||
|
||||
************
|
||||
WSGI Servers
|
||||
::::::::::::
|
||||
************
|
||||
|
||||
Stand-alone WSGI servers typically use less resources than traditional web
|
||||
servers and provide top performance [3]_.
|
||||
@@ -215,8 +222,9 @@ I do not recommend using uWSGI unless you know why you need it.
|
||||
.. _server-best-practices-ref:
|
||||
|
||||
|
||||
*********************
|
||||
Server Best Practices
|
||||
:::::::::::::::::::::
|
||||
*********************
|
||||
|
||||
The majority of self-hosted Python applications today are hosted with a WSGI
|
||||
server such as :ref:`Gunicorn <gunicorn-ref>`, either directly or behind a
|
||||
@@ -226,8 +234,10 @@ The WSGI servers serve the Python applications while the web server handles
|
||||
tasks better suited for it such as static file serving, request routing, DDoS
|
||||
protection, and basic authentication.
|
||||
|
||||
|
||||
*******
|
||||
Hosting
|
||||
:::::::
|
||||
*******
|
||||
|
||||
Platform-as-a-Service (PaaS) is a type of cloud computing infrastructure
|
||||
which abstracts and manages infrastructure, routing, and scaling of web
|
||||
@@ -259,8 +269,10 @@ Eldarion
|
||||
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/>`_.
|
||||
|
||||
|
||||
**********
|
||||
Templating
|
||||
::::::::::
|
||||
**********
|
||||
|
||||
Most WSGI applications are responding to HTTP requests to serve content in HTML
|
||||
or other markup languages. Instead of generating directly textual content from
|
||||
|
||||
@@ -5,8 +5,10 @@ XML parsing
|
||||
|
||||
.. image:: /_static/photos/33888714601_a1f7d020a2_k_d.jpg
|
||||
|
||||
|
||||
********
|
||||
untangle
|
||||
--------
|
||||
********
|
||||
|
||||
`untangle <https://github.com/stchris/untangle>`_ is a simple library which
|
||||
takes an XML document and returns a Python object which mirrors the nodes and
|
||||
@@ -36,8 +38,10 @@ and then you can get the child elements name like this:
|
||||
|
||||
untangle also supports loading XML from a string or an URL.
|
||||
|
||||
|
||||
*********
|
||||
xmltodict
|
||||
---------
|
||||
*********
|
||||
|
||||
`xmltodict <http://github.com/martinblech/xmltodict>`_ is another simple
|
||||
library that aims at making XML feel like working with JSON.
|
||||
|
||||
Reference in New Issue
Block a user