semvec/pypi-packages huggingface dataset:
ipdbugger 2.5.0
ipdb-based debugger
License: MIT
Requires Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
Keywords: ipdb debug debugger exception

ipdbugger
---------
.. image:: https://img.shields.io/pypi/v/ipdbugger.svg
    :alt: PyPI
    :target: https://pypi.python.org/pypi/ipdbugger/

.. image:: https://img.shields.io/pypi/pyversions/ipdbugger.svg
    :alt: Python versions
    :target: https://pypi.python.org/pypi/ipdbugger/

.. image:: https://travis-ci.org/gregoil/ipdbugger.svg?branch=master
    :target: https://travis-ci.org/gregoil/ipdbugger

.. image:: https://coveralls.io/repos/github/gregoil/ipdbugger/badge.svg?branch=master
    :target: https://coveralls.io/github/gregoil/ipdbugger

``ipdbugger`` is a code debugging tool based on ``ipdb``.

Use the ``debug`` decorator on functions or classes to debug them.
What actually happens: it surrounds each statement of the functions with a
try-except, and starts an ipdb session in the exception handling section.

Installing
==========

.. code-block:: console

    $ pip install ipdbugger

Using
=====

.. code-block:: python

    from ipdbugger import debug

    @debug
    def f():
        foo = 1 + 1
        bar = 1 / 0
        baz = 2 + 2

Now when you run ``f()``, you'll get into an ipdb shell right after the
error (the division by zero):

.. code-block:: pycon

    >>> from ipdbugger import debug
    >>> @debug
        def f():
            foo = 1 + 1
            bar = 1 / 0
            baz = 2 + 2

    >>> f()
    Traceback (most recent call last):
       File "<ipython-input-2-5720bb02ab1d>", line 4, in f
        bar = 1 / 0
     ZeroDivisionError: integer division or modulo by zero
    > <ipython-input-2-5720bb02ab1d>(5)f()
          2 def f():
          3     foo = 1 + 1
          4     bar = 1 / 0
    ----> 5     baz = 2 + 2
          6

    ipdb> foo
    2
    ipdb>

From there, you have a couple of choices:

* ``retry`` the action
* ``continue`` with the rest of the flow (and ignore the error)
* ``raise`` the exception, as if you didn't catch it at all
* Use any other of the available ``ipdb`` commands, like ``jump``
AttributeRouter 1.0.0
An Attribute Router/Chainer For Any Class
License: MIT

# Attribute Router

![Travis (.org)](https://img.shields.io/travis/FKLC/AttributeRouter.svg?style=flat-square)
![PyPI - Downloads](https://img.shields.io/pypi/dm/AttributeRouter.svg?style=flat-square)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/AttributeRouter.svg?style=flat-square)
![GitHub release](https://img.shields.io/github/release/FKLC/AttributeRouter.svg?style=flat-square)
![GitHub](https://img.shields.io/github/license/FKLC/AttributeRouter.svg?style=flat-square)

Attribute Router is a library that chains calls of attributes of class and if regex matches it returns method.

## Quick Start

```python
import re

from attribute_router import Router


class Printer(Router):
    def __init__(self):
        super().__init__(
            routes={
                re.compile(" (.*) PRINT"): self.print_match
            },
            join_char=" "
        )

    def print_match(self, prefix, _match):
        print(prefix, _match.group(1))

Printer().hello.world('!').again.PRINT("Hello and")
```

So to define routes we use compiled regex and the method itself also don't forget to inherit from `attribute_router.Router`

---

## Installation

Library is on PyPi so just run

```
pip install AttributeRouter
```