scriptenv
Define requirements inside your python code and scriptenv makes them ready to import.
Getting Started
Install scriptenv
$ pip install scriptenv
use any package you want in your REPL or short-lived scripts
import scriptenv
scriptenv.requires('rsa==4.8')
import rsa
assert rsa.__version__ == "4.8"
rsa.newkeys(32)
use a binary/entry point defined in any package
$ scriptenv run -r black==21.5b2 -- black --version
black, version 21.5b2
Why Another Venv/Package Manager Project
The goal of this project is to provide a way to define your dependencies in your script you want to run and requires no extra setup steps for a virtual env.
The scope is for small scripts you want to share or you only want to run from time to time.
For sharing scripts it is also not necessary anymore to also share a requirements.txt file.
It works also within your REPL.
How It Works
scriptenv installs every dependency it ever sees in a seperate folder
and prepends the folders for the defined dependencies in a script to sys.path.
Development
Getting Started
Open in gitpod.io
Get the code
$ git clone https://github.com/stefanhoelzl/scriptenv.git
$ cd scriptenv
Optionally create a venv
$ python -m venv venv
$ source venv/bin/activate
Install required python packages
$ pip install -r requirements.txt
Install scriptenv from repository
$ pip install -e .
Run tests and file checks
$ pytest
Trigger a new release build
$ python tools/release.py release-candidate
Update all requirements
$ python tools/requirements.py update
Release files for scriptenv 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scriptenv-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / scriptenv-0.3.0-py3-none-any.whl
| Download URL | scriptenv-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e8a873d82b965a9c5e80ccefc87de946591fa7319854270f57e2fcc4de77eb3
|
|
BLAKE2b-256 checksum How to use checksums |
63985f5e26d32fd9c07d4b25a740160faaea4d374bc163ef55a2b358146399b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|