CLI tool for detecting unused dependencies in Python projects
Project description
Unclaimed Libraries
Unclaimed Libraries – это CLI‑инструмент для поиска неиспользуемых зависимостей в Python‑проектах. Он анализирует pyproject.toml, просматривает все импорты в коде, отфильтровывает стандартную библиотеку и локальные модули, а также обращается к PyPI, чтобы пропустить пакеты, предназначенные только для разработки (линтеры, тестовые фреймворки, CLI‑утилиты и т.д.).
✨ Возможности
-
✅ Точное обнаружение – обрабатывает
import,from ... import, динамические импорты (importlib.import_module,__import__). -
🧠 Умная фильтрация – автоматически игнорирует:
- модули стандартной библиотеки Python
- локальные модули/пакеты (включая namespace packages)
- пакеты для разработки (линтеры, тесты, статические анализаторы, CLI‑помощники) – используя классификаторы PyPI.
📦 Установка
pip install unclaimed-libraries
Or using uv:
uv add unclaimed-libraries
🚀 Использование
# Анализ текущей папки
unclib
# Анализ конкретного проекта
unclib /path/to/myproject
# Исключить дополнительные каталоги
unclib . --exclude legacy scripts
🙋 Как внести вклад
Приветствуются issues и pull request’ы! Пожалуйста, сначала создайте issue для обсуждения значительных изменений.
Распространяется под лицензией MIT. Подробности в файле LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unclaimed_libraries-0.1.2.tar.gz.
File metadata
- Download URL: unclaimed_libraries-0.1.2.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f2276a40753c3eb6c7e24389084d272bfd1580bc5cb3ec0ed6d971456e55d1a
|
|
| MD5 |
5e8ff295eb37c1b3d68ed4b7f4237aed
|
|
| BLAKE2b-256 |
199cf4e7cee3c939fae40be2004455db5b49b35988f4fe25c2968ddb33a4c716
|
Provenance
The following attestation bundles were made for unclaimed_libraries-0.1.2.tar.gz:
Publisher:
workflow.yml on AndrewMedvedev/unclaimed-libraries
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unclaimed_libraries-0.1.2.tar.gz -
Subject digest:
1f2276a40753c3eb6c7e24389084d272bfd1580bc5cb3ec0ed6d971456e55d1a - Sigstore transparency entry: 1390711778
- Sigstore integration time:
-
Permalink:
AndrewMedvedev/unclaimed-libraries@eacbab1ea78766db401c088218552d957263e6d0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AndrewMedvedev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@eacbab1ea78766db401c088218552d957263e6d0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unclaimed_libraries-0.1.2-py3-none-any.whl.
File metadata
- Download URL: unclaimed_libraries-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79ab9da67c7a6e42cf5ccbf5bb066a506a9acbca7d66359b6d6261f36205acb1
|
|
| MD5 |
8c192b7c2d392b892063f67307906a60
|
|
| BLAKE2b-256 |
31b12d15d094ced0eb9321662ea4ac9f3d81d9fc555f7928150e8dd1e9ef3c52
|
Provenance
The following attestation bundles were made for unclaimed_libraries-0.1.2-py3-none-any.whl:
Publisher:
workflow.yml on AndrewMedvedev/unclaimed-libraries
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unclaimed_libraries-0.1.2-py3-none-any.whl -
Subject digest:
79ab9da67c7a6e42cf5ccbf5bb066a506a9acbca7d66359b6d6261f36205acb1 - Sigstore transparency entry: 1390711801
- Sigstore integration time:
-
Permalink:
AndrewMedvedev/unclaimed-libraries@eacbab1ea78766db401c088218552d957263e6d0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AndrewMedvedev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@eacbab1ea78766db401c088218552d957263e6d0 -
Trigger Event:
push
-
Statement type: