Finucane-Apputils Documentation

Release:0.4.0
Date:Jun 21, 2017

Finucane Research application building framework and utilities for Python.

This framework has one, clear goal: to allow the rapid development of consistent, “standard” tools (using Python). There are two key parts to this goal to keep in mind when either using or developing this framework: rapid and standard. Remember: the standard part is more flexible than the rapid part. Take from that mantra what you wish.

For now, this project is focused on providing a package that will allow a command-line tool developer to worry less about how their tool is packaged for command-line use, and more about the core functionality of the tool. By providing a layer of abstraction between the developer and the underlying feature implementations which are common to most, if not all, tools, we can not only ease the burden for the developer, but we can make the tools more future-proof (as long as the core functionality of the tool doesn’t break in ways not controlled by the abstraction). This means that if the API for the underlying argument parsing library changes, finucane-apputils can be updated to propagate that change to all of your tools at once.

Finucane-Apputils works with Python 3 (tested on ≥ 3.2), and Python 2 (tested on ≥ 2.7), with no transformations or 2to3, thanks to the future package.

Please don’t hesitate to report issues to our tracker on GitHub.

Getting Started

  1. Install
1
pip install finucane-apputils

or download from PyPi and perform a manual installation.

  1. Try it out
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
"""simplest_example.py"""
from finucane.apputils import Application


class MyApplication(Application):

    def _main(self, message=None):
        self.print(message)


if __name__ == '__main__':
    import sys
    app = MyApplication()
    app.run(argv=sys.argv[1:], message="Hello World!")  # alternative: app.exec_(...)

or try it out in an interactive session:

1
2
3
4
5
6
7
8
>>> from finucane.apputils import Application
>>> class MyApp(Application):
...    def _main(self, message=None):
...        self.print(message)
...
>>> app = MyApp()
>>> app.run(message='Hello World!')
Hello World!

Using Finucane-Apputils

These are not the droids you’re looking for.

apputils package

Submodules

apputils.application module

apputils.args module

apputils.compatibility module

apputils.config module

apputils.errors module

apputils.log module

apputils.namespace module

Module contents

apputils

Indices and tables

License

All Finucane-Apputils Python source code is licensed as follows:

The MIT License (MIT)

Copyright (c) 2014 Sean Anthony Finucane

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.