Registry / data / pyvrl
library0.0.2pypypi✓ verified 85d ago

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.

pip install pyvrl
INSTALL
IMPORT
SIG · PYVRL
P
pyvrl
datapythonv0.0.2
Install
2.4s avg
Import
Disk
36MB
Pass rate
3/ 10
Env Coverage3 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 2.55s
py 3.11
✕ build_error
✓ 2.55s
py 3.12
✕ build_error
✓ 2.2s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✕ build_error
36MB installed
● package 36MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Transform
from pyvrl import Transform
from pyvrl.compiler import VRLCompiler

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.

from pyvrl.compiler import VRLCompiler from pyvrl.value import Value # Initialize the VRL compiler compiler = VRLCompiler() # Compile a VRL program to uppercase the 'message' field vrl_program = '.message = upcase(.message)' compiled_program = compiler.compile(vrl_program) # Prepare input data as a pyvrl.value.Value object input_data = Value({"message": "hello world"}) # Run the VRL program output_data = compiled_program.run(input_data) # Convert the output back to a Python dictionary result = output_data.as_python() print(f"Input: {input_data.as_python()}") print(f"Output: {result}") # Expected output: {'message': 'HELLO WORLD'}
Debug
Known issues
breakingAs a library in early development (version 0.0.x), the API is subject to frequent and potentially breaking changes. Stability is not guaranteed between minor or even patch versions.
fix
Always consult the latest GitHub README and any release notes for API changes before upgrading. Pin your dependency to a specific patch version if stability is critical.
affects: <0.1.0
gotchaVRL expressions in `pyvrl` operate on `pyvrl.value.Value` objects, not standard Python dictionaries or lists directly. Passing raw Python types where a `Value` is expected will result in type errors.
fix
Ensure all input data for VRL processing is wrapped using `pyvrl.value.Value(your_python_data)`. To retrieve Python-native types from `pyvrl` output, use the `.as_python()` method on the resulting `Value` object.
affects: 0.0.x
gotchaVRL syntax errors are caught by the `VRLCompiler` during the `compile()` step, not by Python's interpreter. Invalid VRL expressions will lead to `pyvrl.compiler.VRLCompilationError` at runtime.
fix
Thoroughly test VRL expressions for correctness before embedding them in your Python code. You may use external VRL validators or the `Vector` CLI to pre-validate complex VRL logic.
affects: 0.0.x
Upgrade
Version history
0.0.2latest on PyPI · released May 16, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
pyvrl — pip install pyvrl · libregistry