Skip to main content

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

Project description

pyhstr

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).

Installation

pip install pyhstr

Usage

The standard shell and bpython:

>>> from pyhstr import hh
>>> hh

IPython:

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"'

Screencast

screenshot

Development

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

virtualenvs.create = true
virtualenvs.in-project = true

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

git clone https://github.com/adder46/pyhstr
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:

tox

Licensing

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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file pyhstr-0.5.2.tar.gz.

File metadata

  • Download URL: pyhstr-0.5.2.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-60-generic

File hashes

Hashes for pyhstr-0.5.2.tar.gz
Algorithm Hash digest
SHA256 7293ae8d5712ed6c80ef5681d7d6672483bc32b9c2db92255886bef58113afd4
MD5 b7ebc8c5c58370ac6b9cf75920649d98
BLAKE2b-256 d59d36c4c73536452228b0c7c09972a2d9a3798af9dd31adf74c6a48f4adc885

See more details on using hashes here.

File details

Details for the file pyhstr-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: pyhstr-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-60-generic

File hashes

Hashes for pyhstr-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96cec294e003fc0dd7606b568f18153d1b9ab8044cbe811109ea547245b61e95
MD5 79b925babedc4ab5ab19a710637af02e
BLAKE2b-256 fe5fd9531e77801b320c462830b6476d2376e3807c52a624840439cf388680bd

See more details on using hashes here.

Supported by

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