Using third-party libraries

Great programmers don't write all their code themselves.

In fact, they write as little as possible, reusing whatever they can.

Free and Open Source Software

There is a lot of FOSS Python code out there. It's a treasure trove for your projects:

  • Free to use, usually even commercially
  • Open source means you can study/modify the code and contribute back

Usually maintained by volunteers, so:

  • When you use it, you're encouraged to contribute back
  • Be extra-friendly and nice to people who aren't getting paid to help you
  • If you use free Python libraries, consider creating free Python libraries too

Where to Get Free Python Libraries

  • When you installed Python, it came with a standard library
  • The Python Package Index has 50,000 free packages for you
  • GitHub search
  • Bitbucket search

Python Package Index

Memorize this website URL and visit it every day: https://pypi.python.org

(screenshot)

Sometimes referred to as "The Cheese Shop" because of Monty Python

(photo)

Module vs. Package vs. Library

TODO

Examples of Python Packages

Here, we:

  • Download package X from PyPI
  • Import and use a function from X

TODO

...

...

(10 min using a package)

What are GitHub, Gitlab, Bitbucket, Gitorious, Sourceforge, etc.?

TODO

Example: Package X

(10 min using another package)

  • Show its PyPI listing
  • Show its GitHub repo
  • Click through and show its files and docs

What is Version Control?

TODO

DVCS and Collaboration

TODO

What's in a Python Package?

TODO

Using Third-Party Libraries in Projects

Keeping track of requirements

Avoiding dependency conflicts