/python_search_engine

copy simple search engine

Primary LanguagePython

python-searchengine

Simple search engine implementation in Python for illustrative purposes to go with this blog post. The corpus of pages contains in directory, file 'posts.csv'. Run web-service on localhost with Flask.

Requirements

Python 3.8,3.9

Usage

Run from the command line:

$ git clone https://github.com/lag-grunge/python_search_engine/
$ cd $_
$ virtualenv --python=(PATH to python bin e.g. /usr/bin/python3.9) venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python main.py

Commands

GET

http://localhost:5000/?query="<str>"

Example

alt text

move (next, prev)

alt text

DELETE

$ curl --request DELETE http://localhost:5000 -d 'delete=<int>'

Example

alt text

alt text