Package: trypackage
tryis an easy-to-use cli tool to try out python packages.FeaturesInstall specific package version from PyPIInstall package from GitHubInstall in virtualenv using specific version of pythonSpecify alternative python package import nameKeep try environment after interactive sessionLaunch interactive python console with already imported packageLaunch editor instead of interpreterLaunch arbitrary python shell instead of default python shellUsagetryrequeststryrequests--ipythontryrequests--shellptipythontryrequests-p3.5tryrequests-p/usr/bin/python3.4.1tryrequests==2.8.1trykennethreitz/requests--ipythontryclick-didyoumean:click_didyoumean# if python package name is different then pip package nametryrequests--editorUsage examplesNote: most of the following cli options can also be configured in theconfigurationfile!Try single python package:tryrequeststryflaskTry multiple python packages in one session:tryrequestsflaskTry specific version of a package:tryrequests==2.8.1# tries version 2.8.1 of requests instead of latestTry package from GitHub repository:try<user>/<repo># syntax exampletrykennethreitz/requests# installs master branch of Kenneth's requests package from GitHubTry package but import with different name than package name:try<package_name>:<import_name># syntax exampletryclick-didyoumean:click_didyoumean# install click-didyoumean but import click_didyoumeanTry package in already existing virtualenv:tryrequests--virtualenv~/.try/sandbox# use virtualenv at ~/.try/sandbox⇢ see virtualenv config value in env section inconfigurationfile.Try package with specific python version:tryrequests--python3.5# use python3.5 in virtualenvtryrequests-p2.7# use python2.7 in virtualenvtryrequests-p~/work/cpython/bin/python# use python binary from specific location⇢ see python config value in env section inconfigurationfile.Try package with specific shell/repl:tryrequests--shellpython# use python repl (default value)tryrequests--shellipython# use ipythontryrequests--shellptpython# use ptpythontryrequests--shellptipython# use ptipythontryrequests--shellbpython# use bpythontryrequests--ipython# use ipython - an alias for --shell ipython⇢ see shell config value in env section inconfigurationfile.Try package writing a little script instead of opening shell:tryrequests--editor# opens $EDITOR or editor instead of shell⇢ see always_use_editor config value in env section inconfigurationfile.Keep virtualenv files after try run:tryrequests--keep⇢ see keep config value in env section inconfigurationfile.Use a specific location for the virtualenv files:tryrequests--tmpdir~/.try⇢ see tmpdir config value in env section inconfigurationfile.Configurationtrycan be configured to your preferences - like always useipythonas a shell or always usepython3.5.
The configuration file is located in your users application configuration directory in a file calledconfig.ini.
This location is OS dependent and is specified here:http://click.pocoo.org/5/api/#click.get_app_dirThe followingconfig.inifile shows all available configuration options:[env]virtualenv=~/.try/sandboxpython=3.5shell=ipythonkeep=falsealways_use_editor=falsetmpdir=~/.tryInstallationUsepipto installtry:pip3 install trypackageHelptrycomes with an awesome CLI interface thanks toclick.Usage: try [OPTIONS] [PACKAGES]...

  Easily try out python packages.

Options:
  --virtualenv TEXT  Use already existing virtualenv.
  -p, --python TEXT  The python version to use.
  --ipython          Use ipython instead of python.
  --shell TEXT       Specify the python shell to use. (This will override
                     --ipython
  -k, --keep         Keep try environment files.
  -e, --editor       Try with editor instead of interpreter.
  --tmpdir TEXT      Specify location for temporary directory.
  --version          Show the version and exit.
  --help             Show this message and exit.trywas inspired byhttps://github.com/VictorBjelkholm/trymodule.