JSPM

  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q43264F
  • License MIT

Cross platform isolated embedded python environment for npm

Package Exports

  • python-env

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (python-env) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

python-env

GitHub stars

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!

Liberapay receiving Liberapay patrons