{"library":"py-partiql-parser","code":"from py_partiql_parser import DynamoDBStatementParser\n\n# Instantiate the parser\nparser = DynamoDBStatementParser()\n\n# PartiQL statement to parse\nstatement = \"select * from my_table where id = '123'\"\n\n# Parse the statement to get the Abstract Syntax Tree (AST)\nparsed_ast = parser.parse(statement)\nprint(f\"Parsed AST: {parsed_ast}\")\n\n# You can also execute the parsed statement with an in-memory dataset\ndata = [{\"id\": \"123\", \"name\": \"foo\"}, {\"id\": \"456\", \"name\": \"bar\"}]\nresult = parsed_ast.execute(data)\nprint(f\"Execution result: {result}\")","lang":"python","description":"This example demonstrates how to parse a PartiQL statement into an Abstract Syntax Tree (AST) and then execute it against an in-memory Python list of dictionaries using the built-in executor.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}