PHPackages                             omaralalwi/php-py - 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. omaralalwi/php-py

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

omaralalwi/php-py
=================

play with python in PHP applications

1.0.3(1y ago)1815031MITPHPPHP ^8.1

Since Feb 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/omaralalwi/php-py)[ Packagist](https://packagist.org/packages/omaralalwi/php-py)[ Docs](https://github.com/omaralalwi/php-py)[ RSS](/packages/omaralalwi-php-py/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (8)Used By (1)

PhpPy - PHP Python 🚀🐍
=====================

[](#phppy---php-python-)

Seamlessly enabling secure and efficient execution of Python scripts within PHP applications without spread multiple applications and or setup API.

### 🛠 [Laravel py package](https://github.com/omaralalwi/laravel-py)

[](#-laravel-py-package)

---

📌 Table of Contents
-------------------

[](#-table-of-contents)

- [📖 Overview](#-overview)
- [🔧 Requirements](#requirements)
- [🚀 Installation](#installation-)
- [🚀 Quick Start](#-quick-start)
- [✨ Features](#-features)
- [🛠 Framework Integration](#-framework-integration)
- [📋 Changelog](#-changelog)
- [🧪 Testing](#-testing)
- [🔒 Security](#-security)
- [🤝 Contributors](#-contributors)
- [📄 License](#-license)

---

📖 Overview
----------

[](#-overview)

The `PhpPy` package provides seamless integration between PHP and Python without API, enabling secure and efficient execution of Python scripts within PHP applications. It ensures structured script execution while managing configurations, arguments, environment variables, and error handling.

---

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

[](#requirements)

- PHP 8.1+
- [python3](https://www.python.org/) must be installed in server .

---

Installation 🛠️
---------------

[](#installation-️)

You can install the package via Composer:

```
composer require omaralalwi/php-py
```

---

🚀 Quick Start
-------------

[](#-quick-start)

1. 📂 Create a folder for scripts, e.g., `phpPyScripts` in your project root directory.
2. 📝 Create a Python script file (`.py` extension) and write Python code. [See this script examples](https://github.com/omaralalwi/php-py/tree/master/example-scripts).
3. 🔧 make script file executable, `chmod +x script_file_path` .

### ⚡ Easy Usage

[](#-easy-usage)

```
