Python (Pipenv)

Virtualenv management tool: Pipenv

Framework
Python (Pipenv)
Category
Languages
Publisher
Jetify
{
    "packages": [
        "pipenv@latest",
        "python@3.10"
    ],
    "shell": {
        "init_hook": [
            "pipenv install --dev"
        ],
        "scripts": {
            "run_test": "pipenv run python main.py"
        }
    }
}

Python

Python by default will attempt to install your packages globally, or in the Nix Store (which it does not have permissions to modify). To use Python with Devbox, we recommend setting up a Virtual Environment using pipenv or Poetry (see below).

Example Repo

Adding Python to your Project

devbox add python@3.10, or in your devbox.json add:

  "packages": [
    "python@3.10"
  ],

This will install Python 3.10 in your shell. You can find other versions of Python by running devbox search python. You can also view the available versions on Nixhub

Pipenv

Example Repo

Open In Devbox.sh

pipenv is a tool that will automatically set up a virtual environment for installing your PyPi packages.

You can install pipenv by adding it to the packages in your devbox.json. You can then manage your packages and virtual environment via a Pipfile

{
    "packages": [
        "python310",
        "pipenv"
    ],
    "shell": {
        "init_hook": "pipenv shell"
    }
}

This init_hook will automatically start your virtualenv when you run devbox shell.

README.md

Level up your dev environment

Checkout the Devbox and Launchpad open-source codebases on Github. Feature requests are always welcome.
Try Devbox Cloud
YOUR INPUT COUNTS

Join the community

Discuss ideas, uses and builds with the Jetpack team and others.