How to find great Python packages on PyPI, the Python Package Repository

Real Python · Intermediate ·🎯 Management & AI-Era Leadership ·9y ago

Key Takeaways

Explains how to find great Python packages on PyPI

Full Transcript

an important part of dependency management is of course the ability to store packages somewhere so that you or other people can install them now let's talk about Python package repositories Python packages are collected in so-called software repositories the biggest or official software repository in python is called pi pi it's also sometimes called the cheese shop because python developers just love their Monty Python references developers can register for a free pie-pie account and then submit new packages to the repository and once a package appears in pie-pie everyone else can install it through pip so this is a really popular method to distribute open-source Python packages and there are literally tens of thousands of packages available for free that you can just install through pip and by the way there's no review or QA process for packages submitted to pi PI so whenever you install a package from pi pi it makes sense to invest some time into due diligence work and reviewing what's available so that you get a quality piece of software let's search for some packages on pi PI we're going to take a look at the pi pi website now and you can find it at pi pi python org let's fire up a browser and then take a look at the pi pi website all right this is pipey eye you can see some stats here so right now there are close to a hundred thousand packages available here on pi pi and when you scroll down you can see sort of a update log off recently updated packages as people push them to the package repository you can see here what was updated and of course one of the most important parts of the site here is the search box so into the search box you can enter keywords and basically do a full-text search on the descriptions and the metadata for the packages available on pi PI so you've probably heard of the really popular requests package which is a HTTP download library so I'm going to go ahead and search for requests here okay so these are the search results for requests and what's interesting here is that the actual requests library that I was looking for is not the number one search result right because this is just doing a search across all of the descriptions and the metadata in all of the available packages so I get some very exhaustive results here and you can see here as I scroll down this is a really long list because obviously the keyword requests seems to be quite popular alright so I'm gonna go ahead and click on the requests library here because every package in pi PI actually has its own landing page so it has its own page on pi PI where the developers can host the readme and give some links to the documentation or release history and stuff like that so what you can see here is that right now I'm looking at the specific version of requests and you can also see that reflected here in the URL so this will be at pi PI slash name of the library slash the version so this is handy if you ever want to link to a specific library or a specific version of library because you can just use that link this is the readme file or the description that the creators of the requests library have put together so the contents of this description here will largely depend on the information that the library creators put in sometimes the formatting as it's displayed on the pi PI website isn't perfect so you're gonna get these super blown-up images here just ignore that for now actually what I wanted to show you is when you scroll all the way down when you scroll all the way down here there will always be the summary with metadata about the package that you're looking at and this is often very useful if you want to find the home page for a specific project or if you want to identify its author or if you're interested in the license that the code is under then also you can see the categories the code is filed under or the library was filed under and also what other dependencies are secondary dependencies that library requires to me the most useful information is usually these top three items here I want to know about the library author I usually take a look at the library homepage and then I also want to know what license the software is under and of course they could also click through these categories here and maybe find some interesting packages that way okay that's it for pi PI you can also search for packages from the command line using the Pips search command usually I would recommend that you stick with the pi pi website though the PIP command doesn't really give you very much information about those search results so it's just the package name and then a very brief description which can be useful but as you've seen in the pi PI demo oftentimes a single keyword can lead to many many search results so it's a little bit hard to untangle that from the command line if you only have limited information available nevertheless that feature exists and it can be useful in a pinch

Original Description

https://dbader.org/python-dependency-pitfalls ► Free 5-day Python class on Packaging & Dependency Management In this video you'll learn how to find and install packages from PyPI, the Python Package Repository. See how to go from “writing scripts” to “building applications” with Python and master the tools of the trade for Dependency Management with my in-depth video course for Python developers: https://dbader.org/products/managing-python-dependencies/ You'll master the Pip package manager, learn how to work with Requirements Files, Virtualenv & discover how to pick quality Python libraries. ► Get the full course: https://dbader.org/products/managing-python-dependencies/ * * * ► Subscribe to this channel: https://dbader.org/youtube/ ► Weekly Tips for Python Developers: https://dbader.org/newsletter ► Python Articles & Tutorials: https://dbader.org
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Real Python · Real Python · 53 of 60

1 A better Python REPL – bpython vs python interpreter
A better Python REPL – bpython vs python interpreter
Real Python
2 Introducing large-type.com – A Utility Website
Introducing large-type.com – A Utility Website
Real Python
3 Reading Hacker News Without Wasting Tons of Time
Reading Hacker News Without Wasting Tons of Time
Real Python
4 Forward References and Python 3 Type Hints
Forward References and Python 3 Type Hints
Real Python
5 Using Sublime Text as your Git Editor
Using Sublime Text as your Git Editor
Real Python
6 Python Code Linting and Auto-Complete for Sublime Text
Python Code Linting and Auto-Complete for Sublime Text
Real Python
7 Make your Python Code More Readable with Custom Exceptions
Make your Python Code More Readable with Custom Exceptions
Real Python
8 Write Better Tests with Sublime Text's Split Layout Feature
Write Better Tests with Sublime Text's Split Layout Feature
Real Python
9 How to Use Sublime Text from the Command Line
How to Use Sublime Text from the Command Line
Real Python
10 Rename Variables with Multiple Selection in Sublime Text
Rename Variables with Multiple Selection in Sublime Text
Real Python
11 Sublime Text Settings for Writing PEP 8 Python
Sublime Text Settings for Writing PEP 8 Python
Real Python
12 Write Cleaner Python with Sublime Text's Indent Guides
Write Cleaner Python with Sublime Text's Indent Guides
Real Python
13 Sublime Text Whitespace Settings for Python Development
Sublime Text Whitespace Settings for Python Development
Real Python
14 Function Argument Unpacking in Python
Function Argument Unpacking in Python
Real Python
15 Python Code Review: Debugging and Refactoring "Conway's Game of Life" +  Automated Tests
Python Code Review: Debugging and Refactoring "Conway's Game of Life" + Automated Tests
Real Python
16 Using "get()" to Return a Default Value from a Python Dict
Using "get()" to Return a Default Value from a Python Dict
Real Python
17 A Python Shorthand for Swapping Two Variables
A Python Shorthand for Swapping Two Variables
Real Python
18 Python Code Review: Refactoring a Web Scraper, PEP 8 Style Guide Compliance, requirements.txt
Python Code Review: Refactoring a Web Scraper, PEP 8 Style Guide Compliance, requirements.txt
Real Python
19 Click & Jump to Test Failures from the Command Line (iTerm2)
Click & Jump to Test Failures from the Command Line (iTerm2)
Real Python
20 Setting up Sublime Text for Python Developers
Setting up Sublime Text for Python Developers
Real Python
21 Sublime Text + Python Guide Overview
Sublime Text + Python Guide Overview
Real Python
22 Python Code Review: Adding Pytest Tests to an Existing Python Web Scraper
Python Code Review: Adding Pytest Tests to an Existing Python Web Scraper
Real Python
23 Type-Checking Python Programs With Type Hints and mypy
Type-Checking Python Programs With Type Hints and mypy
Real Python
24 A Shorthand for Merging Dictionaries in Python 3.5+
A Shorthand for Merging Dictionaries in Python 3.5+
Real Python
25 Python Code Review Flask Web Security Tutorial + Virtualenvs, requirements.txt
Python Code Review Flask Web Security Tutorial + Virtualenvs, requirements.txt
Real Python
26 My Python Code Looks Ugly and Confusing – Help!
My Python Code Looks Ugly and Confusing – Help!
Real Python
27 Setting Up a Programmer Portfolio/Developer Blog – How To Get Started
Setting Up a Programmer Portfolio/Developer Blog – How To Get Started
Real Python
28 Do I Need a GitHub/GitLab/Bitbucket Profile as a Developer?
Do I Need a GitHub/GitLab/Bitbucket Profile as a Developer?
Real Python
29 Programmer Portfolio – Example and Walkthrough
Programmer Portfolio – Example and Walkthrough
Real Python
30 How to Get Your 1st Speaking Gig at a Tech Conference
How to Get Your 1st Speaking Gig at a Tech Conference
Real Python
31 How to Build Your Public Speaking Skills as a Developer
How to Build Your Public Speaking Skills as a Developer
Real Python
32 The Object-oriented Version of "Spaghetti Code" is "Lasagna Code" ?!
The Object-oriented Version of "Spaghetti Code" is "Lasagna Code" ?!
Real Python
33 Setting up Sublime Text for Python Developers – Lesson #1
Setting up Sublime Text for Python Developers – Lesson #1
Real Python
34 Cool New Features in Python 3.6
Cool New Features in Python 3.6
Real Python
35 "is" vs "==" in Python – What's the Difference? (And When to Use Each)
"is" vs "==" in Python – What's the Difference? (And When to Use Each)
Real Python
36 Emulating switch/case Statements in Python with Dictionaries
Emulating switch/case Statements in Python with Dictionaries
Real Python
37 Python Function Argument Unpacking Tutorial (* and ** Operators)
Python Function Argument Unpacking Tutorial (* and ** Operators)
Real Python
38 What Code Should I Put On My GitHub/GitLab/BitBucket Profile?
What Code Should I Put On My GitHub/GitLab/BitBucket Profile?
Real Python
39 A Crazy Python Dictionary Expression ?!
A Crazy Python Dictionary Expression ?!
Real Python
40 String Conversion in Python: When to Use __repr__ vs __str__
String Conversion in Python: When to Use __repr__ vs __str__
Real Python
41 Method Types in Python OOP: @classmethod, @staticmethod, and Instance Methods
Method Types in Python OOP: @classmethod, @staticmethod, and Instance Methods
Real Python
42 Optional Arguments in Python With *args and **kwargs
Optional Arguments in Python With *args and **kwargs
Real Python
43 Python Context Managers and the "with" Statement (__enter__ & __exit__)
Python Context Managers and the "with" Statement (__enter__ & __exit__)
Real Python
44 Installing Python Packages with pip and virtualenv / venv
Installing Python Packages with pip and virtualenv / venv
Real Python
45 "For Each" Loops in Python with enumerate() and range()
"For Each" Loops in Python with enumerate() and range()
Real Python
46 Python Code Review: LibreOffice Automation and the Python Standard Library
Python Code Review: LibreOffice Automation and the Python Standard Library
Real Python
47 Managing Python Dependencies With Pip and Virtual Environments – Lesson #1
Managing Python Dependencies With Pip and Virtual Environments – Lesson #1
Real Python
48 Python Tutorial: List Comprehensions Step-By-Step
Python Tutorial: List Comprehensions Step-By-Step
Real Python
49 Leveraging Python's Implicit "return None" Statements
Leveraging Python's Implicit "return None" Statements
Real Python
50 What's the meaning of underscores (_ & __) in Python variable names?
What's the meaning of underscores (_ & __) in Python variable names?
Real Python
51 Python Data Structures: Sets, Frozensets, and Multisets (Bags)
Python Data Structures: Sets, Frozensets, and Multisets (Bags)
Real Python
52 Writing automated tests for Python command-line apps and scripts
Writing automated tests for Python command-line apps and scripts
Real Python
How to find great Python packages on PyPI, the Python Package Repository
How to find great Python packages on PyPI, the Python Package Repository
Real Python
54 Immutable vs Mutable Objects in Python
Immutable vs Mutable Objects in Python
Real Python
55 PyPI vs Warehouse, the Next-Generation Python Package Repository
PyPI vs Warehouse, the Next-Generation Python Package Repository
Real Python
56 pep8.org — The Prettiest Way to View the PEP 8 Python Style Guide
pep8.org — The Prettiest Way to View the PEP 8 Python Style Guide
Real Python
57 My Experience at PyCon 2017 in Portland
My Experience at PyCon 2017 in Portland
Real Python
58 Pylint Tutorial – How to Write Clean Python
Pylint Tutorial – How to Write Clean Python
Real Python
59 "Reverse a List in Python" Tutorial: Three Methods & How-to Demos
"Reverse a List in Python" Tutorial: Three Methods & How-to Demos
Real Python
60 Python Refactoring: "while True" Infinite Loops & The "input" Function
Python Refactoring: "while True" Infinite Loops & The "input" Function
Real Python

Related Reads

Up next
The most common trait amongst the world’s top 350 CEO’s 💪
Uncensored CMO
Watch →