Define requirements inside your python code and scriptenv makes them ready to import.

Overview

scriptenv

Build Status Coverage PyPI Downloads License

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('requests==2.25.1')

import requests
assert requests.__version__ == "2.25.1"
requests.get('http://www.google.com')

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
```bash
$ pytest
```

Trigger a new release build
```bash
$ python release.py release-candidate
```
You might also like...
This tool is used to install `pyenv` and friends.

pyenv installer This tool installs pyenv and friends. It is inspired by rbenv-installer. Prerequisites In general, compiling your own Python interpret

to-requirements.txt allows to automatically add and delete modules to requirements.txt installing them using pip.
to-requirements.txt allows to automatically add and delete modules to requirements.txt installing them using pip.

to-requirements.txt | Automatically update requirements.txt to-requirements.txt allows to automatically add and delete modules to requirements.txt ins

One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.

AwesomeVersion One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind

Create pinned requirements.txt inside a Docker image using pip-tools
Create pinned requirements.txt inside a Docker image using pip-tools

Pin your Python dependencies! pin-requirements.py is a script that lets you pin your Python dependencies inside a Docker container. Pinning your depen

An assistant to guess your pip dependencies from your code, without using a requirements file.

Pip Sala Bim is an assistant to guess your pip dependencies from your code, without using a requirements file. Pip Sala Bim will tell you which packag

This script fully automates of downloading tiktok videos, editing them,compiling them and finally uploading them to youtube.

This script fully automates of downloading tiktok videos, editing them,compiling them and finally uploading them to youtube. If you wanted to create a tiktok video compiilation youtubbe channel this script is here to help you :D

BatchFlow helps you conveniently work with random or sequential batches of your data and define data processing and machine learning workflows even for datasets that do not fit into memory.

BatchFlow BatchFlow helps you conveniently work with random or sequential batches of your data and define data processing and machine learning workflo

Define your JSON schema as Python dataclasses

Define your JSON schema as Python dataclasses

❄️ Don't waste your money paying for new tokens, once you have used your tokens, clean them up and resell them!
❄️ Don't waste your money paying for new tokens, once you have used your tokens, clean them up and resell them!

TokenCleaner Don't waste your money paying for new tokens, once you have used your tokens, clean them up and resell them! If you have a very large qua

Hide secret texts inside an image, optionally encrypt them with a password using AES-256.
Hide secret texts inside an image, optionally encrypt them with a password using AES-256.

Hide secret texts/messages inside an image. You can optionally encrypt your texts with a password using AES-256 before encoding into the image.

Search for files under the specified directory. Extract the file name and file path and import them as data.

Search for files under the specified directory. Extract the file name and file path and import them as data. Based on that, search for the file, select it and open it.

Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.

============================================================================================================ `MILA will stop developing Theano https:

Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.

============================================================================================================ `MILA will stop developing Theano https:

Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.

============================================================================================================ `MILA will stop developing Theano https:

Annotate your Python requirements.txt file with summaries of each package.

Summarize Requirements 🐍 📜 Annotate your Python requirements.txt file with a short summary of each package. This tool: takes a Python requirements.t

Get inside your stronghold and make all your Django views default login_required

Stronghold Get inside your stronghold and make all your Django views default login_required Stronghold is a very small and easy to use django app that

Get inside your stronghold and make all your Django views default login_required

Stronghold Get inside your stronghold and make all your Django views default login_required Stronghold is a very small and easy to use django app that

Always fill your package requirements without the user having to do anything! Simple and easy!

WSL Should now work always-fill-reqs-python3 Always fill your package requirements without the user having to do anything! Simple and easy! Supported

Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process.

docker-image-size-limit Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process. Read the announcing post. I

Releases(v0.3.0)
  • v0.3.0(Dec 5, 2021)

    • Features
      • disabling scriptenv is supported
      • use scriptenv.requires as contextmanger
      • config value to disable lockfiles
      • Pipfile.lock support
    • Bugfixes
      • makes scriptenv reenterable by avoiding duplicates in paths
      • cleanup sys.modules when disabling scriptenv
      • fixed cli run issue with flags in command
      • fixes issue calling cli without args
    • Internal
      • refactored scriptenv into builder and env
      • removes global state from integration tests
      • added default_factory for config description
      • fixes pylint use-list/dict-literal issues
    Source code(tar.gz)
    Source code(zip)
    scriptenv-0.3.0-py3-none-any.whl(8.41 KB)
  • master(Dec 5, 2021)

    • Features
      • disabling scriptenv is supported
      • use scriptenv.requires as contextmanger
      • config value to disable lockfiles
      • Pipfile.lock support
    • Bugfixes
      • makes scriptenv reenterable by avoiding duplicates in paths
      • cleanup sys.modules when disabling scriptenv
      • fixed cli run issue with flags in command
      • fixes issue calling cli without args
    • Internal
      • refactored scriptenv into builder and env
      • removes global state from integration tests
      • added default_factory for config description
      • fixes pylint use-list/dict-literal issues
    Source code(tar.gz)
    Source code(zip)
    scriptenv-0.3.0+fd130c4-py3-none-any.whl(8.52 KB)
  • v0.2.0(Aug 9, 2021)

    • Features
      • reuse cache across updates
      • forward scriptenv to subprocesses
      • forward entry points to subprocesses
      • added cli to run entry points of packages
      • added basic config module
    • Bugfixes
      • fixes issue with packages containing invalid python files
    • Internal
      • updated readme with development and usage info
      • using local version with git hash for latest releases
      • added coverage and downloads badges to readme
      • fixed spelling in readme
      • remove author name from cache path
      • refactor module structure
      • added own module for pip interactions
      • mccabe code complexity dropped to 4
      • added own module for scriptenv
      • resturctured integration tests
      • updated roadmap
      • default to user cache directory
      • simplified ScriptEnv API
      • updated readme
    Source code(tar.gz)
    Source code(zip)
    scriptenv-0.2.0-py3-none-any.whl(6.70 KB)
  • v0.1.0(Jul 15, 2021)

    • Features
      • basic installation of requirements
      • suppress pip stdout
      • support multiple requirements
      • support package version numbers
      • cache packages
      • uses appdirs for user cache directory
      • caches resolved dependencies
      • supports wheels
    • Bugfixes
      • fixes installation issues
      • fixes windows path issues
    • Internal
      • use single pip install command
      • encapsulates pip invocations
      • package metadata updated
      • added roadmap
    Source code(tar.gz)
    Source code(zip)
    scriptenv-0.1.0-py3-none-any.whl(3.75 KB)
Simple Python version management

Simple Python Version Management: pyenv pyenv lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UN

pyenv 30.1k Jan 04, 2023
The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM

GNS3-server This is the GNS3 server repository. The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM. Clients like the GNS3 GUI

GNS3 644 Dec 30, 2022
Run a command in the named virtualenv.

Vex Run a command in the named virtualenv. vex is an alternative to virtualenv's source wherever/bin/activate and deactivate, and virtualenvwrapper's

Sasha Hart 374 Dec 21, 2022
Define requirements inside your python code and scriptenv makes them ready to import.

scriptenv Define requirements inside your python code and scriptenv makes them ready to import. Getting Started Install scriptenv $ pip install script

Stefan Hoelzl 6 Nov 04, 2022
Virtual Python Environment builder

virtualenv A tool for creating isolated virtual python environments. Installation Documentation Changelog Issues PyPI Github Code of Conduct Everyone

Python Packaging Authority 4.3k Dec 30, 2022
A PipEnv Environment Switcher

Pipes Pipenv Environment Switcher ⚡ Overview Pipes is a Pipenv companion CLI tool that provides a quick way to jump between your pipenv powered projec

Gui Talarico 131 Sep 04, 2022
Ready-to-run Docker images containing Jupyter applications

Jupyter Docker Stacks are a set of ready-to-run Docker images containing Jupyter applications and interactive computing tools.

Project Jupyter 7k Jan 03, 2023
Manage python virtual environments on the working notebook server

notebook-environments Manage python virtual environments on the working notebook server. Installation It is recommended to use this package together w

Vladislav Punko 44 Nov 02, 2022
to-requirements.txt allows to automatically add and delete modules to requirements.txt installing them using pip.

to-requirements.txt | Automatically update requirements.txt to-requirements.txt allows to automatically add and delete modules to requirements.txt ins

Ilya 16 Dec 29, 2022
macOS development environment setup: Setting up a new developer machine can be an ad-hoc, manual, and time-consuming process.

dev-setup Motivation Setting up a new developer machine can be an ad-hoc, manual, and time-consuming process. dev-setup aims to simplify the process w

Donne Martin 5.9k Jan 02, 2023
A pythonic interface to high-throughput virtual screening software

pyscreener A pythonic interface to high-throughput virtual screening software Overview This repository contains the source of pyscreener, both a libra

56 Dec 15, 2022
This tool is used to install `pyenv` and friends.

pyenv installer This tool installs pyenv and friends. It is inspired by rbenv-installer. Prerequisites In general, compiling your own Python interpret

pyenv 3.5k Jan 03, 2023
A fast and easy python virtual environment creator for linux with some pre-installed libraries.

python-venv-creator A fast and easy python virtual environment created for linux with some optional pre-installed libraries. Dependencies: The followi

2 Apr 19, 2022
Fish shell tool for managing Python virtual environments

VirtualFish VirtualFish is a Python virtual environment manager for the Fish shell. You can get started by reading the documentation. (It’s quite shor

Justin Mayer 968 Dec 24, 2022
PyDynamica is a freely available agent-based economy simulation

PyDynamica PyDynamica is a pure python implementation of Sociodynamica, a virtual environment to simulate a simple economy with minimal dependencies.

4 Sep 10, 2022
A simple but powerful Python packer to run any project with any virtualenv dependencies anywhwere.

PyEmpaq A simple but powerful Python packer to run any project with any virtualenv dependencies anywhwere. With PyEmpaq you can convert any Python pro

Facundo Batista 23 Sep 22, 2022
Python Development Workflow for Humans.

Pipenv: Python Development Workflow for Humans [ ~ Dependency Scanning by PyUp.io ~ ] Pipenv is a tool that aims to bring the best of all packaging wo

Python Packaging Authority 23.5k Jan 01, 2023
An experimental technique for efficiently exploring neural architectures.

SMASH: One-Shot Model Architecture Search through HyperNetworks An experimental technique for efficiently exploring neural architectures. This reposit

Andy Brock 478 Aug 04, 2022
a pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)

pyenv-virtualenv pyenv-virtualenv is a pyenv plugin that provides features to manage virtualenvs and conda environments for Python on UNIX-like system

pyenv 5.3k Jan 08, 2023
Python virtualenvs in Debian packages

dh-virtualenv Contents Overview Presentations, Blogs & Other Resources Using dh-virtualenv How does it work? Running tests Building the package in a D

Spotify 1.5k Jan 02, 2023