Skip to main content

History suggest box for the standard Python shell, IPython, and bpython

Project description


build status codecov PyPI version Python Versions GitHub

Inspired by hstr, pyhstr is a history suggest box that lets you quickly search, navigate, and manage your Python shell history. At this point, it supports the standard Python shell, IPython, and bpython. The plan is to support ptpython as well, but some help is needed for that to happen (see issue #7).


pip install pyhstr


The standard shell and bpython:

>>> from pyhstr import hh
>>> hh


In [1]: import pyhstr
In [2]: %hh

Making an alias should be more convenient though, for example:

alias py='python3 -ic "from pyhstr import hh"'




You will need poetry, preferably with these options in config:

virtualenvs.create = true = true

Then clone the repo, cd into it, make a venv, activate it, and install the project:

git clone
cd pyhstr
poetry env use python3
. .venv/bin/activate
poetry install

To run tests, mypy checks, and style checks, you need to have Pythons:

  • 3.7
  • 3.8
  • 3.9

For installing all the Python versions, I recommend pyenv.

Once you have them, run:



Licensed under the MIT License. For details, see LICENSE.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhstr-0.5.2.tar.gz (14.7 kB view hashes)

Uploaded Source

Built Distribution

pyhstr-0.5.2-py3-none-any.whl (17.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page