Package: pip-date
pip-date - Date your pip packages!A simplePython3CLI tool to show the installation or modification times of all your pip packages.STATUS:VersionDateMaintained?Working1.0.52022-01-23YESExample Output:Q:What doespip-datedo?The primary use is for finding thetimewhen a certain pip package was last modified or installed.
It is basically using one or more of:atime, ctimeandmtimefrom the file status (stat) info.
This is essentially equivalent to using the *nixstatcommand, but is handled differently on Windows.
(See below for further details.)Using this information, it can show you and highlight packages that may have been corrupted or outdated.
I also has some functionality of checking packages for outdated and deprecated installation methods.But it can do more. Some features are:Highlight packages with inconsistent file modification times (mTime).Highlight packageversionswhich are not conforming to thePEP-0440standard.Highlight packages installed with an unusual package distributionprioritygiven by:[chk, src, bin, egg, dev]Highlightsetuptoolsdependency packages for easy reviewShow package installation type:  with pip/wheel aswheel, and source assdist(FIX!)Show package installation location:usrfor--userandsysforglobalinstallations.Show correct file modification time, depending on OS/FS architecture (mtimevsctime)Q:What does itnotdo?Does not install packagesDoes not show dependenciesDoes not (yet) show packages in avirtualenvorpipenvenvrionment (ToDo)Does not check package consistencyDoes not show the very first time you installed a package, if it has been updated since.(Althought there are left-over artifacts that may show otherwise, we don't look for these.)Q:Why is this needed?It probably isn't,BUT...Because python packages often rely on a large number of sub-dependencies, it is very easy to accidentally
overwrite some required dependency of one package with a different version needed by another package.
You will never know about it, until it breaks something. One common scenario causing package corruption
is that you have installed some package XXX using pip, but then get an OS update and install the update
using you OS packagemanagement system, likeapt-get install XXX, which would probably overwrite thegloballyinstalled pip package. This is especially true for beginners of python, who has not yet learned
how to use a virtual environment, and installing evything in either the global system (default) or
user (--user) environments. This may also occur when installing packages from sources, or when
you have to run some other non-pip installers likesetup.py,make installor like,
and you don't really know what it is going to do.Q:What else is included?A script calledpip-describe, that will do whatpipdoesn't, which is to show the
full-textlong_descriptionforanyPyPI package (including those not already installed).A script calledpipbyday, that will print a simple table with:mTime/aTime+package-name+package-version, sorted by time.A script calledpyfileinfo, that will show detailed file and date information
for a given file using python'sos.statinfo.A script calledpyOSinfo, that will print a number ofos, systemandplatformvariables, as seen by your Python interpreter.NEWA script called (hold your breath!)pip-search, that will download and
search all of the PyPi package database for packages matching your search criteria.
However, for colored and sexy package searches, I recommend usingpip_search.
Also, for cool powershell wrapper of pip-search, readthis.Q:Will I continue to support this tool?Sure, if it is broken, but I will not spend any more time for new features. So if you would like to add
something just send me a PR, or at the very least, a detailed code snippet of what I need to implement.Dependenciesrequests- used bypip-describeto get PyPI infolxml- used bypip-searchto parse html from PyPIand what you already have:Python3pipInstallationThere is nothing to install really. Just download thepip-date.pyfile and make sure to place it in yourPATH.For pip installation:pipinstallpip-dateFor single file installation:cd/usr/bin/
wgethttps://github.com/E3V3A/pip-date/raw/master/pip-date
chmod755pip-dateFor developer installation:gitclonehttps://github.com/E3V3A/pip-date.gitcdpip-date
pipinstallpip-date--userHow to Runpip-date# When it's in your PATH./pip-date# When it's not in your PATHReferences:Time StampsIt's quite amusing to see how different OS's and File System's (FS) are handling file time stamps.
In the Linux world the available time stamps are calledatime,ctimeandmtime, where
they are generally available through thestatcommand. However, Windows systems doesn't have
this commmand because they are using a different way toblah blah...To summarize the issue of finding the"last modification time"(mtime) when using Python on a
Windows architechture, we need to usectimeinstead. Thus we useplatform.architecture()to
check the machine's(bits, linkage)tuple for the "WindowsPE" string, and blatantly assuming
that it has a Windows FS that needctime, and that anything else should usemtime.Then we use:os.path.getctime(pkg_loc)to get the file time stamp.For all the gory details, see:here,hereandhere.Glossary:bdist-"Built Distribution":A Distribution format containing files and metadata that only need
to be moved to the correct location on the target system, to be
installed.Wheelis such a format, whereas distutil’sSource
Distributionis not, in that it requires a build step before it
can be installed. (A"Binary Distribution"is also abdist, but
with additional compiled extensions.)sdist-"Source Distribution":A distribution format (usually generated using python setup.py
sdist) that provides metadata and the essential source files needed
for installing by a tool like pip, or for generating a Built
Distribution.egg-[deprecated]:The olderBuilt Distributionformat introduced bysetuptools,
which is being replaced bywheel.wheel- "":ABuilt Distributionformatintroduced byPEP-0427, which is
intended to replace the "egg" format. A wheel (bdist_wheel) is a
ZIP-format archive with a specially formatted file name and using
the.whlextension. Normally, you need one wheel file for each
operating system and architechture. And that list can get long for big
projects, likenumpy.Recommeded or Similar Tools:pip-check- Check you pip package update status with nice ANSI colored CLIpip-chill- Lists only the dependencies (or not) of installed packagespip_search- Victor's amazing pip search replacementvenvlink- Using virtual environments outside of the project folder, like a boss!Bugs and WarningsNoneToDo / Help NeededSee issues markedToDo.ContributionFeel free to post issues and PR's related to this tool.Feel free to fork, break, fix and contribute. Enjoy!Additional BadgesLicenseA license to :sparkling_heart:!I useGPLv3because sharing code modifications is more beneficial for the world.