{ "info": { "author": "Grzegorz Krason", "author_email": "grzegorz@krason.me", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python", "Topic :: Software Development :: Debuggers", "Topic :: Utilities" ], "description": "PeepShow\n========\n\nProvides following utilities for debugging Python applications:\n\n* show - lightweight function that prints name and value of your variable(s) to the console.\n* peep - featured, interactive interface for data inspection.\n\n.. image:: https://user-images.githubusercontent.com/11185582/51219128-b3127780-192f-11e9-8618-ecfff642b87f.gif\n\nInstallation\n------------\n\nInstall ``peepshow`` package:\n\n.. code-block:: bash\n\n pip install peepshow\n\nPeepShow uses ``clear``, ``vim``, ``man`` commands which are available in most of Linux distributions. Users of other operating systems need to install them on their own.\n\nBuilt-Ins\n^^^^^^^^^\n\nIf you expect to use peepshow often, consider adding ``peep`` and ``show`` commands to Python's built-ins. Edit either ``{site-packages}/sitecustomize.py`` or ``{user-site-packages}/usercustomize.py`` and append the following:\n\n.. code-block:: python\n\n import peepshow\n import builtins\n builtins.peep = peepshow.peep\n builtins.show = peepshow.show\n builtins.peep_ = peepshow.peep_\n builtins.show_ = peepshow.show_\n\nAlternatively let the installer do it for you:\n\n.. code-block:: bash\n\n pip install peepshow --upgrade --force-reinstall --no-deps --install-option=\"--add-builtins\"\n\nNote that ``pip uninstall peepshow`` command will not undo this change. You need to do it manually.\n\nBreakpoint\n^^^^^^^^^^\n\nIt is also possible to invoke ``peep()`` as a result of calling built-in function ``breakpoint()``. To enable such behaviour use ``PYTHONBREAKPOINT`` system variable:\n\n.. code-block:: bash\n\n export PYTHONBREAKPOINT=peepshow.peep\n\nCompatibility\n-------------\n\n* This software is expected to work with Python 3.6, 3.7 and compatible.\n* It has never been tested under operating systems other than Linux.\n* It works fine when started in a plain Python script, in ipython or ptipython\n* In these environments like interactive python console, in pdb and ipdb, peep and show cannot infer names of the variables in the user context, so they need to be provided explicitely (e.g. use `peep_`` and ``show_``).\n\nUsage\n-----\n\nshow\n^^^^\n\nRunning this script:\n\n.. code-block:: python\n\n x = 123\n y = {'name': 'John', 'age': 123}\n z = \"Hello World!\"\n\n # show all the variables in the scope\n show()\n\n # or only variables of your choice\n show(x, y)\n\n # you can also rename them\n show(my_var=x)\n\n # use 'show_' to specify variable names as a string\n show_('x')\n\n # expressions and renaming are also allowed\n show_('x + 321', zet='z')\n\n\nwill result in following output:\n\n.. code-block::\n\n x = 123\n y = {'age': 123, 'name': 'John'}\n z = 'Hello World!'\n x = 123\n y = {'age': 123, 'name': 'John'}\n my_var = 123\n x = 123\n x + 321 = 444\n zet = 'Hello World!'\n\n\npeep\n^^^^\n\nTry to run the following script:\n\n.. code-block:: python\n\n x = 123\n y = {'name': 'John', 'age': 123}\n z = \"Hello World!\"\n\n # inspect dictionary that consists of all the variables in the scope\n peep()\n\n # or inspect variable of your choice directly\n peep(x)\n\n # use 'peep_' to specify variable name as a string\n peep_('x')\n\n\nWhen interactive interface pops up:\n\n* hit ENTER to see list of available variables\n* type ``10`` and hit ENTER to select ``y``\n* hit ENTER again to see items of your dictionary\n* type ``dir`` and hit ENTER to list attributes of ``y`` (excluding built-ins)\n* type ``continue`` and hit ENTER to proceed or type ``quit`` and hit ENTER to terminate your script\n\nNote that all the commands have their short aliases. E.g. ``quit`` and ``q`` is the same.\n\nFor more help:\n\n* type ``help`` and hit ENTER to see list of available commands\n* type ``man`` and hit ENTER to read the manual, hit ``q`` when you are done\n\n\nDevelopment\n-----------\n\nPreparing Environment\n^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n ./setup.sh\n source venv/bin/activate\n\n\nModifying Dependencies\n^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n # edit setup.py\n # edit requirements*.in\n pip-compile\n pip-sync\n # git add... commit... push...\n\nTesting\n^^^^^^^\n\n.. code-block:: bash\n\n pytest\n\nReleasing\n^^^^^^^^^\n\n.. code-block:: bash\n\n # update version in setup.py\n python setup.py sdist\n twine upload dist/peepshow-$VERSION.tar.gz\n git tag $VERSION\n git push --tags", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gergelyk/peepshow", "keywords": "debug,data,explore,programming", "license": "", "maintainer": "", "maintainer_email": "", "name": "peepshow", "package_url": "https://pypi.org/project/peepshow/", "platform": "", "project_url": "https://pypi.org/project/peepshow/", "project_urls": { "Homepage": "https://github.com/gergelyk/peepshow" }, "release_url": "https://pypi.org/project/peepshow/0.1.5/", "requires_dist": null, "requires_python": ">=3.6,<3.8", "summary": "Data Explorer", "version": "0.1.5" }, "last_serial": 5433009, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9b32cd276d5198837ef6760bd8254d2e", "sha256": "a9c3301e8de6253078518edf128ff305a9dcf3f273255e2dc29a901757dcb519" }, "downloads": -1, "filename": "peepshow-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9b32cd276d5198837ef6760bd8254d2e", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6, ~=3.7", "size": 23890, "upload_time": "2018-12-01T15:24:17", "url": "https://files.pythonhosted.org/packages/16/fb/f748573a70dc89dd0f283bbb3048286d0627d5326a553ccf35e0d8fef067/peepshow-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c59dc243f99a085df2a80e2634b0acdd", "sha256": "f2c223e2b8596ab9cfe2cfe96a3d6dd01c7517663bef1f4fd9b45c24c4235299" }, "downloads": -1, "filename": "peepshow-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c59dc243f99a085df2a80e2634b0acdd", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6, ~=3.7", "size": 24680, "upload_time": "2018-12-01T23:01:26", "url": "https://files.pythonhosted.org/packages/dd/46/e1ac6109661629774031838bf5443e150d55d2ae0809ff04d7ec19a28b23/peepshow-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "180f5d4e5cdff037555c2dc80d829e36", "sha256": "06455e15cb0e3126565432c8fd83ec91d4af03c119eb444d3e99ef2a21f3ae8b" }, "downloads": -1, "filename": "peepshow-0.1.2.tar.gz", "has_sig": false, "md5_digest": "180f5d4e5cdff037555c2dc80d829e36", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<=3.7", "size": 22498, "upload_time": "2018-12-02T22:14:34", "url": "https://files.pythonhosted.org/packages/aa/3a/2add9544ea1889ceb9d87f2a48b6670000a8e61e6c244d70998189814e1c/peepshow-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c2f74f3fafa6195b8284f23be514fe7b", "sha256": "8c30fcc4185d55ed4aef6b6c769993dd056a9b934965fa2435fa6c6cf3424b73" }, "downloads": -1, "filename": "peepshow-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c2f74f3fafa6195b8284f23be514fe7b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 24519, "upload_time": "2019-02-04T21:21:17", "url": "https://files.pythonhosted.org/packages/c0/6e/3cb0908ce25e6e22902fefd7dfb47d97f4083114192f88f61092b24172af/peepshow-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "d5e3a6cefd3ebc99753434bb89708ce6", "sha256": "565544866eb144b7e18e5f10b1016e61d4f3293b057679ca77e2fa786d970145" }, "downloads": -1, "filename": "peepshow-0.1.4.tar.gz", "has_sig": false, "md5_digest": "d5e3a6cefd3ebc99753434bb89708ce6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 22494, "upload_time": "2019-06-21T21:18:17", "url": "https://files.pythonhosted.org/packages/c7/07/cb5b2d956a68e842ea26bfdfc7c519c1720014c9e9819b8771b194651781/peepshow-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "0acd7c6d76ea361860f02acb84891272", "sha256": "31fbca686baa6bd1c42eb79d8ea58cb9e182a2b4e17cdd0d6ab1a0cb41f8e1d4" }, "downloads": -1, "filename": "peepshow-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0acd7c6d76ea361860f02acb84891272", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 22494, "upload_time": "2019-06-21T22:06:09", "url": "https://files.pythonhosted.org/packages/c6/8a/c4021b586db07950856d70490668547474af4caa1e07f1021bffde3a34ac/peepshow-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0acd7c6d76ea361860f02acb84891272", "sha256": "31fbca686baa6bd1c42eb79d8ea58cb9e182a2b4e17cdd0d6ab1a0cb41f8e1d4" }, "downloads": -1, "filename": "peepshow-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0acd7c6d76ea361860f02acb84891272", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 22494, "upload_time": "2019-06-21T22:06:09", "url": "https://files.pythonhosted.org/packages/c6/8a/c4021b586db07950856d70490668547474af4caa1e07f1021bffde3a34ac/peepshow-0.1.5.tar.gz" } ] }