viv/search/search_index.json

1 line
5.6 KiB
JSON
Raw Normal View History

{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"viv","text":"<p> viv isn't venv </p> <p> Documentation </p> <p>Try before you buy!</p> <pre><code>python3 &lt;(curl -fsSL viv.dayl.in/viv.py) run pycowsay -- \"viv isn't venv\\!\"\n</code></pre> <p><code>Viv</code> is a standalone dependency-free <code>venv</code> creator.</p> <p>These <code>venvs</code> can be identified by name or by their specification. In any case they will be re-used across scripts (and generated on-demand, if needed).</p> <p>Importantly, <code>viv</code> will also remove your user site directory. (view with: <code>python -m 'import site;print(site.USER_SITE)'</code>).</p> <p><code>Viv</code>'s uncompromising insistence on portability means that it will always (1) only use the standard library (2) never exceed a single script.</p> <p>For that reason any usage of the <code>CLI</code> can be accomplished using a remote copy as seen in the below install command.</p>"},{"location":"#setup","title":"Setup","text":"<p>Run the below command to install <code>viv</code>.</p> <pre><code>python3 &lt;(curl -fsSL viv.dayl.in/viv.py) manage install\n</code></pre> <p>To access <code>viv</code> from within scripts you should add it's location to your <code>PYTHONPATH</code>. By default <code>viv</code> will be installed to <code>$XDG_DATA_HOME/viv</code> or <code>~/.local/share/viv</code> you can customize this with <code>--src</code>.</p> <pre><code>export PYTHONPATH=\"$PYTHONPATH:$HOME/.local/share/viv\"\n</code></pre> <p>Advanced users may recognize that principally, the module just needs to be recognized at run time and the single script <code>viv.py</code> can be invoked directly for the CLI. How you accomplish these options is ultimately up to you but the above instructions can get you started.</p>"},{"location":"#pypi-not-recommended","title":"Pypi (Not Recommended)","text":"<pre><code>pip install viv\n</code></pre> <p>Why is this not recommended? Mainly, because <code>viv</code> is all about hacking your <code>sys.path</code>. Placing it in it's own virtual environment or installing in a user site directory may complicate this endeavor.</p>"},{"location":"#usage","title":"Usage","text":"<p>In any python script with external dependencies you can add this line, to automate <code>vivenv</code> creation and installation of dependencies.</p> <pre><code>__import__(\"viv\").use(\"click\")\n</code></pre> <p>To remove all <code>vivenvs</code> you can use the below command:</p> <pre><code>viv remove $(viv list -q)\n</code></pre> <p>To remove <code>viv</code> all together you can use the included <code>purge</code> command:</p> <pre><code>python3 &lt;(curl -fsSL viv.dayl.in/viv.py) manage purge\n</code></pre>"},{"location":"#additional-features","title":"Additional Features","text":"<p>An experimental feature of <code>viv</code> is generating shim's that leverage the principles of <code>viv</code>. These shims would operate similar to <code>pipx</code> in which you can specify a command line app to \"install\".</p> <p>Note that <code>--standalone</code> will auto-generate a code-golfed minified version of <code>viv</code> to accomplish the same basic task as using a local copy of <code>viv</code>. After generating this a standalone <code>shim</code> you can freely use this script across unix machines which have <code>python&gt;3.8</code>. See examples/black for output of below command.</p> <pre><code>python3 &lt;(curl -fsSL viv.dayl.in/viv.py) shim black -o ./black --standalone --freeze\n</code></pre>"},{"location":"#alternatives","title":"Alternatives","text":""},{"location":"#pip-run","title":"pip-run","text":"<pre><code>pip-run (10.0.5)\n\u251c\u2500\u2500 autocommand (2.2.2)\n\u251c\u2500\u2500 jaraco-context (4.3.0)\n\u251c\u2500\u2500 jaraco-functools (3.6.0)\n\u2502 \u2514\u2500\u2500 more-itertools (9.1.0)\n\u251c\u2500\u2500 jaraco-text (3.11.1)\n\u2502 \u251c\u2500\u2500 autocommand (2.2.2)\n\u2502 \u251c\u2500\u2500 inflect (6.0.2)\n\u2502 \u2502 \u2514\u2500\u2500 pydantic&gt;=1.9.