{"id":21111651,"url":"https://github.com/jonathf/enw","last_synced_at":"2025-07-08T17:31:49.203Z","repository":{"id":57426669,"uuid":"67071092","full_name":"jonathf/enw","owner":"jonathf","description":"simple wrapper for virtualenv and autoenv","archived":false,"fork":false,"pushed_at":"2019-11-11T12:54:40.000Z","size":26,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-17T07:51:46.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathf.png","metadata":{"files":{"readme":"README.rst","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":"2016-08-31T20:26:28.000Z","updated_at":"2022-03-22T11:34:03.000Z","dependencies_parsed_at":"2022-09-19T06:41:19.714Z","dependency_job_id":null,"html_url":"https://github.com/jonathf/enw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathf%2Fenw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathf%2Fenw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathf%2Fenw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathf%2Fenw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathf","download_url":"https://codeload.github.com/jonathf/enw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225449375,"owners_count":17476098,"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":[],"created_at":"2024-11-20T01:10:06.191Z","updated_at":"2024-11-20T01:10:06.639Z","avatar_url":"https://github.com/jonathf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"``enw`` - Environment Wrapper\n=============================\n\n``enw`` is a wrapper tool for quick creation and switching between different\npython virtual environments. In particular it allows for:\n\n* Quick creation of new environments using ``virtualenv``.\n* Automatic linking of said environment ``autoenv``, but without destroying local autoenv directives.\n* Quick switching between python installation.\n* Auto pip installation of programs that you know you want in all new environments (like e.g. ``ipython``).\n* Quick reinstallations.\n\nObviously, all of this can be done by hand, but the idea is to simplify the\nprocess that you keep doing many times, and do so in a way that is tractable.\n\nNote that the core functionality of ``enw`` adds and replaces what python to\nsource in ``.env`` files. It does so carefully so that other content that you\nmay have added to the file is not affect.\n\nInstallation\n------------\n\nTo install, run the following outside of any virtual environment::\n\n    pip instal enw\n\nThis will install the dependencies ``virtualenv`` and ``autoenv``. The latter\nhas to be activated (as normal) by running something like::\n\n    echo \"source `which activate.sh`\" \u003e\u003e ~/.bashrc\n\nor if on a mac::\n\n    echo \"source `which activate.sh`\" \u003e\u003e ~/.bash_profile\n\n``enw`` will install environments, but by default will not activate them. If\nyou want it to also handle activation, you need to add a trigger for\n``autoenv`` like so::\n\n    echo \"function enw(){ envwrap \"$@\";autoenv_init; }\" \u003e\u003e ~/.bash_aliases\n\n(Make sure that ``.bashrc``/``.bash_profile`` sources the content of\n``.bash_aliases`` for this to work.)\n\nUsage\n-----\n\nFor basic usage, run the basic wrapper::\n\n    enw\n\nIt will create a virtual environment (which default to ``python3``) under the\nfolder name ``.py3``. A line sourcing of the file ``.py3/bin/activate`` will be\nplaced in a file ``.env``. This will activate the environment everytime you\nenter the folder or one of its subfolders.\n\nIf you want to use another python version, this is possible by\nadding a positional version number. For example::\n\n    enw 2.7\n\nIt will then repeat the whole process, but with the folder ``.py27``. To switch\nback to Python 3 setup, just run::\n\n    enw 3\n\nIf you *do* want to reinstall an environment, this is also possible::\n\n    enw -f 2.7\n\nIn addition, if if is possible to use ``enw`` to install a suite of standard\npackages. By including a ``-i`` flag, ``enw`` will look for the file\n``.enw`` recursivly in the current directory and bellow it (much like\n``autoenv``) and install its content using ``pip install -r``, using the newly\ninstalled virtual environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathf%2Fenw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathf%2Fenw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathf%2Fenw/lists"}