mongo/funcs/crud_mongo.py
def list_itens(collection):
    """List itens from database.

    Keyword arguments:
    collection -- Name of the collection on database.
    """
    db_list = collection.find()
    if collection.count_documents({}) > 0:
        for item in db_list:
            print(len(item)*'-')
            print(item)
    else:
        print('This collection is empty.')
List itens from database.

    Keyword arguments:
    collection -- Name of the collection on database.
    
List itens from database.
Keyword arguments:
collection -- Name of the collection on database.
List itens from database . Keyword arguments : collection -- Name of the collection on database .
def list_itens(collection):
    db_list = collection.find()
    if collection.count_documents({}) > 0:
        for item in db_list:
            print(len(item)*'-')
            print(item)
    else:
        print('This collection is empty.')
def list_itens ( collection ) : db_list = collection . find ( ) if collection . count_documents ( { } ) > 0 : for item in db_list : print ( len ( item ) * '-' ) print ( item ) else : print ( 'This collection is empty.' )
List itens from database.
List itens from database .
"""List itens from database.

    Keyword arguments:
    collection -- Name of the collection on database.
    """
collection