pgcontents/query.py
def generate_files(engine, crypto_factory, min_dt=None, max_dt=None,
                   logger=None):
    """
    Create a generator of decrypted files.

    Files are yielded in ascending order of their timestamp.

    This function selects all current notebooks (optionally, falling within a
    datetime range), decrypts them, and returns a generator yielding dicts,
    each containing a decoded notebook and metadata including the user,
    filepath, and timestamp.

    Parameters
    ----------
    engine : SQLAlchemy.engine
        Engine encapsulating database connections.
    crypto_factory : function[str -> Any]
        A function from user_id to an object providing the interface required
        by PostgresContentsManager.crypto.  Results of this will be used for
        decryption of the selected notebooks.
    min_dt : datetime.datetime, optional
        Minimum last modified datetime at which a file will be included.
    max_dt : datetime.datetime, optional
        Last modified datetime at and after which a file will be excluded.
    logger : Logger, optional
    """
    return _generate_notebooks(files, files.c.created_at,
                               engine, crypto_factory, min_dt, max_dt, logger)
def generate_files(engine, crypto_factory, min_dt=None, max_dt=None,
                   logger=None):
    """
    Create a generator of decrypted files.

    Files are yielded in ascending order of their timestamp.

    This function selects all current notebooks (optionally, falling within a
    datetime range), decrypts them, and returns a generator yielding dicts,
    each containing a decoded notebook and metadata including the user,
    filepath, and timestamp.

    Parameters
    ----------
    engine : SQLAlchemy.engine
        Engine encapsulating database connections.
    crypto_factory : function[str -> Any]
        A function from user_id to an object providing the interface required
        by PostgresContentsManager.crypto.  Results of this will be used for
        decryption of the selected notebooks.
    min_dt : datetime.datetime, optional
        Minimum last modified datetime at which a file will be included.
    max_dt : datetime.datetime, optional
        Last modified datetime at and after which a file will be excluded.
    logger : Logger, optional
    """
    return _generate_notebooks(files, files.c.created_at,
                               engine, crypto_factory, min_dt, max_dt, logger)
def generate_files ( engine , crypto_factory , min_dt = None , max_dt = None , logger = None ) : return _generate_notebooks ( files , files . c . created_at , engine , crypto_factory , min_dt , max_dt , logger )
Create a generator of decrypted files.

    Files are yielded in ascending order of their timestamp.

    This function selects all current notebooks (optionally, falling within a
    datetime range), decrypts them, and returns a generator yielding dicts,
    each containing a decoded notebook and metadata including the user,
    filepath, and timestamp.

    Parameters
    ----------
    engine : SQLAlchemy.engine
        Engine encapsulating database connections.
    crypto_factory : function[str -> Any]
        A function from user_id to an object providing the interface required
        by PostgresContentsManager.crypto.  Results of this will be used for
        decryption of the selected notebooks.
    min_dt : datetime.datetime, optional
        Minimum last modified datetime at which a file will be included.
    max_dt : datetime.datetime, optional
        Last modified datetime at and after which a file will be excluded.
    logger : Logger, optional
Create a generator of decrypted files .