{"library":"pyvrl","title":"PyVRL: Python Interface for Vector Remap Language (VRL)","description":"PyVRL is a Python library that allows you to execute Vector Remap Language (VRL) transformations directly within your Python applications. It provides bindings to the VRL compiler and runtime, enabling data manipulation, filtering, and routing with VRL expressions. The current version is 0.0.2, indicating it's in very early development with an irregular release cadence.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install pyvrl"],"cli":null},"imports":["from pyvrl.compiler import VRLCompiler","from pyvrl.value import Value"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pyvrl.compiler import VRLCompiler\nfrom pyvrl.value import Value\n\n# Initialize the VRL compiler\ncompiler = VRLCompiler()\n\n# Compile a VRL program to uppercase the 'message' field\nvrl_program = '.message = upcase(.message)'\ncompiled_program = compiler.compile(vrl_program)\n\n# Prepare input data as a pyvrl.value.Value object\ninput_data = Value({\"message\": \"hello world\"})\n\n# Run the VRL program\noutput_data = compiled_program.run(input_data)\n\n# Convert the output back to a Python dictionary\nresult = output_data.as_python()\n\nprint(f\"Input: {input_data.as_python()}\")\nprint(f\"Output: {result}\")\n# Expected output: {'message': 'HELLO WORLD'}","lang":"python","description":"This quickstart demonstrates how to compile a VRL expression and execute it on a Python dictionary, ensuring data is correctly converted to and from `pyvrl.value.Value` objects.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}