Welcome to pyreqs, a Visual Studio Code extension that automatically generates a requirements.txt file for your Python projects. With pyreqs, you can save time and ensure your dependencies are accurately listed by scanning your project files.
-
Automatic Dependency Detection: Scans all
.pyfiles in your workspace to identify required libraries. -
Excludes Standard Libraries: Filters out Python's built-in modules, ensuring only external libraries are included.
-
Handles
.gitignore: Respects your.gitignorefile to avoid unnecessary files and directories like.venv. -
One-Click Execution: Generate a
requirements.txtfile by simply running theGenerate requirements.txtcommand.
-
Open your Python project in VS Code.
-
Run the command
Generate requirements.txtfrom the Command Palette (Ctrl+Shift+PorCmd+Shift+Pon macOS). -
Find your
requirements.txtfile in the root of your workspace.
This extension currently does not require additional settings. Future updates may include customizable options.
-
Large projects with thousands of files may take longer to scan.
-
Nested imports within dynamically loaded modules might not be detected.
-
Initial release of pyreqs.
-
Automatic generation of
requirements.txtwith standard library exclusion using Command Palette -
.gitignoresupport to exclude ignored files and directories.