pkgu


Namepkgu JSON
Version 0.0.28 PyPI version JSON
download
home_pagehttps://github.com/Abeautifulsnow/pkgu
SummaryManage the installed package by providing support for updating and uninstalling.
upload_time2024-07-30 13:56:59
maintainerNone
docs_urlNone
authorAbeautifulsnow <lnrunstone.0727@gmail.com>
requires_pythonNone
licenseMIT
keywords python3 pip pip install pkg --upgrade pip-update uninstall
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pkgu

Find the out-dated packages installed by the Pip tool and update them. Inspired by πŸ‘‰[depu(Go)](https://github.com/kevwan/depu).
However, `pkgu` supports full and partial updates, which is more convenient and flexible. It also supports cross-platform(Windows, linux, macos). πŸ€“ To retrieve the data more fast after the first-time(Or don't have to execute command again), I use sqlite as cache db to store the data and can quickly read it from db and present it to the consoleπŸ’».

πŸ‘‰ However, only python3.10 and above are available now.

## Usage

- Run code from source code

First, you need to install dependencies.

if you don't have `poetry` tool, please install it first. πŸ”—: [poetry installation](https://python-poetry.org/docs/#installation), otherwise, install packages directly.

```bash
poetry install
```

and then, run `pkgu.py` script.

```bash
python3 pkgu.py
```

- Use it through pip - ***Highly Recommended***

```bash
pip3 install pkgu
```

after the installation is complete, `pkgu` executable file will be written to the python bin directory and you can enter `pkgu -h` command on your terminal to learn how to use it.

```bash
# Usage
usage: pkgu [-h] [-v] {update,remove} ...

Upgrade and uninstall python package.

options:
  -h, --help       show this help message and exit
  -v, --version    Display pkgu version and information

Available commands:
  {update,remove}  Available commands
    update         Update python package.
    remove         remove python package with its dependencies.

# ------ update ------
options:
  -h, --help            show this help message and exit
  -a, --async_upgrade   Update the library asynchronously. Default: False
  -d CACHE_FOLDER, --cache_folder CACHE_FOLDER
                        The cache.db file. Default: ~/.cache/cache.db
  -e EXPIRE_TIME, --expire_time EXPIRE_TIME
                        The expiration time. Default: 43200
  --no-cache            Whether to use db cache. Default: False

# ------ remove ------
options:
  -h, --help    show this help message and exit
  -l, --list    list unused dependencies, but don't uninstall them.
  -L, --leaves  list leaves (packages which are not used by any others).
  -y, --yes     don't ask for confirmation of uninstall deletions.
  -f, --freeze  list leaves (packages which are not used by any others) in requirements.txt format
```

## ScreenShoot

> 1. No packages need to be upgraded.

![img.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img.png)

> 2. Upgrade some expired packages.

![img_4.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_4.png)
![img_2.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_2.png)
![img_3.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_3.png)

> 3. Update the pkg synchronously

![img_1.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_1.png)

> 4. Update the pkg asynchronously

![img_5.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_5.png)

We can see that the async method is faster than sync method about 9 seconds(Only in this test situation).
So now it can support to update the python libraries asynchronously. πŸ₯³

> 5. Support for selectable update packages

- List all availbable packages

![img_6.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_6.png)

- Select ths part of package to be updated

![img_7.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_7.png)

> 6. Support to use cache result from sqlite db file.

This improve the expirence that how we list the out-dated packages when they are huge to collect, and then there also is a cli flag `--no-cache` to control whether should to use cache.

> 7. !!!New - Support to uninstall package with its dependencies together.

![img_8.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_8.png)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Abeautifulsnow/pkgu",
    "name": "pkgu",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python3, pip, pip install pkg --upgrade, pip-update, uninstall",
    "author": "Abeautifulsnow <lnrunstone.0727@gmail.com>",
    "author_email": "lcprunstone@163.com",
    "download_url": null,
    "platform": null,
    "description": "# pkgu\n\nFind the out-dated packages installed by the Pip tool and update them. Inspired by \ud83d\udc49[depu(Go)](https://github.com/kevwan/depu).\nHowever, `pkgu` supports full and partial updates, which is more convenient and flexible. It also supports cross-platform(Windows, linux, macos). \ud83e\udd13 To retrieve the data more fast after the first-time(Or don't have to execute command again), I use sqlite as cache db to store the data and can quickly read it from db and present it to the console\ud83d\udcbb.\n\n\ud83d\udc49 However, only python3.10 and above are available now.\n\n## Usage\n\n- Run code from source code\n\nFirst, you need to install dependencies.\n\nif you don't have `poetry` tool, please install it first. \ud83d\udd17: [poetry installation](https://python-poetry.org/docs/#installation), otherwise, install packages directly.\n\n```bash\npoetry install\n```\n\nand then, run `pkgu.py` script.\n\n```bash\npython3 pkgu.py\n```\n\n- Use it through pip - ***Highly Recommended***\n\n```bash\npip3 install pkgu\n```\n\nafter the installation is complete, `pkgu` executable file will be written to the python bin directory and you can enter `pkgu -h` command on your terminal to learn how to use it.\n\n```bash\n# Usage\nusage: pkgu [-h] [-v] {update,remove} ...\n\nUpgrade and uninstall python package.\n\noptions:\n  -h, --help       show this help message and exit\n  -v, --version    Display pkgu version and information\n\nAvailable commands:\n  {update,remove}  Available commands\n    update         Update python package.\n    remove         remove python package with its dependencies.\n\n# ------ update ------\noptions:\n  -h, --help            show this help message and exit\n  -a, --async_upgrade   Update the library asynchronously. Default: False\n  -d CACHE_FOLDER, --cache_folder CACHE_FOLDER\n                        The cache.db file. Default: ~/.cache/cache.db\n  -e EXPIRE_TIME, --expire_time EXPIRE_TIME\n                        The expiration time. Default: 43200\n  --no-cache            Whether to use db cache. Default: False\n\n# ------ remove ------\noptions:\n  -h, --help    show this help message and exit\n  -l, --list    list unused dependencies, but don't uninstall them.\n  -L, --leaves  list leaves (packages which are not used by any others).\n  -y, --yes     don't ask for confirmation of uninstall deletions.\n  -f, --freeze  list leaves (packages which are not used by any others) in requirements.txt format\n```\n\n## ScreenShoot\n\n> 1. No packages need to be upgraded.\n\n![img.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img.png)\n\n> 2. Upgrade some expired packages.\n\n![img_4.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_4.png)\n![img_2.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_2.png)\n![img_3.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_3.png)\n\n> 3. Update the pkg synchronously\n\n![img_1.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_1.png)\n\n> 4. Update the pkg asynchronously\n\n![img_5.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_5.png)\n\nWe can see that the async method is faster than sync method about 9 seconds(Only in this test situation).\nSo now it can support to update the python libraries asynchronously. \ud83e\udd73\n\n> 5. Support for selectable update packages\n\n- List all availbable packages\n\n![img_6.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_6.png)\n\n- Select ths part of package to be updated\n\n![img_7.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_7.png)\n\n> 6. Support to use cache result from sqlite db file.\n\nThis improve the expirence that how we list the out-dated packages when they are huge to collect, and then there also is a cli flag `--no-cache` to control whether should to use cache.\n\n> 7. !!!New - Support to uninstall package with its dependencies together.\n\n![img_8.png](https://raw.githubusercontent.com/Abeautifulsnow/pkgu/main/screenshoot/img_8.png)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Manage the installed package by providing support for updating and uninstalling.",
    "version": "0.0.28",
    "project_urls": {
        "Homepage": "https://github.com/Abeautifulsnow/pkgu"
    },
    "split_keywords": [
        "python3",
        " pip",
        " pip install pkg --upgrade",
        " pip-update",
        " uninstall"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49689b615c48da32bcd58112ee8abc15f931e20ff3fb22582c386661f2ee82ee",
                "md5": "cafa2de280497332072a50fef1e7fd74",
                "sha256": "34655d80c59c12dcf738ceaed494c98d30c578dd09d73388f0901a17a755faa2"
            },
            "downloads": -1,
            "filename": "pkgu-0.0.28-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cafa2de280497332072a50fef1e7fd74",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14482,
            "upload_time": "2024-07-30T13:56:59",
            "upload_time_iso_8601": "2024-07-30T13:56:59.623534Z",
            "url": "https://files.pythonhosted.org/packages/49/68/9b615c48da32bcd58112ee8abc15f931e20ff3fb22582c386661f2ee82ee/pkgu-0.0.28-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-30 13:56:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Abeautifulsnow",
    "github_project": "pkgu",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pkgu"
}
        
Elapsed time: 0.35909s