    def from_dict(self, d:dict):
        """Parse query from dict

        Examples
        --------
        >>> from rocketry.pybox.query import parser
        >>> qry = parser.from_dict({
        ...     'mydate$min': '2021-07-01',
        ...     'mydate$max': '2021-07-15',
        ...     'mykey1': 10,
        ...     'mystring$regex': r'all of .+',
        ...     'mykey2$not': 'not this',
        ... })
        >>> str(qry)
        "((<mydate> >= '2021-07-01') & (<mydate> <= '2021-07-15') & (<mykey1> == 10) & re.match('all of .+', <mystring>) & (<mykey2> != 'not this'))"
        """
        statement = None

        for key, val in d.items():
            substatement = self._get_operation(key, val)

            if statement is None:
                statement = substatement
            else:
                statement &= substatement

        if statement is None:
            return true
        return statement
Parse query from dict

Examples
--------
>>> from rocketry.pybox.query import parser
>>> qry = parser.from_dict({
...     'mydate$min': '2021-07-01',
...     'mydate$max': '2021-07-15',
...     'mykey1': 10,
...     'mystring$regex': r'all of .+',
...     'mykey2$not': 'not this',
... })
>>> str(qry)
"((<mydate> >= '2021-07-01') & (<mydate> <= '2021-07-15') & (<mykey1> == 10) & re.match('all of .+', <mystring>) & (<mykey2> != 'not this'))"
rocketry/pybox/query/parse.py