{"id":15903773,"url":"https://github.com/e3v3a/pip-date","last_synced_at":"2025-03-20T20:31:06.304Z","repository":{"id":44812522,"uuid":"159042363","full_name":"E3V3A/pip-date","owner":"E3V3A","description":"A simple CLI tool to show the installation/modification times of all your pip packages","archived":false,"fork":false,"pushed_at":"2023-09-17T07:12:48.000Z","size":127,"stargazers_count":40,"open_issues_count":7,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-13T12:27:42.589Z","etag":null,"topics":["dates","mtime","packaging","pip","pip-date","pip-describe","python","stat"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/E3V3A.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-25T14:50:16.000Z","updated_at":"2024-08-20T00:08:27.000Z","dependencies_parsed_at":"2022-07-20T17:32:32.188Z","dependency_job_id":null,"html_url":"https://github.com/E3V3A/pip-date","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/E3V3A%2Fpip-date","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/E3V3A%2Fpip-date/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/E3V3A%2Fpip-date/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/E3V3A%2Fpip-date/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/E3V3A","download_url":"https://codeload.github.com/E3V3A/pip-date/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221803865,"owners_count":16883227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dates","mtime","packaging","pip","pip-date","pip-describe","python","stat"],"created_at":"2024-10-06T12:04:10.191Z","updated_at":"2024-10-28T08:01:06.987Z","avatar_url":"https://github.com/E3V3A.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### pip-date - Date your pip packages!\n\n[![pypi supported versions][1]][2]\n[![PyPI version][3]][4]\n[![Maintenance][5]][6]\n[![GitHub last commit][7]][8]\n[![Average time to resolve an issue][9]][10]\n\n[1]: https://img.shields.io/pypi/pyversions/pip-date.svg\n[2]: https://pypi.python.org/pypi/pip-date\n[3]: https://badge.fury.io/py/pip-date.svg\n[4]: https://badge.fury.io/py/pip-date\n[5]: https://img.shields.io/badge/Maintained%3F-yes-green.svg\n[6]: https://GitHub.com/E3V3A/pip-date/graphs/commit-activity\n[7]: https://img.shields.io/github/last-commit/E3V3A/pip-date.svg\n[8]: https://github.com/E3V3A/pip-date/commits/master \"Last commits to Master branch\"\n[9]: http://isitmaintained.com/badge/resolution/E3V3A/pip-date.svg\n[10]: http://isitmaintained.com//project/E3V3A/pip-date \"Average time to resolve an issue\"\n\nA simple *Python3* CLI tool to show the installation or modification times of all your pip packages.\n\n| STATUS: | Version | Date | Maintained? |\n|:------- |:------- |:---- |:----------- |\n| Working | `1.0.5` | 2022-01-23 | YES |\n\n---\n\nExample Output:\n\n![Full](./docs/screen1.png)\n\n![Full](./docs/screen2.png)\n\n\nUsing `pip-search \u003cRegEx\u003e`:\n\n![Full](./docs/screen3.png)\n\n---\n\n**Q:** *What does **`pip-date`** do?*\n\nThe primary use is for finding the *time* when a certain pip package was last modified or installed. \nIt is basically using one or more of: **atime, ctime** and **mtime** from the file status (*stat*) info.\nThis is essentially equivalent to using the \\*nix *stat* command, but is handled differently on Windows. \n(See below for further details.)\n\nUsing this information, it can show you and highlight packages that may have been corrupted or outdated. \nI also has some functionality of checking packages for outdated and deprecated installation methods. \n\nBut it can do more. Some features are:\n\n- Highlight packages with inconsistent file modification times (*mTime*).\n- Highlight package **versions** which are not conforming to the [PEP-0440](https://www.python.org/dev/peps/pep-0440/) standard.\n- Highlight packages installed with an unusual package distribution *priority* given by:  **`[chk, src, bin, egg, dev]`**\n- Highlight *`setuptools`* dependency packages for easy review\n- Show package installation type:  with pip/wheel as **`wheel`**, and source as **`sdist`**  (**FIX!**)\n- Show package installation location:   **`usr`** for `--user` and **`sys`** for *global* installations.\n- Show correct file modification time, depending on OS/FS architecture (*mtime* vs *ctime*)\n\n**Q:** *What does it **not** do?*\n\n- Does not install packages\n- Does not show dependencies\n- Does not (yet) show packages in a *`virtualenv`* or *`pipenv`* envrionment (**ToDo**)\n- Does not check package consistency \n- Does not show the very first time you installed a package, if it has been updated since.  \n  (Althought there are left-over artifacts that may show otherwise, we don't look for these.)\n\n\n**Q:** *Why is this needed?*\n\nIt probably isn't, **BUT**...\n\nBecause python packages often rely on a large number of sub-dependencies, it is very easy to accidentally \noverwrite some required dependency of one package with a different version needed by another package. \nYou will never know about it, until it breaks something. One common scenario causing package corruption \nis that you have installed some package XXX using pip, but then get an OS update and install the update \nusing you OS packagemanagement system, like `apt-get install XXX`, which would probably overwrite the \n*globally* installed pip package. This is especially true for beginners of python, who has not yet learned \nhow to use a virtual environment, and installing evything in either the global system (default) or \nuser (`--user`) environments. This may also occur when installing packages from sources, or when \nyou have to run some other non-pip installers like `setup.py`, `make install` or like, \nand you don't really know what it is going to do. \n\n\n**Q:** *What else is included?*\n\n* A script called **`pip-describe`**, that will do what *pip* doesn't, which is to show the \nfull-text `long_description` for **any** PyPI package (including those not already installed).\n\n* A script called **`pipbyday`**, that will print a simple table with:  \n  `mTime/aTime` +  `package-name` + `package-version`, sorted by time.\n\n* A script called **`pyfileinfo`**, that will show detailed file and date information \nfor a given file using python's `os.stat` info.\n\n* A script called **`pyOSinfo`**, that will print a number of *os, system* \nand *platform* variables, as seen by your Python interpreter.\n\n* **`NEW`** A script called (hold your breath!) **`pip-search`**, that will download and \nsearch all of the PyPi package database for packages matching your search criteria. \nHowever, for colored and sexy package searches, I recommend using [pip_search](https://github.com/victorgarric/pip_search).\nAlso, for cool powershell wrapper of pip-search, read [this](https://github.com/E3V3A/pip-date/issues/17#issuecomment-1019325517).\n\n**Q:** *Will I continue to support this tool?*\n\nSure, if it is broken, but I will not spend any more time for new features. So if you would like to add \nsomething just send me a PR, or at the very least, a detailed code snippet of what I need to implement.\n\n---\n\n### Dependencies\n\n\n* [requests](https://github.com/requests/requests) - used by `pip-describe` to get PyPI info\n* [lxml](https://github.com/lxml/lxml) - used by `pip-search` to parse html from PyPI\n\nand what you already have: \n* [Python3](https://www.python.org/) \n* [pip](https://github.com/pypa/pip/)\n\n\n### Installation \n\nThere is nothing to install really. Just download the `pip-date.py` file and make sure to place it in your `PATH`.\n\n**For pip installation:**\n\n```bash\npip install pip-date\n```\n\n\n**For single file installation:**\n\n```bash\ncd /usr/bin/\nwget https://github.com/E3V3A/pip-date/raw/master/pip-date\nchmod 755 pip-date\n```\n\n\n**For developer installation:**\n\n```bash\ngit clone https://github.com/E3V3A/pip-date.git\ncd pip-date\npip install pip-date --user\n```\n\n\n### How to Run\n\n```bash\npip-date      # When it's in your PATH\n./pip-date    # When it's not in your PATH\n```\n\n---\n\n### References:\n\n**Time Stamps**\n\nIt's quite amusing to see how different OS's and File System's (FS) are handling file time stamps.\nIn the Linux world the available time stamps are called [atime](), [ctime]() and [mtime](), where \nthey are generally available through the *`stat`* command. However, Windows systems doesn't have \nthis commmand because NTFS is using a different way to keep track of time-stamps, so older python\nversions would (and Windows OS) would report the wrong values for these. But have since been fixed.\n\n\u003c!-- To summarize the issue of finding the *`\"last modification time\"`* (*mtime*) when using Python on a \nWindows architechture, ~~we need to use *`ctime`* instead.~~ (**Has been fixed!**) Thus we use \n`platform.architecture()` to check the machine's *(bits, linkage)* tuple for the \"WindowsPE\" string, \nand blatantly assuming that it has a Windows FS that need *ctime*, and that anything else should \nuse *mtime*. --\u003e\n\nThen we use: `os.path.getctime(pkg_loc)` to get the file time stamp.\n\nFor all the gory details, see: \n[here](https://linuxhandbook.com/file-timestamps/), \n[here](https://www.unixtutorial.org/atime-ctime-mtime-in-unix-filesystems/) and \n[here](https://en.wikipedia.org/wiki/MAC_times). \n\n---\n\n#### Glossary:\n\n* **`bdist`** - *\"Built Distribution\"*:  \n\tA Distribution format containing files and metadata that only need \n    to be moved to the correct location on the target system, to be \n    installed. *Wheel* is such a format, whereas distutil’s *Source \n    Distribution* is not, in that it requires a build step before it \n\tcan be installed. (A **\"Binary Distribution\"** is also a *bdist*, but \n\twith additional compiled extensions.)\n\n* **`sdist`** - *\"Source Distribution\"*:  \n    A distribution format (usually generated using python setup.py \n    sdist) that provides metadata and the essential source files needed \n    for installing by a tool like pip, or for generating a Built \n    Distribution.\n\n* **`egg`** - **[deprecated]**:  \n    The older *Built Distribution* format introduced by *setuptools*, \n\twhich is being replaced by *wheel*.\n\n* **`wheel`** - \"\":  \n    A *Built Distribution* **format** introduced by [**`PEP-0427`**](https://www.python.org/dev/peps/pep-0427/), which is \n\tintended to replace the \"egg\" format. A wheel (`bdist_wheel`) is a \n\tZIP-format archive with a specially formatted file name and using \n\tthe **`.whl`** extension. Normally, you need one wheel file for each \n\toperating system and architechture. And that list can get long for big \n\tprojects, like *numpy*.\n\n\n---\n\n#### Recommeded or Similar Tools:\n\n- **[pip-check](https://github.com/bartTC/pip-check/)** - Check you pip package update status with nice ANSI colored CLI\n- **[pip-chill](https://github.com/rbanffy/pip-chill)** - Lists only the dependencies (or not) of installed packages\n- **[pip_search](https://github.com/victorgarric/pip_search)** - Victor's amazing pip search replacement\n- **[venvlink](https://github.com/np-8/venvlink)** - Using virtual environments outside of the project folder, like a boss!\n---\n\n#### Bugs and Warnings\n\nNone\n\n\n#### ToDo / Help Needed\n\nSee issues marked [ToDo](https://github.com/E3V3A/pip-date/issues?q=is%3Aopen+is%3Aissue+label%3AToDo).\n\n#### Contribution\n\nFeel free to post issues and PR's related to this tool.  \nFeel free to fork, break, fix and contribute. Enjoy!\n\n\n#### Additional Badges\n\n[![build status][11]][12] [![codecov][13]][14]\n[![codecov](https://codecov.io/gh/E3V3A/pip-date/branch/master/graph/badge.svg?token=wHBDKVmtPk)](https://codecov.io/gh/E3V3A/pip-date)\n\n---\n\n#### License\n\n[![GitHub license][21]][22]  \nA license to :sparkling_heart:!\n\n\u003csub\u003eI use `GPLv3` because sharing code modifications is more beneficial for the world.\u003c/sub\u003e\n\n[11]: https://ci.appveyor.com/api/projects/status/github/pip-date/pip-date?branch=master\u0026svg=true\n[12]: https://ci.appveyor.com/project/pip-date/pip-date\n[13]: https://codecov.io/gh/E3V3A/pip-date/branch/master/graph/badge.svg?token=wHBDKVmtPk\n[14]: https://codecov.io/gh/pip-date/pip-date\n\n[21]: https://img.shields.io/github/license/E3V3A/pip-date.svg\n[22]: https://github.com/E3V3A/pip-date/blob/master/LICENSE.txt","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe3v3a%2Fpip-date","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fe3v3a%2Fpip-date","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe3v3a%2Fpip-date/lists"}