# dynrepr
Decorator factory to help create class `__repr__` functions.

### Example Usage:
```py
# old
class Point:
    def __init__(self, x: int, y: int):
        self.x = x
        self.y = y

print(Point(1, 2))
# <__main__.Point object at 0x848469690>

# new
from dynrepr import dynrepr

@dynrepr
class Point:
    def __init__(self, x: int, y: int):
        self.x = x
        self.y = y

print(Point(1, 2))
# Point(x=1, y=2)
```

### Advanced Usage:
```py
from dynrepr import dynrepr

@dynrepr('x', 'y')
class FilterValuesPoint:
    def __init__(self, x: int, y: int, z: int):
        self.x = x
        self.y = y
        self.z = z

print(FilterValuesPoint(4, 6, 8))
# FilterValuesPoint(x=4, y=6)

@dynrepr(filters=[lambda v: 4 < v < 8])
class FilteredSubclassPoint(FilterValuesPoint): pass

print(FilteredSubclassPoint(4, 6, 8))
# FilteredSubclassPoint(y=6)
```

### Installation
```sh
pip install dynrepr
```

#### [MIT License](https://raw.githubusercontent.com/nythepegasus/dynrepr/refs/heads/main/LICENSE)

