semvec/pypi-packages huggingface dataset:
bottle-log 1.0.0
Improved logging for Bottle.
License: New BSD

Improved logging for Bottle.

Use
===
In order to catch exceptions from other plugins the LoggingPlugin should be
the first plugin you install to the application.

.. code-block:: python

    import bottle
    from bottle_log import LoggingPlugin

    app = bottle.Bottle()
    app.install(LoggingPlugin(app.config))

    @app.get('/test')
    def test(logger):
        logger.warning('This is only a test')
        return {}

Configuration
=============
The plugin uses the following configuration keys:

**logging.level**

The logging level. Possible values: `debug`, `info`, `warning`, `error`, `critical`.
Defaults to `warning`.

**logging.format**

The logging format. See the python logging documentation for the format.
Defaults to "`[%(asctime)s] %(levelname)s: %(name)s: %(message)s`"

**logging.utc**

If `True`, the default, time stamps are in UTC.

Logging
=======
The standard logger, used by the `logger` keyword, prints to stderr by default.

Exception logging
=================
This plugin also provides an exception logger ('bottle.exception'). By default
this logger does nothing, since bottle prints all exceptions to stderr, but it can be
useful if you want to log exceptions to somewhere else.
For example, logging to Logentries:

.. code-block:: python

    import bottle
    from logentries import LogentriesHandler
    from bottle_log import LoggingPlugin

    app = bottle.Bottle()
    app.install(LoggingPlugin(app.config))
    le_handler = LogentriesHandler('logentries-api-token')
    logging.getLogger('bottle.exception').addHandler(le_handler)
tinyflow 0.1
Experimental in-memory data flow pipelines.
License: New BSD
Keywords: experimental memory data flow

========
tinyflow
========

Experiments in data flow programming.

.. image:: https://travis-ci.org/geowurster/tinyflow.svg?branch=master
    :target: https://travis-ci.org/geowurster/tinyflow?branch=master

.. image:: https://coveralls.io/repos/geowurster/tinyflow/badge.svg?branch=master
    :target: https://coveralls.io/r/geowurster/tinyflow?branch=master

After some experimentation, Apache Beam's Python SDK got the API right.
Use that instead.


Standard Word Count Example
===========================

Grab the 5 most common words in ``LICENSE.txt``

.. code-block:: python

    from collections import Counter

    from tinyflow.serial import ops, Pipeline


    pipe = Pipeline() \
        | "Split line into words" >> ops.flatmap(lambda x: x.lower().split()) \
        | "Remove empty lines" >> ops.filter(bool) \
        | "Produce the 5 most common words" >> ops.counter(5) \
        | "Sort by frequency desc" >> ops.sort(key=lambda x: x[1], reverse=True)

    with open('LICENSE.txt') as f:
        results = dict(pipe(f))


Using only Python's builtins:

.. code-block:: python

    from collections import Counter
    import itertools as it

    with open('LICENSE.txt') as f:
        lines = (line.lower().split() for line in f)
        words = it.chain.from_iterable(lines)
        count = Counter(words)
        results = dict(count.most_common(10))


Developing
==========

.. code-block:: console

    $ git clone https://github.com/geowurster/tinyflow.git
    $ cd tinyflow
    $ pip install -e .\[all\]
    $ pytest --cov tinyflow --cov-report term-missing


License
=======

See ``LICENSE.txt``


Changelog
=========

See ``CHANGES.md``