Skip to main content

Documentation Status pypi version PyPI - Python Version GitHub License

pash


About

Since many of my recent Python projects have included an interactive shell / command prompt of some sorts, I've decided to write my own package for it, so that I won't have to think of a new way of handling commands everytime.

I hope it can be of some use to other Python programmers as well, as it'll hopefully make my life a lot easier.

Install

Installing pash is very easy thanks to pip:

python3 -m pip install pash-cmd

Usage

First, create a shell ...

from pash.shell import Shell
sh = Shell(prompt='$ ')

... and then, simply add as many commands as you want/need!

from pash.command import Command
sh.add_command(Command('ping', callback=pong))
...

You can even create cascading commands ...

from pash.command import CascCommand
sh.add_command(CascCommand('go', cmds=[
    Command('north', callback=gnorth),
    Command('south', callback=gsouth),
]))
...

Documentation

The full docs are hosted here. (Please excuse the messiness, it's my first time working with sphinx, readthedocs, etc. ^^)


... Matthias M. (April 2020)

Metadata

Release files for pash-cmd 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pash-cmd 0.0.7
File Size Uploaded
pash-cmd-0.0.7.tar.gz 8.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pash-cmd 0.0.7
File Interpreter ABI Platform
pash_cmd-0.0.7-py3.9.egg Legacy Egg format - - Details
pash_cmd-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 48.3 kB

Release files / pash-cmd-0.0.7.tar.gz

Download URL pash-cmd-0.0.7.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
688c9e7bd79eb5044c8ae0d0281f1acb1802dea7ed8fd6eff146590aaaa7642b
BLAKE2b-256 checksum
How to use checksums
051721f2abc244402965a0942c08a3254e0fb02f9f104beced7f6c37ca923fed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / pash_cmd-0.0.7-py3.9.egg

Download URL pash_cmd-0.0.7-py3.9.egg
Size 19.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
fb72244276074408aca99c563ecc22c489faf856cc2cbfb92b6c52fa320618c3
BLAKE2b-256 checksum
How to use checksums
d3c30969bfc0691fa2f3e94f5e508ca89d49b3016b4eca9f1e9141a0794c9527
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / pash_cmd-0.0.7-py3-none-any.whl

Download URL pash_cmd-0.0.7-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d93eb37a35c4270865ec149c871b60a8ce73d9a3661f6a644dce300153f72a10
BLAKE2b-256 checksum
How to use checksums
5042a224fa9b9ce615a42718e2a5d74de321e5244ee9edb5ec79a7a2947f8391
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.0.7 This release

3 release files

0.0.6

1 release file

0.0.5

1 release file

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page