python-env

Cross platform isolated embedded python environment

MIT License

Stars
5

python-env

Cross platform isolated embedded python environment for npm

Please ★ this repo if you found it useful ★ ★ ★

Features

  • Isolated embedded python environment
  • Call into python from node
  • Works on MacOS, Linux and Microsoft Windows 32 and 64 bit

Installation

This package is not intended to be used as a global dependancy.

Python 3

npm install --save python-env

Python 2

npm install --save python-env@python2

Dependencies

Usage

script.js

import { python, pip } from 'python-env';

async function main() {
  await pip(['install', '-r', 'requirements.txt']);
  await python(['script.py']);
}

main();

package.json

{
  "scripts": {
    "pip:install": "python-pip install -r requirements.txt",
    "python:script": "python-env src/script.py",
    "python:shell": "python-env",
    "python:version": "python-env --version"
  }
}

Support

Submit an issue

Screenshots

Contribute a screenshot

Contributing

Review the guidelines for contributing

License

MIT License

Jam Risser © 2018

Changelog

Review the changelog

Credits

Support on Liberapay

A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.

Add some fuel if you'd like to keep me going!