Skip to main content

paxo: python ♡ terminal

Project description

paxo: python ♡ terminal

paxo is a small library that makes it fast and easy to create simple python command line tools.

PyPI Version Build Status PyPI License PyPI Python Versions Say Thanks!


What is this?

With 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.

Paxo Terminal

Installation

It's as simple as:

$ pip install paxo

Usage

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.

Advanced

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.

Features

  • Mange commands, usage and help information
  • Easily map commands to python functions
  • Declare a default action
  • Declare a dynamic action

TODO

  • Additional decorator for dynamic/default action
  • Route shell arguments to python functions automatically
  • Automatically create usage text from function signature
  • Cleanup Command management
  • Manage app configuration
  • Manage app data
  • Loose dependencies and become standalone
  • Support for command line options (ala -o, -a, -u)
  • Extended documentation feature - Create man pages
  • Cross Platform support
    • Additional decorator for OS support
  • Create sphinx documentation for “paxo“
  • Themes for “paxo“ - Design your own command line tool

Contribute

Beware: I developed this mainly for my own projects. Unfortunately this tool is not yet as versatile as I would like it to be. If you have any questions or would like some new features please let me know!

Fork and contribute!


For questions and suggestions, feel free to shoot me an email at me@cwoebker.com.

Also, follow or tweet @cwoebker.


Copyright (c) 2015-2018, Cecil Wöbker. License: BSD (see LICENSE for details)

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

paxo-0.2.2.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

paxo-0.2.2-py2.py3-none-any.whl (9.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file paxo-0.2.2.tar.gz.

File metadata

  • Download URL: paxo-0.2.2.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for paxo-0.2.2.tar.gz
Algorithm Hash digest
SHA256 fb1ef7a812516986da506d921caceca5785585bba0a95ffa8f4b54b9ff2cacfd
MD5 c382f4ae0cb6f6d08909a4c970d4c928
BLAKE2b-256 79c672b1f7134a8ada9dc8060cd08abe16c9b54353bf87402b0e6de165ae0339

See more details on using hashes here.

File details

Details for the file paxo-0.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: paxo-0.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for paxo-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6c7119db1298464cb5fe5e30c000819b471314624194045619c24be2d3e892ec
MD5 01c54b2c1148b2c7e83f6d2f66e31f70
BLAKE2b-256 1ae40c2e3e25c49e4ddebb12361d8964345a12530de50374bc948504bb9db732

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