PHPackages                             kauffinger/pyman - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kauffinger/pyman

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kauffinger/pyman
================

A skeleton repository for my packages

v0.1.0(2mo ago)130.7k↑287.4%21MITPHPPHP ^8.3.0CI passing

Since Dec 22Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/kauffinger/pyman)[ Packagist](https://packagist.org/packages/kauffinger/pyman)[ GitHub Sponsors](https://github.com/kauffinger)[ RSS](/packages/kauffinger-pyman/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (14)Versions (5)Used By (1)

Pyman - Python Environment Manager for PHP
==========================================

[](#pyman---python-environment-manager-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ddf89fd45829068e05cf63ba6cd4167fb0d90de6bcbe07a79896394d8099c2e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61756666696e6765722f70796d616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kauffinger/pyman)[![Linting](https://camo.githubusercontent.com/4293563fb3f3e1c512cc62857d7f36ae553411a53cf578adb034c18b4126683c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b61756666696e6765722f70796d616e2f666f726d6174732e796d6c3f6272616e63683d6d61696e266c6162656c3d6c696e74696e67267374796c653d666c61742d737175617265)](https://github.com/kauffinger/pyman/actions/workflows/formats.yml)[![Tests](https://camo.githubusercontent.com/6e7ddf3cd187f86d9f33c9f2b1fbb18f55a4f21ba8a17155cd81a9f8ac88ffd5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b61756666696e6765722f70796d616e2f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/kauffinger/pyman/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/9cc1324f10587517abc75cbca6388ef32e9da5409bdd88f8959a96705fd2c28c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61756666696e6765722f70796d616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kauffinger/pyman)

Pyman is a PHP package that simplifies the management of Python dependencies in PHP applications. It's designed to help you seamlessly integrate Python scripts and libraries into your PHP projects by handling virtual environment setup and dependency management.

Features
--------

[](#features)

- Automatic Python virtual environment creation
- Python dependency management via `requirements.txt`
- Easy integration with Laravel's Process handling
- Robust error handling for common Python-related issues

Requirements
------------

[](#requirements)

- PHP 8.3+
- Python 3.x
- pip3

On Debian-based distros you might need `python3.12-venv`

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kauffinger/pyman
```

Usage
-----

[](#usage)

```
use Kauffinger\Pyman\PythonEnvironmentManager;
use Illuminate\Process\Factory;

// Initialize the manager with a base path for your Python environment
$manager = new PythonEnvironmentManager('/path/to/python/environment', new Factory());

// Set up the environment (creates venv and installs dependencies)
try {
    $manager->setup();
} catch (PymanException $e) {
    // Handle any setup errors
    echo $e->getMessage();
}
```

### Requirements File

[](#requirements-file)

Create a `requirements.txt` file in your specified Python environment directory:

```
requests==2.31.0
# Add other Python dependencies as needed
```

Error Handling
--------------

[](#error-handling)

The package throws `PymanException` in the following cases:

- Python3 or pip3 is not installed
- Failed to create the Python directory
- Missing requirements.txt file
- Failed to install Python dependencies
- Failed to create virtual environment

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Konstantin Auffinger](https://github.com/kauffinger)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance88

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~165 days

Total

4

Last Release

61d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0e9a29e1307758a7b7ebb40231f8fbf69522d6fa2b125652d1e8dc48c9f38c7?d=identicon)[kauffinger](/maintainers/kauffinger)

---

Top Contributors

[![kauffinger](https://avatars.githubusercontent.com/u/62616071?v=4)](https://github.com/kauffinger "kauffinger (7 commits)")[![iRajul](https://avatars.githubusercontent.com/u/1621025?v=4)](https://github.com/iRajul "iRajul (1 commits)")

---

Tags

phppackageSkeleton

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kauffinger-pyman/health.svg)

```
[![Health](https://phpackages.com/badges/kauffinger-pyman/health.svg)](https://phpackages.com/packages/kauffinger-pyman)
```

###  Alternatives

[nunomaduro/skeleton-php

A skeleton repository for my packages

9871.4k](/packages/nunomaduro-skeleton-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
