Skip to main content

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

Release files for getlibs 2026.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getlibs 2026.1.4
File Size Uploaded
getlibs-2026.1.4.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for getlibs 2026.1.4
File Interpreter ABI Platform
getlibs-2026.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / getlibs-2026.1.4.tar.gz

Download URL getlibs-2026.1.4.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7718831df18c49d7a34aaf35e2b394f807d015fe672aa2ea22dd1d8b9b529623
BLAKE2b-256 checksum
How to use checksums
def8a5a7b6143640779ffa9b215be42139ff277377280ff5415d51e8df1d72c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / getlibs-2026.1.4-py3-none-any.whl

Download URL getlibs-2026.1.4-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98e65a478f6eabab194bdff59e47174326de321b6ec0ce0a910aea64d4c7e556
BLAKE2b-256 checksum
How to use checksums
0f9665491771bba5781514701ad668d59d81b490df7b768481f51787dde7a979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

2026.1.4 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page