#!/usr/bin/python3
"""
script que agregue el Stateobjeto "Louisiana" a la base de datoshbtn_0e_6_usa
"""


from model_state import Base, State
from sqlalchemy.orm import sessionmaker
from sqlalchemy import (create_engine)
import sys
if __name__ == "__main__":
    engine = create_engine('mysql+mysqldb://{}:{}@localhost/{}'.format(
        sys.argv[1], sys.argv[2], sys.argv[3]), pool_pre_ping=True)

    Session = sessionmaker(bind=engine)
    session = Session()
    new_object = State(name="Louisiana")
    session.add(new_object)
    session.commit()
    print("{}".format(new_object.id))
    session.close()
