For what I see, up above you have

```python
grace = grace.groupdict()
```

You could make the conversion there:

```python
grace['days'] = int(grace['days'])
grace['hours'] = int(grace('hours'])
```

and you don't need to carry the conversions to the users.