PHPackages                             robertogallea/laravel-python - 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. robertogallea/laravel-python

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

robertogallea/laravel-python
============================

Run python scripts inside Laravel app

0.1.1(5y ago)7443.8k↓32.9%9[1 issues](https://github.com/robertogallea/LaravelPython/issues)PHP

Since Dec 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/robertogallea/LaravelPython)[ Packagist](https://packagist.org/packages/robertogallea/laravel-python)[ RSS](/packages/robertogallea-laravel-python/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

LaravelPython
-------------

[](#laravelpython)

Execute Python scripts inside your Laravel Application.

### Installation

[](#installation)

`composer require robertogallea/laravel-python`

### Configuration

[](#configuration)

To edit the default package configuration, publish the config resource with the command

`php artisan vendor:publish --provider="robertogallea\LaravelPython\ServiceProvider" --tag=config`

then edit `config/laravel-python.php`

### Usage

[](#usage)

You can run commands in several ways:

1. Instantiating `LaravelPython` service:

```
use robertogallea\LaravelPython\Services\LaravelPython;
...

$service = new LaravelPython();
$result = $service->run('/path/to/script.py');
$parameters = array('par1', 'par2');
$result = $service->run('/path/to/script.py', $parameters);

```

2. Injecting from the ServiceContainer

```
use robertogallea\LaravelPython\Services\LaravelPython;
...
public function __construct(LaravelPython $service)
{
  $result = $service->run('/path/to/script.py');
  $parameters = array('par1', 'par2');
  $result = $service->run('/path/to/script.py', $parameters);
}

```

3. Using the `Python` facade

```
$result = \Python::run('/path/to/script.py');
$parameters = array('par1', 'par2');
$result = \Python::run('/path/to/script.py', $parameters);

```

4. Via command line with an artisan command

```
php artisan python:run /path/to/script.py "Some parameter"

```

Note that you can use an arbitrary number of parameters

### Issues, Questions and Pull Requests

[](#issues-questions-and-pull-requests)

You can report issues and ask questions in the [issues section](https://github.com/robertogallea/LaravelPython/issues). Please start your issue with ISSUE: and your question with QUESTION:

If you have a question, check the closed issues first. Over time, I've been able to answer quite a few.

To submit a Pull Request, please fork this repository, create a new branch and commit your new/updated code in there. Then open a Pull Request from your new branch. Refer to [this guide](https://help.github.com/articles/about-pull-requests/) for more info.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~0 days

Total

2

Last Release

1980d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/818f547bcf73a82393d9014c85c90c83d760102a8d4dfe806353afb83848a901?d=identicon)[robertogallea](/maintainers/robertogallea)

---

Top Contributors

[![robertogallea](https://avatars.githubusercontent.com/u/19411470?v=4)](https://github.com/robertogallea "robertogallea (4 commits)")[![mariuszmalek](https://avatars.githubusercontent.com/u/26696860?v=4)](https://github.com/mariuszmalek "mariuszmalek (2 commits)")[![Davisy](https://avatars.githubusercontent.com/u/20296550?v=4)](https://github.com/Davisy "Davisy (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/robertogallea-laravel-python/health.svg)

```
[![Health](https://phpackages.com/badges/robertogallea-laravel-python/health.svg)](https://phpackages.com/packages/robertogallea-laravel-python)
```

###  Alternatives

[easy-slug/easy-slug

Laravel Package for creating a slug

1816.8k1](/packages/easy-slug-easy-slug)[corpsepk/yii2-yandex-market-yml

Yii2 module for automatically generation Yandex.Market YML

1810.0k](/packages/corpsepk-yii2-yandex-market-yml)

PHPackages © 2026

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