(bundle: dict)
Iterate the entries in a bundle

    >>> bundle = {
    ...     'entry': [
    ...         {'resource': {'name': 'foo'}},
    ...         {'resource': {'name': 'bar'}},
    ...         {'resource': {'name': 'baz'}},
    ...     ]
    ... }
    >>> list(iter_bundle(bundle))
    [{'name': 'foo'}, {'name': 'bar'}, {'name': 'baz'}]
Iterate the entries in a bundle
Iterate the entries in a bundle
def iter_bundle(bundle: dict) -> Generator:
    """
    Iterate the entries in a bundle

    >>> bundle = {
    ...     'entry': [
    ...         {'resource': {'name': 'foo'}},
    ...         {'resource': {'name': 'bar'}},
    ...         {'resource': {'name': 'baz'}},
    ...     ]
    ... }
    >>> list(iter_bundle(bundle))
    [{'name': 'foo'}, {'name': 'bar'}, {'name': 'baz'}]

    """
    for entry in bundle.get('entry', []):
        if 'resource' in entry:
            yield entry['resource']
def iter_bundle ( bundle : dict ) -> Generator : for entry in bundle . get ( 'entry' , [ ] ) : if 'resource' in entry : yield entry [ 'resource' ]