Nessaid-cli

Latest version: v4.1.1

Safety actively analyzes 682457 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

4.1.0

Better processing of file inputs
Support for forcing selected inputs from stdin
Share the same readline stream between parents and children
Support for comment line (Starting with )
Support for partial lines (Ending with \)

4.0.0

Removed support for system/external readline modules
Made the readline module async mode
Removed non async input
Miscellaneous fixes
Better handling of CTRL+C and CTRL+D By default ignored. Need to override handle_eof and handle_keyboard_interrupt
To exit on these call self.exit_loop() in the overriden methods
Windows CTRL+C is trapped in outermost run_until_complete call and it is fed toi the CLI to process
Configuration file support: Commands can be executed from file. The NessaidCmd.run method accepts a filename parameter
Also the router CLI has implementation example of running file content as part of CLI execution
The config command now accepts a filname and runs the commands in the file

3.0.0

Implemented Orderless set grammar.
The expression ("a", "b", "c") now will match all three in any order
The expression ("a", {"b"}, "c") now will match all three in any order, b being optional
Similarly {"a", "b", "c"} now will match all three in any order altogether being optional

Support for Profiling and timing
The orderless set grammar as of now has bad execution complexity, as the number of terms grows.
The new commands will help in timing and basic profiling of CLI execution
The commands are (cmd-timing | cmd-profiling) (on | off)

Support for sub CLI contexts
A new CLI context can be spawned from a running CLI. The new CLI will match it's own rules and
there's a provision to switch back to parent CLI if the input can't be matched in it, but can be matched in
the parent rules.

Token classes should return NullTokenValue instead of None if a value cannot be obtained from input

New parse tree based evaluation.

Miscellaneous fixes and removal of warnings

Further documentation. A new simple cli implementation and a more complex trivial router CLI are composed
with inline comments for documentation. Available in doc directory.

2.2.0

Removed readline dependency. Now runs on own basic readline package. pypi:nessaid-readline
Common tab completion formatting across Windows, Linux and Mac
Simpler start call for Cli/Cmd. Now we can use cmd = NessaidCmd(); cmd.start();
Better handles masked input

2.1.0

Added asynchronous CLI handlers
Added support for blocking and asynchronous input extraction while running CLI. Input can be plain or masked

Demo: code in example/example_v2.1.0.py
PS D:\nessaid_cli_fixes\nessaid_cli> python.exe test.py
Starting Nessaid CMD Demo
nessaid-cmd asy
async
async-input
nessaid-cmd async-
async-input
nessaid-cmd async-input
cli:
Cli Code Input (cli print): asdf 123
python: 1234 5
Cli Code Input (python print): asdf 123
Python Code Input: 1234 5
nessaid-cmd blo
blocking-input
nessaid-cmd blocking-input
cli: asdf 123
Cli Code Input (cli print): asdf 123
python:
Cli Code Input (python print): asdf 123
Python Code Input: 1234 5
nessaid-cmd q
PS D:\nessaid_cli_fixes\nessaid_cli>

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.