Skip to main content

A python client for codegyan php compiler API

Project description

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.

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

php_compiler_py-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

php_compiler_py-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: php_compiler_py-1.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.0

File hashes

Hashes for php_compiler_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5d0a02c7aaa5438037c4c1e631a5e62b3a19fb36f13db00c94459e4d761b4aaf
MD5 dcb51283f24f923e92c050c567116dfd
BLAKE2b-256 4f1767724306c557efbbcf01f42a17e0bd2d2c1ba2fef1037d62c7303f6cd33b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for php_compiler_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc93842398050e3beb94ef1c82acc21c75e0e7da793e53aea952c780e8b23fde
MD5 ed80e2caf353bad15cdbe872f67f7fe4
BLAKE2b-256 fd78a618005204df398baaf376b015b18fde28163b79800300e9c858ef0eae56

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page