{"id":22042167,"url":"https://github.com/stefanhoelzl/scriptenv","last_synced_at":"2025-05-08T01:20:47.901Z","repository":{"id":57464856,"uuid":"375628588","full_name":"stefanhoelzl/scriptenv","owner":"stefanhoelzl","description":"lightweight virtual env for python scripts","archived":false,"fork":false,"pushed_at":"2021-12-22T16:41:56.000Z","size":554,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T09:46:11.937Z","etag":null,"topics":["python","virtualenv"],"latest_commit_sha":null,"homepage":"https://stefanhoelzl.github.io/scriptenv/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanhoelzl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-10T08:37:49.000Z","updated_at":"2022-11-04T19:48:57.000Z","dependencies_parsed_at":"2022-08-31T03:11:48.184Z","dependency_job_id":null,"html_url":"https://github.com/stefanhoelzl/scriptenv","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanhoelzl%2Fscriptenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanhoelzl%2Fscriptenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanhoelzl%2Fscriptenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanhoelzl%2Fscriptenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanhoelzl","download_url":"https://codeload.github.com/stefanhoelzl/scriptenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252979376,"owners_count":21835041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","virtualenv"],"created_at":"2024-11-30T12:11:21.956Z","updated_at":"2025-05-08T01:20:47.870Z","avatar_url":"https://github.com/stefanhoelzl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scriptenv\n[![Build Status](https://github.com/stefanhoelzl/scriptenv/workflows/push/badge.svg)](https://github.com/stefanhoelzl/scriptenv/actions)\n[![Coverage](https://img.shields.io/badge/coverage-100%25-success?style=flat)](https://stefanhoelzl.github.io/scriptenv/coverage)\n[![PyPI](https://img.shields.io/pypi/v/scriptenv.svg)](https://pypi.org/project/scriptenv/)\n[![Downloads](https://img.shields.io/pypi/dm/scriptenv?color=blue\u0026logo=pypi\u0026logoColor=yellow)](https://pypistats.org/packages/scriptenv)\n[![License](https://img.shields.io/pypi/l/scriptenv.svg)](LICENSE)\n\nDefine requirements inside your python code and `scriptenv` makes them ready to import.\n\n## Getting Started\nInstall `scriptenv`\n```bash\n$ pip install scriptenv\n```\n\nuse any package you want in your REPL or short-lived scripts\n```python\nimport scriptenv\nscriptenv.requires('rsa==4.8')\n\nimport rsa\nassert rsa.__version__ == \"4.8\"\nrsa.newkeys(32)\n```\n\nuse a binary/entry point defined in any package\n```bash\n$ scriptenv run -r black==21.5b2 -- black --version\nblack, version 21.5b2\n```\n\n## Why Another Venv/Package Manager Project\nThe goal of this project is to provide a way to define your dependencies in your script you want to run\nand requires no extra setup steps for a virtual env.\n\nThe scope is for small scripts you want to share or you only want to run from time to time.\nFor sharing scripts it is also not necessary anymore to also share a `requirements.txt` file.\nIt works also within your REPL.\n\n## How It Works\n`scriptenv` installs every dependency it ever sees in a seperate folder \nand prepends the folders for the defined dependencies in a script to `sys.path`.\n\n## Development\n### Getting Started\nOpen in [gitpod.io](https://gitpod.io#github.com/stefanhoelzl/scriptenv)\n\nGet the code\n```bash\n$ git clone https://github.com/stefanhoelzl/scriptenv.git\n$ cd scriptenv\n```\n\nOptionally create a [venv](https://docs.python.org/3.8/library/venv.html)\n```bash\n$ python -m venv venv\n$ source venv/bin/activate\n```\n\nInstall required python packages\n```bash\n$ pip install -r requirements.txt\n```\n\nInstall scriptenv from repository\n```bash\n$ pip install -e .\n```\n\nRun tests and file checks\n```bash\n$ pytest\n```\n\nTrigger a new release build\n```bash\n$ python tools/release.py release-candidate\n```\n\nUpdate all requirements\n```\n$ python tools/requirements.py update\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanhoelzl%2Fscriptenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanhoelzl%2Fscriptenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanhoelzl%2Fscriptenv/lists"}