<prompt> Andika hati ya Python inayounganisha kwenye hifadhidata ya PostgreSQL na kufanya shughuli za CRUD Unda, Soma, Sasisha, Futa kwenye jedwali fulani. Hati inapaswa kutumia hoja za mstari wa amri kubainisha operesheni, jina la jedwali, na vigezo vyovyote muhimu.PLINFORMAT  <response>: kuagiza argparsekuagiza psycopg2def createconn, table_name, safuwima: cur conn.cursor column_str , .jiunge fcol ctype kwa col, ctype in columns.items query fCREATE TABLE IKIWA HAIPO table_name column_str; cur.executehoja conn.commitdef readconn, table_name, conditionsNone: cur conn.cursor swala fCHAGUA KUTOKA table_name ikiwa masharti: condition_str NA .jiungefcolval kwa col, val in conditions.items swala f WAPI condition_str; kwingine: swala ; cur.executehoja safu cur.fetchall safu za kurudidef update conn, table_name, set_values, masharti: cur conn.cursor set_str , .jiungefcolval kwa col, val katika set_values.items condition_str NA .jiungefcolval kwa col, val in conditions.items query fUPDATE table_name WEKA set_str WAPI condition_str; cur.executehoja conn.commitdef deleteconn, table_name, masharti: cur conn.cursor condition_str NA .jiungefcolval kwa col, val in conditions.items swala fFUTA KUTOKA table_name WAPI condition_str; cur.executehoja conn.commitkama __name__ __main__: parser argparse.ArgumentParserdescriptionTekeleza shughuli za CRUD kwenye hifadhidata ya PostgreSQL. parser.add_argumentoperation, choicesunda, soma, sasisha, delete, helpOperesheni ya kufanya parser.add_argumenttable_name, helpJina la jedwali la kufanyia kazi args parser.parse_args conn psycopg2.connectdatabaseyour_database, useryour_user, passwordyour_password, hostlocalhost, port5432 if args.operation tengeneza: safu id: SERIAL PRIMARY KEY, jina: VARCHAR255, age: INTEGER createconn, args.table_name, safuwima elif args.operation soma: masharti jina: John Doe safu somaconn, args.table_name, masharti chapa safu elif args.operation sasisha: set_values umri: 30 masharti jina: John Doe sasishaconn, args.table_name, set_values, masharti elif args.operation futa: masharti jina: John Doe kufutaconn, args.table_name, masharti conn.close 