Skip to main content

Automatic, AST-based dependency inference from Python imports. Stop writing dependencies twice.

Project description

pypm – Python Project Manager

PyPI Python License CI Code style: ruff

pypm is a zero-config CLI tool that automatically infers dependencies from your Python source code.

Stop writing dependencies twice. Let your imports define your project.

pypm parses your project using Python’s AST, detects imports, resolves them to their correct PyPI package names (e.g., PILPillow, cv2opencv-python), and generates a modern pyproject.toml for you.

🚀 Installation

Install from PyPI:

pip install pypm-cli

After installation, you can run:

pypm --help

⚡ Quick Start

1️⃣ Infer Dependencies

Scan the current directory and generate/update pyproject.toml:

pypm infer

2️⃣ Infer + Install Dependencies

Infer and install packages automatically:

pypm install

Note: If uv is available, it will be used for faster installs. Otherwise, it falls back to pip.

✨ Features

  • Smart Inference: Recursively scans your project for .py files and extracts all imports.
  • Automatic Resolution: Maps module names to actual PyPI packages:
    • PILPillow
    • cv2opencv-python
    • and many more
  • Standard Library Detection: Automatically ignores Python built-in and stdlib modules.
  • Zero Configuration: No manual requirements.txt maintenance.
  • Modern Standards: Generates PEP 621–compliant pyproject.toml.

📌 Example Workflow

# Inside your Python project
pypm infer

# Review generated pyproject.toml
cat pyproject.toml

# Install dependencies
pypm install

🧠 Why pypm?

Manually maintaining dependencies leads to:

  • Duplicate effort
  • Forgotten imports
  • Mismatched environments
  • Dirty requirements.txt files

pypm makes your imports the single source of truth.

📚 Documentation

See full documentation in: docs/

🔧 Development Setup

If you want to contribute or run locally:

git clone https://github.com/Suriyakumardurai/pypm.git
cd pypm
pip install -e .

📦 Project

Available on PyPI: https://pypi.org/project/pypm-cli/

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

pypm_cli-0.0.2.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

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

pypm_cli-0.0.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file pypm_cli-0.0.2.tar.gz.

File metadata

  • Download URL: pypm_cli-0.0.2.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for pypm_cli-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3ffb5807a7d1872c06f11aceaff840551ff2e7563736da016fbcd1173768bd6c
MD5 0a2d74b15160944553b05a2f400859ed
BLAKE2b-256 4d8357522bbef26683b0daccb5f032eb0267f87a5c678d97d3b4333e169fd3ae

See more details on using hashes here.

File details

Details for the file pypm_cli-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pypm_cli-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for pypm_cli-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 94cc38359474d3ae19ef913ad714e117b571188a44803e096c33634671110c00
MD5 136a85e77b632825a09face907019389
BLAKE2b-256 60b6c59c40173b08ab15e66623cc46849773dac8399d972f61f61c316579cd66

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