Skip to main content

Modern Python dependency and project manager with custom resolver, lock files, and comprehensive tooling (pydep CLI).

Project description

PyDepm - Python Dependencies & Projects Manager

Simple, fast, and modern Python project manager. Initialize projects, manage dependencies, build distributions, and publish to PyPI—all from one command.


Features

  • Initialize Projects — Create modules or apps with automatic environment setup
  • Manage Dependencies — Add, remove, update, with dev and optional groups
  • Lock Files — Generate pydepm.lock for reproducible builds (TOML/JSON)
  • Install — Install dependencies, dev-dependencies, and optional groups
  • Build — Create wheels, sdist, or PyInstaller apps
  • Audit — Check for dependency issues and security vulnerabilities
  • Publish — Upload to PyPI or TestPyPI with automated token management
  • Custom Scripts — Define and run scripts from pyproject.toml
  • Beautiful CLI — Progress bars, colors, interactive prompts

🚀 Quick Start

1. Install

pip install pydepm

2. Create a Project

pydep init my_project --type module --env venv
cd my_project

3. Add Dependencies

pydep add requests              # Add to project
pydep add -D pytest             # Add to dev (-D = --save-dev)
pydep add -G docs sphinx        # Add to group (-G = --group)

4. Install & Lock

pydep install                   # Install all
pydep lock                      # Create lock file

5. Build & Publish

pydep build                     # Create distributions
pydep publish                   # Upload to PyPI

All Commands

Command Purpose
pydep init Create new project
pydep add <pkg> Add dependency
pydep remove <pkg> Remove dependency
pydep update <spec> Update dependency
pydep list [-D] [-G <x>] List dependencies
pydep install [-D] [-G <x>] Install all
pydep lock [-D] [-G <x>] Generate lock file
pydep build Build wheel/sdist
pydep run <script> Run custom script
pydep audit Check for issues
pydep security-audit Scan for CVE
pydep fix Fix conflicts
pydep publish Upload to PyPI

Shorthand flags:

  • -D = --save-dev (dev dependencies)
  • -G = --group (optional groups)
  • -g = --global (use system Python)

See Full Reference for all options and examples.


Configuration

All settings in pyproject.toml:

[project]
name = "my-project"
version = "0.1.0"
description = "My project"
requires-python = ">=3.11"

[tool.pydepm]
type = "module"     # or "app"
python-version = "3.11"

[tool.pydepm.env]
type = "venv"           # "venv", "conda", or "global"

[tool.pydepm.scripts]
test = "pytest -v"
lint = "ruff check ."

[project.dependencies]
requests = ">=2.28.0"

[project.optional-dependencies]
dev = ["pytest>=7.0", "black"]
docs = ["sphinx"]

See Configuration Guide for all options.


Lock Files

pydepm.lock stores exact versions:

[metadata]
version = "1.0"
created-at = "2024-04-04T10:30:00Z"
python-version = "3.11"

[resolved]
requests = "2.31.0"
urllib3 = "2.1.0"

Generate with: pydep lock


Project Structure

After pydep init my_project:

my_project/
├── pyproject.toml
├── .gitignore
├── src/my_project/
│   ├── __init__.py
│   └── module.py
├── tests/
│   └── __init__.py
└── .venv/

Common Usage

Create a Library

pydep init mylib --type module
cd mylib
pydep add requests
pydep add pytest -D
pydep build

Create an Application

pydep init myapp --type app
cd myapp
pydep add click rich
pydep build      # Creates executable via PyInstaller

Manage Multiple Dependency Groups

pydep add sphinx -G docs
pydep add pytest -G test
pydep install -G test,docs

Run in CI/CD

# Developer: lock versions
pydep lock
git add pydepm.lock

# CI: install exact versions
pydep install

Documentation

Document Purpose
CLI Reference All commands & flags
Configuration pyproject.toml spec
Lock Format Lock file structure
Architecture How it works
Examples Real-world recipes
Contributing Contribute to PyDepm

Custom Scripts

Define scripts in pyproject.toml:

[tool.pydepm.scripts]
test = "pytest -v"
lint = "ruff check ."
format = "black . && ruff --fix ."
docs = "sphinx-build docs/ build/docs"

Run with:

pydep run test
pydep run lint

Security

pydep audit              # Check for issues
pydep security-audit     # Scan for CVE vulnerabilities
pydep fix                # Fix conflicts
pydep fix --force        # Aggressive fixing

📦 Installation

From PyPI (Recommended)

pip install pydepm

Development

git clone https://github.com/your-repo/pydepm.git
cd pydepm
pip install -e .

Verify

python scripts/quick_validation.py

Why PyDepm?

Feature Poetry Pipenv Pydepm
Dependency management
Easy init
Lock files
App bundling
Simple & fast ⚠️ ⚠️

🤝 Contributing

Contributions welcome! See Contributing Guide.


License

MIT License — See LICENSE


** Ready?** Run: pydep init my_first_project

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

pydepm-1.0.0.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

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

pydepm-1.0.0-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

File details

Details for the file pydepm-1.0.0.tar.gz.

File metadata

  • Download URL: pydepm-1.0.0.tar.gz
  • Upload date:
  • Size: 42.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pydepm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 87f71c70c62a74cc82287c0d4a7594ee91dbd7368ad2285922ac606c1fe33d04
MD5 8f870fca41a3f220f93f04fcbdb55fbd
BLAKE2b-256 4340e4684a0ede6fc3841485f277d0f267d3846a27c12bb1c2fcb9a1e20452ec

See more details on using hashes here.

File details

Details for the file pydepm-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pydepm-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 45.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pydepm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00377b3d27c3db389add2c6f2ec1b53707312c6b689d9a2f78f725cf55f9de10
MD5 8bfb42107e2f69d0d7f0b1793849d1fc
BLAKE2b-256 86ea9b66648399316ea9b7b82dedfbd7c789bfbcba01fe0d8a2046798ee05358

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