Metadata-Version: 2.4
Name: dependeless
Version: 0.1.2
Summary: A tool to show which pip packages are not depended on by any other package
Keywords: pip,dependencies,unused,packages,clean
Author-email: Lucas van der Horst <Lucas@vdrHorst.nl>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
License-File: LICENSE
Requires-Dist: click>=8.1
Requires-Dist: pip3-autoremove>=1.2
Project-URL: Bug Tracker, https://gitlab.com/Lucas_van_der_Horst/dependeless/-/issues
Project-URL: Documentation, https://gitlab.com/Lucas_van_der_Horst/dependeless/-/blob/main/README.md
Project-URL: Homepage, https://gitlab.com/Lucas_van_der_Horst/dependeless
Project-URL: Source Code, https://gitlab.com/Lucas_van_der_Horst/dependeless

# Dependeless

A tiny CLI tool to find **installed pip packages that nothing depends on**.

Perfect for cleaning up cluttered Python environments.

---

## 🤔 Why?

Over time, Python environments get messy:

* You install packages to try things out
* Dependencies change
* Projects get deleted

And suddenly you have dozens of packages… with no idea which are still needed.

**Dependeless helps you identify packages that are likely safe to remove.**

---

## ⚠️ Important

Dependeless **does NOT check if a package is used in your code**.

It only finds packages that:

> are not required by any other installed package

This means:

* ✅ Good for finding leftover dependencies
* ❌ Not guaranteed safe to uninstall

👉 Always review results before removing anything.

---

## 📦 Installation

```bash
pip install dependeless
```

---

## 🚀 Usage

Run inside your virtual environment:

```bash
dependeless
```

Or specify a custom pip:

```bash
dependeless --pip-path /path/to/pip
```

---

## 🧾 Example output

```text
Using pip at /usr/bin/pip
Scanning 42 packages...

Non-dependent packages:
requests
numpy
pytest
```

Suggested cleanup command:

```bash
pip-autoremove -y requests numpy pytest
```

---

## 🙈 Ignoring packages

By default, `pip` and `dependeless` are ignored.

You can exclude additional packages:

```bash
dependeless --ignore "pip, setuptools, my_package"
```

---

## 🧠 How it works

Dependeless runs:

* `pip list` to get installed packages
* `pip show <package>` to inspect each package

It then checks the `Required-by` field:

* empty → no packages depend on it
* non-empty → used as a dependency

---

## ⏱ Performance

Dependeless calls `pip show` for every package.

This means:

* 🐢 Can be slow in large environments
* ⚡ Works best in smaller or moderately sized environments

---

## ✅ When is this useful?

* Cleaning up old virtual environments
* Investigating bloated global installs
* Debugging dependency issues
* After lots of `pip install` / experimentation

---

## 🚫 When NOT to use this

* As a replacement for dependency management tools like:

  * Poetry
  * Pipenv

* To detect unused imports in your code

---

## 💡 Tip

For a clean workflow, combine Dependeless with:

* fresh virtual environments (`venv`)
* pinned dependencies (`requirements.txt`)


