Skip to main content

PHP Compiler Python Package

This Python package facilitates seamless compilation of PHP code through integration with the Codegyan API, streamlining the verification process and ensuring code correctness with minimal effort.

Installation

You can install the package via pip:

pip install php-compiler-py

Usage

Before using the Pakage, you need to obtain an API key and client ID from Codegyan. Follow these steps to get your API credentials:

  1. Sign Up/Login: If you don't have an account, sign up for a Codegyan account. If you already have an account, log in to your dashboard.

  2. Get Credentials: Once logged in, navigate to the Developer Console or API settings in your account dashboard. Here, you will find your API key and client ID. Copy these credentials and use them when initializing the Pakage in your code.

Here's an example of how to initialize the Pakage with your API key and client ID:

  • Import the compilePHP function from the package:
from php_compiler_py import compilePHP
  • Call the compilePHP function with your API key, client ID, and PHP code:
apiKey = 'your_api_key'
clientId = 'your_client_id'
code = '<?php echo "Hello, world!"; ?>'

result = compilePHP(apiKey, clientId, code)
print(result)

Replace 'your_api_key' and 'your_client_id' with your actual API key and client ID obtained from the Codegyan website. Replace with the code you want to compile.

The function will compile the provided PHP code using the Codegyan API and return the compilation result.

Features

  • PHP Code Compilation : The package provides a function compilePHP(apiKey, clientId, code) that allows users to compile PHP code using the Codegyan API. This feature enables developers to verify the correctness of their PHP code without the need for local PHP installations.

  • Simple Interface : With just a few lines of code, users can easily integrate the compilePHP function into their Python projects. The function takes API key, client ID, and PHP code as arguments, making it straightforward to use.

  • Error Handling : The package includes error handling to ensure robustness during compilation. If there are any issues with the compilation process, appropriate error messages are returned, allowing developers to identify and address problems effectively.

  • Customization Options : Users have the flexibility to customize the compilation process by providing their own API key and client ID. This customization ensures that developers can utilize their Codegyan account for PHP code compilation seamlessly.

  • License : The package is licensed under the MIT License, providing users with the freedom to use, modify, and distribute the code according to their requirements.

  • Compatibility : The package is compatible with both Python 2 and Python 3, ensuring that a wide range of Python environments can utilize its functionality without compatibility issues.

License

This project is licensed under the MIT License - see the License file for details.

Metadata

Release files for php-compiler-py 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for php-compiler-py 1.0.0
File Size Uploaded
php_compiler_py-1.0.0.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for php-compiler-py 1.0.0
File Interpreter ABI Platform
php_compiler_py-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / php_compiler_py-1.0.0.tar.gz

Download URL php_compiler_py-1.0.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5d0a02c7aaa5438037c4c1e631a5e62b3a19fb36f13db00c94459e4d761b4aaf
BLAKE2b-256 checksum
How to use checksums
4f1767724306c557efbbcf01f42a17e0bd2d2c1ba2fef1037d62c7303f6cd33b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.0

Release files / php_compiler_py-1.0.0-py3-none-any.whl

Download URL php_compiler_py-1.0.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc93842398050e3beb94ef1c82acc21c75e0e7da793e53aea952c780e8b23fde
BLAKE2b-256 checksum
How to use checksums
fd78a618005204df398baaf376b015b18fde28163b79800300e9c858ef0eae56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page