#shell #python #virtual #cross-platform #environment #venv #manage

xshell-venv

xshell-venv manages your Python virtual environments in code

7 releases (4 stable)

1.3.0 May 13, 2024
1.2.0 Feb 22, 2024
1.1.0 Jul 13, 2022
1.0.0 Jun 19, 2022
0.1.0 Apr 26, 2022

#648 in Development tools

Download history 1479/week @ 2024-09-22 787/week @ 2024-09-29 1082/week @ 2024-10-06 389/week @ 2024-10-13 1791/week @ 2024-10-20 1190/week @ 2024-10-27 1302/week @ 2024-11-03 1021/week @ 2024-11-10 1281/week @ 2024-11-17 420/week @ 2024-11-24 35/week @ 2024-12-01 32/week @ 2024-12-08 20/week @ 2024-12-15 61/week @ 2024-12-22 198/week @ 2024-12-29 285/week @ 2025-01-05

566 downloads per month

MIT license

16KB
188 lines

xshell-venv

crates.io docs.rs docs License: MIT Build Status

xshell-venv manages your Python virtual environments in code.

xshell-venv is an extension to xshell, the swiss-army knife for writing cross-platform “bash” scripts in Rust.

Example

use xshell_venv::{Shell, VirtualEnv};

let sh = Shell::new()?;
let venv = VirtualEnv::new(&sh, "py3")?;

venv.run("print('Hello World!')")?; // "Hello World!"

Requirements

  • Python 3
    • On Windows we look for python3.exe or python.exe
    • Otherwise we look for python3 or python
  • The venv package
    • This might be available as python3-venv or under a similar name. Double check your packages. E.g. on Ubuntu Python 3.8 is available as python3.8 and the corresponding venv package is named python3.8-venv.

License

MIT.

Dependencies

~1.6–9.5MB
~116K SLoC