A CLI for managing python projects
Project description
PyMan is a small library that allows you to build your own CLI to manage your projects. This way you do not have to remember commands to run, you simply navigate your CLI to run those commands.
Installing
PyMan is available from the PyPi repository.
This means that all you have to do to install PyMan is run the following in a console:
$ pip install pyman
Collecting pyman
Using cached pyman-0.1.3-py2.py3-none-any.whl
Installing collected packages: pyman
Successfully installed pyman-0.1.3
Minimal Example
import pyman
pyman.Main("PyMan - Menu Example", [
pyman.Action.Cmd( "Hello World", "echo 'Testing PyMan'" ),
pyman.Action.Exit()
]).cli()
Example Output
================================================================
PyMan - Menu Example
================================================================
Main Menu
--------------------
1) Hello World
2) Exit
--------------------
Choice:
How It Works
PyMan uses the idea of Pages and Actions. Each page is made up of a number of actions.
You start off by instanciating the ‘Main Menu’ class, providing the title you wish to display:
menu = pyman.Main("PyMan - Menu Example")
From here you add other Pages or Actions
menu.add([
pyman.Action.Exit()
])
pyman.Action.Exit is one of the in-built actions. Other inbuilt actions include:
pyman.Actions.Cmd
pyman.Actions.Back
pyman.Actions.Exit
And finally, you start the CLI with:
menu.cli()
Documentation: ReadTheDocs
Source Code: GitHub
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyman-0.1.3.tar.gz
.
File metadata
- Download URL: pyman-0.1.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65c103a6e316fb15cb9343884a03408f932ddd9c3d1358ddce5b95ee7c35d63a |
|
MD5 | 9141cbbf218f9c530dd8495c82b58e41 |
|
BLAKE2b-256 | 76ae479f0f9a14b84c879655a25f587a05856da693796df875b6493f67821a5e |
File details
Details for the file pyman-0.1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: pyman-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae3d7de1d110de28dc9dcb26d466bd1362fdc42a8be33f38e37cf35235cda81b |
|
MD5 | d679e027d2943e17b89fc55c2d193519 |
|
BLAKE2b-256 | c9adf53da714988dc39b0fafc0dec013cd54312f53380e26ebe0ee644d7c1a5b |