Unitils

Unitils

Don't be a shell out.

Downloads

Who


I am "iLoveTux" (or Cliff in the real world), I work here and there but this project is my own. If you like what you see and would like to pay me to do something, you can shoot me an email at me@ilovetux.com

Skills

  • Python
  • Node.js
  • Bash/Ksh
  • XML/XSLT/WSDL/XSD/XPATH
  • Java
  • Continuous Integration/Delivery/Deployment
  • Full-Stack Development
    • Design
    • HTML/CSS/JS
    • JQuery
    • Bootstrap 3
    • SQL/NoSQL
    • Django
    • Flask/Bottle
    • CGI/FastCGI

What


These are simplified clones of some common *nix utilities with both a Python API and a CLI.

With this approach we create fast, efficient and native utilities to use from within Python without needing to shell out or parse the output.

How


This project follows a simple architecture. Python iterators are created which accept the same parameters as some very useful utilities. We then use Python's argparse module to wrap a CLI onto this iterator at which point we also tailor the output from native Python types to familiar console output.

We had also considered wraping a REST API or Web GUI around these things, but we feel that they would be better served as building blocks for many different types of Web Apps/APIs.

Rationale


This project started with a small group of co-workers deciding that they needed something to help them day-to-day. We all loved shell scripts because they are concise and powerful. Readability of shell scripts, however, erodes over time.

We decided that since the utilities had stood the test of time due to their dynamic, well-planned nature were not in need of a re-design, but rather they only lacked in their portability.

By using Python, we were not only able to run our utilities on many different platforms. We were able to use our utilities right from within Python. In this way we were able to achieve more concise Python code natively, without shelling out.

At the beginning, we had built a number of utilities, but had not packaged them nor had we bothered with unittests, Continuous Integration or comprehensive documentation. This project is my attempt to fix that.