paxo is a small library that makes it fast and easy to create simple python command line tools.
What is this?
paxo you can quickly create terminal applications with python. It handles a bunch of stuff in the background so that you do not need to worry about it.
Why Yet Another Command Line Library?
Well, for me paxo is not just a command line library managing your arguments and options but also managing everything related to those commands. It generates a quick info view of your commands and also provides a help command to learn more about each command. I hope that in the Future it will be able to handle everything documentation, manage all application configuration and data and be fully customizable so that you can create your own themes for a terminal app. If you just want a simple library to take care for shell arguments for you there are many other options available to you.
It’s as simple as:
$ pip install paxo
Paxo is really easy to use for anyone, whether you want to start quickly or customize your command line application to your own needs entirely. You can see
paxo in action with some of my side projects. (e.g. pen or como). You can find a minimalistic script that makes use of this library inside the project’s example folder:
from paxo import Paxo from paxo.command import cmd @cmd(help='Print out a help message.') def hello(args): print 'Hello World!' app = Paxo('example', 'a Cecil Woebker project.', '<command>', '0.1') if __name__ == '__main__': app.go()
A simple command line call
./example.py hello prints “Hello World!“. Take a look at the above screenshot for the accompanying info screen of the example.py command.
If you want to know even more make sure to check out the source code or look at some of the projects I mentioned above.
- Mange commands, usage and help information
- Easily map commands to python functions
- Declare a default action
- Declare a dynamic action
I am also releasing new versions of both pen (v0.4.0) and como (v0.6.0). Both programs now use the paxo command line library for dealing with termal input. I also cleaned both of them from some old junk that accumulated over the years. Hopefully they will run more stable from now on.
Paxo is open source. BSD licensed. Check out the code and contribute.