firebase/funcs/crud_firebase.py
def delete():
    """Delete an item selected by id."""
    db = connect()

    key = input('Enter product id: ')

    product = db.child('products').child(key).get()
    if product.val():
        db.child('products').child(key).remove()
        print('Product deleted.')
    else:
        print('Product not found.')
Delete an item selected by id.
Delete an item selected by id.
Delete an item selected by id .
def delete():
    db = connect()
    key = input('Enter product id: ')
    product = db.child('products').child(key).get()
    if product.val():
        db.child('products').child(key).remove()
        print('Product deleted.')
    else:
        print('Product not found.')
def delete ( ) : db = connect ( ) key = input ( 'Enter product id: ' ) product = db . child ( 'products' ) . child ( key ) . get ( ) if product . val ( ) : db . child ( 'products' ) . child ( key ) . remove ( ) print ( 'Product deleted.' ) else : print ( 'Product not found.' )
Delete an item selected by id.
Delete an item selected by id .
"""Delete an item selected by id."""