Skip to main content

An interactive shell application maker

Project description

sh3ll

sh3ll is a small python package aimed at allowing developers to create simple, yet powerful interactive shell applications.

Installation

You can install sh3ll from PyPi:

pip install sh3ll

Note: only python version 3.0+ is supported.

How to use sh3ll

sh3ll provides a powerful interface that has many customization options To use sh3ll, simply use:

from sh3ll import IS

From there, create an IS object that will house your commands:

app = IS(*insert prefix here*)

After this, you need to create some commands:

@app.command(name="", callName="", aliases=["", ""], help="", category="")
def test(ctx):
    print(ctx.parameters)

Note: for further information, go to the command categories section

Now that you have commands, you now have to run the app:

app.run()

Features!

sh3ll features a slew of features:

  • Decorator syntax
  • Easy to read code
  • Simple interface
  • Automatic help command generation
  • Command categories

Command Categories

To use a command inside of a category, all that needs to be done is specify the category name within the command decorator:

@app.command(name="", callName="", aliases=["", ""], help="", category="")

and sh3ll will do the rest of the work for you! Now, when trying to call your command you must use the category before you can call the command. This allows for more accurate command names.

Below is an example of a command that has been categorized under the "get" category:

@app.command(name="test", callName="test", aliases=["test", "tst"], help="test command", category="get")
def test(ctx):
    print(ctx.parameters)

This generates the following in the automatically generated help menu:

dp>help
help	Displays this menu

"get" Commands:
---------------
	Command     Aliases            Help            
	-------     --------           ----
	get test    ['test', 'tst']    test command

To run this command, simply type in the prompt:

dp>get test 1
['1']

This runs the command, passing the given parameters to the previosly defined function.

Application prefixes

To configure the application prefix, simply add the parameter to the creation of the IS object:

app = IS("prefix>")

This will be printed after each command to prompt the user for another response.

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

sh3ll-1.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

sh3ll-1.1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file sh3ll-1.1.1.tar.gz.

File metadata

  • Download URL: sh3ll-1.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for sh3ll-1.1.1.tar.gz
Algorithm Hash digest
SHA256 23f67c089ad950f3b74f8d9e2f899e74a208270b75df13c823e38bf4767d8632
MD5 d09845752852f3d0ddc6c8e3967d24d5
BLAKE2b-256 0214e2ebbb5e4cdd72847ba40208c63e6c129b79d7b1e163cd9ae1bb62c3490f

See more details on using hashes here.

File details

Details for the file sh3ll-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: sh3ll-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for sh3ll-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9a922133537b6a96001270c0f6b35c6c0a77107b2fca374b5fd984150f16b5f
MD5 e5febbef8ddfd88dfb8ec0a80f48f93f
BLAKE2b-256 74ffd5c2f093185f65958fdb36a1cce4551aa7f3a9a6ad5f6704e6ea299d7f05

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