Skip to main content

Python projeleri için dependency ve import analiz aracı

Project description

getlibs

getlibs is a dependency analysis tool for Python projects that inspects all import statements and detects:

  • Local modules

  • Built-in (standard library) modules

  • 3rd-party (pip) packages

  • Missing / unknown imports

It is specifically designed to:

  • Generate a requirements.txt from an existing project

  • Check dependencies in CI/CD pipelines

  • Ensure compatibility across different Python environments


Features

  • 🔍 AST-based real import analysis (not regex)

  • 🧠 Uses top_level.txt for import name → pip package mapping

  • 🐍 Analyzes using the target Python executable (avoids environment mismatch issues)

  • 📄 Produces 4 output formats:

    • Detailed TXT report

    • CI-friendly JSON report

    • requirements.txt containing only used packages

    • constraints.txt covering the entire environment

  • 🧩 Clearly separates local / built-in / 3rd-party imports


Installation

pip3.13 install getlibs


Usage

`cd /project/path/

getlibs --project-dir . --python-exec python3.13`

This will analyze your project and generate all output files in a timestamped report folder:

  • Detailed TXT report

  • JSON for CI/CD

  • Requirements file with used packages

  • Constraints file with all installed packages

Sample Output

ANALİZ RAPORU: **

Target Python: python3.13

======================================================================

Dosya: base_engine.py


  • Bilinmiyor bson : Yüklü Değil / Bulunamadı
  • Built-in datetime : Std Lib
  • Built-in functools : Std Lib
  • Built-in json : Std Lib
  • Built-in os : Std Lib
  • 3. Parti pymongo : pymongo==4.15.5
  • Built-in re : Std Lib
  • Built-in subprocess : Std Lib

Dosya: main.py


  • Built-in base64 : Std Lib
  • Yerel base_engine : Local Module
  • 3. Parti fastapi : fastapi==0.128.0
  • Bilinmiyor functions : Yüklü Değil / Bulunamadı
  • Built-in importlib : Std Lib
  • Built-in os : Std Lib
  • 3. Parti psycopg2cffi : psycopg2cffi==2.9.0
  • 3. Parti starlette : starlette==0.50.0

Türkçe

getlibs, bir Python projesindeki tüm import ifadelerini analiz ederek:

  • Yerel modülleri
  • Built-in (standart kütüphane) modülleri
    1. parti (pip) paketleri
  • Eksik / bilinmeyen import’ları

tespit eden bir dependency analiz aracıdır.

Özellikle:

  • Mevcut bir projeden requirements.txt çıkarmak
  • CI/CD süreçlerinde dependency denetimi yapmak
  • Farklı Python ortamları için uyumluluk kontrolü yapmak

amacıyla tasarlanmıştır.


Özellikler

  • 🔍 AST tabanlı gerçek import analizi (regex değil)
  • 🧠 top_level.txt kullanarak import adı → pip paket adı eşlemesi
  • 🐍 Hedef Python executable üzerinden analiz (env farkı sorunu yok)
  • 📄 4 farklı çıktı üretir:
    • Detaylı TXT rapor
    • CI uyumlu JSON
    • Sadece kullanılan paketlerden requirements.txt
    • Tüm ortamı kapsayan constraints.txt
  • 🧩 Yerel / built-in / 3. parti ayrımı net şekilde yapılır

Kurulum

pip3.13 install getlibs

cd /project/path/

getlibs --project-dir . --python-exec python3.13

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

getlibs-2026.1.4.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

getlibs-2026.1.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file getlibs-2026.1.4.tar.gz.

File metadata

  • Download URL: getlibs-2026.1.4.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for getlibs-2026.1.4.tar.gz
Algorithm Hash digest
SHA256 7718831df18c49d7a34aaf35e2b394f807d015fe672aa2ea22dd1d8b9b529623
MD5 1db30b2ceaf86769b8578431aa52a240
BLAKE2b-256 def8a5a7b6143640779ffa9b215be42139ff277377280ff5415d51e8df1d72c4

See more details on using hashes here.

File details

Details for the file getlibs-2026.1.4-py3-none-any.whl.

File metadata

  • Download URL: getlibs-2026.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for getlibs-2026.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 98e65a478f6eabab194bdff59e47174326de321b6ec0ce0a910aea64d4c7e556
MD5 f77d768996710e5fd4a7d72db7144c90
BLAKE2b-256 0f9665491771bba5781514701ad668d59d81b490df7b768481f51787dde7a979

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page