Skip to main content

Run commands using Python virtual environment

Project description

hook-run

Python bootstrap to activate a virtual environment (venv, or conda) and run a command. Intended to be used with pre-commit pypi package. Inspired by venv-run

Runs a command from an existing python virtual environment. Script looks for a private configuration file in the current working directory hook-run.json. If such file is found, it's expected to follow format:

{
    "path": "/home/user/my_project/venv/bin"
}

Where path points to the virtual environment to be used. If configuration file is not found, then no bootstrapping is performed, but script proceeds with command execution

After bootstrapping is done, then specified command is executed.

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

hook-run-1.1.0.tar.gz (2.1 kB view hashes)

Uploaded Source

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