def get_db():
    from pymongo import MongoClient
    client = MongoClient('localhost:27017')
    db = client.MyRetail
    return db


def add_product(db):
    db.product.insert({"name": "addidas","price":123})


def get_product(db):
    return db.product.find()


if __name__ == "__main__":
    db = get_db()
    add_product(db)
    print(get_product(db))

751a2f13ad75d29311350cb4f9dfa34e1434b9ec
<mask token>


def get_product(db):
    return db.product.find()


<mask token>

<mask token>


def add_product(db):
    db.product.insert({'name': 'addidas', 'price': 123})


def get_product(db):
    return db.product.find()


<mask token>

def get_db():
    from pymongo import MongoClient
    client = MongoClient('localhost:27017')
    db = client.MyRetail
    return db


def add_product(db):
    db.product.insert({'name': 'addidas', 'price': 123})


def get_product(db):
    return db.product.find()


<mask token>

def get_db():
    from pymongo import MongoClient
    client = MongoClient('localhost:27017')
    db = client.MyRetail
    return db


def add_product(db):
    db.product.insert({'name': 'addidas', 'price': 123})


def get_product(db):
    return db.product.find()


if __name__ == '__main__':
    db = get_db()
    add_product(db)
    print(get_product(db))

def get_db():
    from pymongo import MongoClient
    client = MongoClient('localhost:27017')
    db = client.MyRetail
    return db


def add_product(db):
    db.product.insert({"name": "addidas","price":123})


def get_product(db):
    return db.product.find()


if __name__ == "__main__":
    db = get_db()
    add_product(db)
    print(get_product(db))
