Skip to main content

Common Python utils (App, logging, config, etc.) [Python3.4]

Project description

nicfit.Application
-------------------

.. image:: https://badge.fury.io/py/nicfit.py.svg
:target: http://badge.fury.io/py/nicfit.py

.. image:: https://travis-ci.org/nicfit/nicfit.py.png?branch=master
:target: https://travis-ci.org/nicfit/nicfit.py

.. image:: https://img.shields.io/travis/nicfit/nicfit.py.svg
:target: https://travis-ci.org/nicfit/nicfit.py

.. image:: https://img.shields.io/pypi/v/nicfit.py.svg
:target: https://pypi.python.org/pypi/nicfit.py


Common Python utils (App, logging, config, etc.)

* Free software: MIT license
* Documentation: https://nicfit.py.readthedocs.org.

Features
--

.. code-block:: python

from nicfit import Application
def main(args):
return 0
app = Application(main)
app.run()


What you get:

- An ArgumentParser (app.arg_parser)
- Logger (app.log)
- Top-level exception handling (e.g. KeyboardInterrupt, uncaught exception
logging)
- Reliable sys.exit return codes.

Maybe you don't what to ``sys.exit``.

.. code-block:: python

retval = app.main()

What you lose:

- sys.exit
- Top-level exception handling

Invoke code right before ``sys.exit``.

.. code-block:: python

def f(): pass
app = Application(main, atexit=f)



History
-------



.. _release-0.2.0-beta4:
0.2.0-beta4 (2016-12-18)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Added:**
*

**Changed:**
*

**Removed:**
*

**Fixed:**

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

nicfit.py-0.4.0.tar.gz (62.3 kB view hashes)

Uploaded Source

Built Distribution

nicfit.py-0.4.0-py2.py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page