Since pypi doesn't provide an API to search for packages and it recommends using https://pypi.org/simple/ instead, this workflow fetches the list of Python packages when it's used for the first time (~22MB will be downloaded). This list gets stored as a JSON file in the workflow's directory and will be used to search for packages. To update this list you can use pypi-fetch keyword.
Search for packages
Use pypi <package-name> keyword (as shown in the demo above).
The first three results will have an up-to-date latest version and summary (fetched from pypi in real time). Other items in the list will only have the name (fetched from the local JSON file to prevent rate limit on pypi).
Copy the latest version to the clipboard
Hitting enter will copy the latest version number of the package to the clipboard (0.101.0 in the demo above).
Open the package page on pypi
Holding Option while hitting Enter will open the package's page on pypi in the default browser.
View a list of the latest versions of a package
Use pypi <package-name>/ to view a list of the latest versions of a package:
Hitting enter in this list will copy the version number to the clipboard.
Search for python packages and their latest version on pypi
in Share your Workflows
Posted · Edited by saeedesmaili
Hello everyone
This is my first attempt to create an Alfred workflow.
pypied
Search for Python packages in pypi and get the latest version number of a package.
Github repository
Installation
Download the workflow here.
Usage
Fetch the list of packages
Since pypi doesn't provide an API to search for packages and it recommends using
https://pypi.org/simple/
instead, this workflow fetches the list of Python packages when it's used for the first time (~22MB will be downloaded). This list gets stored as a JSON file in the workflow's directory and will be used to search for packages. To update this list you can usepypi-fetch
keyword.Search for packages
Use
pypi <package-name>
keyword (as shown in the demo above).The first three results will have an up-to-date
latest version
andsummary
(fetched from pypi in real time). Other items in the list will only have thename
(fetched from the local JSON file to prevent rate limit on pypi).Copy the latest version to the clipboard
Hitting
enter
will copy the latest version number of the package to the clipboard (0.101.0
in the demo above).Open the package page on pypi
Holding
Option
while hittingEnter
will open the package's page on pypi in the default browser.View a list of the latest versions of a package
Use
pypi <package-name>/
to view a list of the latest versions of a package:Hitting
enter
in this list will copy the version number to the clipboard.