Download the PHP package thunderbirddeveloper/snakecharmer without Composer

On this page you can find all versions of the php package thunderbirddeveloper/snakecharmer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package snakecharmer

Snake Charmer

Snake Charmer is a simple PHP class designed to execute Python scripts conveniently from within a PHP environment. It provides methods to run Python scripts, pass parameters to them, and retrieve the results.

Features

Installation

You can install Snake Charmer via Composer. Run the following command in your terminal:

Usage

Here's a basic example of how to use Snake Charmer:

Methods available in the SnakeCharmer class

setPath($path)

Method setting the path to the directory containing Python scripts.

setScripts($files, $clearResult = true)

Method setting the list of scripts to execute.

run($params = '', $last = false)

Method executing scripts with optional parameters.

getResultAsString($separator = "\n")

Method returning the execution results of scripts as a single string.

getResultAsArray()

Method returning the execution results of scripts as an array.

switchOutputToFile()

Method switching the mode of saving script execution results to writing to a file.

switchOutputToMemory()

Method switching the mode of saving script execution results to writing to memory.

getLastExitCode()

Method returning the exit code of the last executed script. 0 means success, non-zero indicates an error.

New Features

Example use cases

You can also add a section describing more complex use cases, such as executing multiple scripts with different parameters, error handling, etc.

Testing

  1. Running unit tests

SnakeCharmerTest.php contains unit tests for the SnakeCharmer class.

  1. Running simple test

SimpleTest.php is a script that demonstrates how to use the SnakeCharmer class rather than a traditional unit test file.

When running these commands, make sure your unit tests are correctly defined and have all necessary dependencies loaded, including PHPUnit for unit testing.

Requirements

Changing Snake Charmer Version

If you need to change the version of Snake Charmer, follow these steps:

  1. Edit composer.json file: Open the composer.json file in your project and update the version of Snake Charmer in the require section:

Update the version number (^1.0.0) according to Semantic Versioning rules (e.g., ^1.0.1 for MINOR update, ^1.1.0 for MAJOR update).

  1. Update the library: Then run Composer to update the library to the new version:

Reinstallation

If you need to reinstall Snake Charmer via Composer. Run the following command in your terminal:

License

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

Author

Damian Łukasik 08.02.2024


All versions of snakecharmer with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thunderbirddeveloper/snakecharmer contains the following files

Loading the files please wait ...