{ "metadata": { "kernelspec": { "codemirror_mode": { "name": "ipython", "version": 2 }, "display_name": "IPython (Python 2)", "language": "python", "name": "python2" }, "name": "", "signature": "sha256:d3073baa9f8a050a7ae6616386382b6e189019b47ce0a3205bb089be53c07e9c" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Using third-party libraries" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Great programmers don't write all their code themselves. \n", "\n", "In fact, they write as little as possible, reusing whatever they can." ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Free and Open Source Software" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There is a lot of FOSS Python code out there. It's a treasure trove for your projects:\n", "* Free to use, usually even commercially\n", "* Open source means you can study/modify the code and contribute back\n", "\n", "Usually maintained by volunteers, so:\n", "* When you use it, you're encouraged to contribute back\n", "* Be extra-friendly and nice to people who aren't getting paid to help you\n", "* If you use free Python libraries, consider creating free Python libraries too" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Where to Get Free Python Libraries" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* When you installed Python, it came with a **standard library**\n", "* The Python Package Index has 50,000 free packages for you\n", "* GitHub search\n", "* Bitbucket search" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Python Package Index" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Memorize this website URL and visit it every day:\n", "https://pypi.python.org\n", "\n", "(screenshot)\n", "\n", "Sometimes referred to as \"The Cheese Shop\" because of Monty Python\n", "\n", "(photo)" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Module vs. Package vs. Library" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "TODO" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Examples of Python Packages" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here, we:\n", "* Download package X from PyPI\n", "* Import and use a function from X\n", "\n", "TODO\n", "\n", "...\n", "\n", "...\n", "\n", "(10 min using a package)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "What are GitHub, Gitlab, Bitbucket, Gitorious, Sourceforge, etc.?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "TODO" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example: Package X" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(10 min using another package)\n", "\n", "* Show its PyPI listing\n", "* Show its GitHub repo\n", "* Click through and show its files and docs" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "What is Version Control?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "TODO" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "DVCS and Collaboration" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "TODO" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "What's in a Python Package?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "TODO" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Using Third-Party Libraries in Projects" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Keeping track of requirements\n", "\n", "Avoiding dependency conflicts" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": {} } ] }