Skip to main content

A command line interface implmenting the trie data structure

Project description

trie_project CLI

SLINGSHOT take home project submission

Demo Video

maybe?

About The Project

Using the Trie data structure to create a usable command line interface with various commands such as add, remove, and search by prefix. I used figlet for a nice looking interface, I used flask and requests to implement the cli with the global state. Lastly I used PythonAnywhere to host the whole thing.

A list of commands are as follows:

help:                        shows all commands available through the cli
add_[words]:                 adds words or a word to the trie
remove_[words]:              deletes words or a word from the trie
search_[words]:              searches for the words or word in the trie and returns words found and not found
visualize:                   displays all items currently in the trie
searchbyprefix_[prefix]:     returns all items in the trie starting with the given prefix

Here are some resources I used to build this project:

Built With

Getting Started

  • Clone git repository
  • Make sure correct packages are installed(Prerequisites)
  • Run server.py using python server.py inside triecli

Example run:

If you would like to run elsewhere change the link at line 49 in server.py and make sure you have the files: trie1.py, app.py, server.py

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • flask pip install flask
  • pyfiglet pip install pyfiglet
  • requests pip install requests
  • Make sure you have python 3

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Nalin Nagar - nalinnagar1@gmail.com

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

TrieCLI-0.0.2.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

TrieCLI-0.0.2-py3-none-any.whl (7.2 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