Skip to main content

Extremely simple curses search result demo

Project description

Search Demo

Extremely simple python-curses search demo that runs a function on every character input and shows / returns the results.

Install using pip! pip install search-demo

How to use

This assumes that you have a function that outputs an iterable (list, tuple, etc.) and takes in a string.

from search_demo import SearchDemo

def function(inp):
    return inp.split()

s = SearchDemo(function)
print(s.run_demo())

Produces something like this

asciicast

Why

I made this for a part of my masters project that required demoing a full text search using RediSearch and thought that a small curses library would be the best way to show it off without too much complexity building a whole UI.

Note

Please do not use this in real code, I just thought it was useful enough to share with anyone else who needs a quick demo.

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

search_demo-0.1.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.

search_demo-0.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file search_demo-0.1.tar.gz.

File metadata

  • Download URL: search_demo-0.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for search_demo-0.1.tar.gz
Algorithm Hash digest
SHA256 9fd2acfbb6e295c537a19e0c0287da4fd4af134e1e70201c1c0bc691bf91caa3
MD5 048758cf050f66799846a6f824d4a778
BLAKE2b-256 4b6bb59678f10b53699ca08164dd3b639809b9c7dc777ed88d8808bbb73b40f0

See more details on using hashes here.

File details

Details for the file search_demo-0.1-py3-none-any.whl.

File metadata

  • Download URL: search_demo-0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for search_demo-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f30e73bee2c5b02dce79f130784e9decb117542c834da4d788dd9cfa37f4a4d1
MD5 939259f090284b379b8d3ced58805cf3
BLAKE2b-256 1f6d13a8561b09afde46d73063545e2f75650db21e5caa44d423263ed7cffa47

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