Skip to main content

vector-vrl

Vector's own VRL compiler and runtime, compiled into a Python extension. The real VRL engine from Vector, self contained - no binary to install, nothing to shell out to.

License Python

pip install vector-vrl
from vector_vrl import execute_vrl, validate_vrl

vrl = """
parsed, err = parse_json(.message)
if err == null {
    .level = parsed.level
}
"""

execute_vrl(vrl, ['{"message": "{\\"level\\": \\"info\\"}"}'])
# [{'level': 'info', 'message': '{"level": "info"}'}]

validate_vrl(vrl).success
# True

What it is good for

  • Test VRL in CI without installing Vector. validate_vrl compiles without running, so a broken transform fails your test suite instead of your pipeline.
  • Check a Vector config before you ship it. validate_config walks a YAML/TOML/JSON config and compiles every remap transform's VRL, catching the most common way a config breaks. It checks the VRL, not the sinks - see the caveat under The API.
  • Build VRL tooling - playgrounds, linters, editor plugins, config generators - against the real compiler rather than a regex approximation.
  • Process events in Python with semantics identical to what your Vector deployment will do to the same data.
  • AI agents for VRL processing and development loops - generate a candidate, compile it, run it, iterate, all without a Vector install.

Safer to hand untrusted VRL

Two guards apply to every entry point that compiles VRL:

  • No host, no network. get_env_var, get_hostname, http_request, dns_lookup and six more are not compiled in. Caller-supplied VRL cannot read your environment or reach out of the process - it fails to compile instead. This is what the published wheel ships. Someone building the crate from source can turn those ten functions on with the full-stdlib Cargo feature; only do that where you control the VRL text.
  • No nesting bomb. VRL source may not nest brackets past 64 levels. Past a few hundred the parser's own recursion overflows the stack and kills the process, which no Python except can catch, so the check runs before the parser ever sees the input. There is no way to switch this one off.

That combination is what makes it reasonable to accept VRL from a user - a multi-tenant playground, a customer-supplied transform, a config someone pasted in. The reasoning is in docs/architecture.md.

The API

execute_vrl(vrl, events, secrets=None) Compile once, run over a batch, get the transformed events back
execute_vrl_with_secrets(vrl, events, secrets=None) The same run, but each entry carries the event's secret store as well
validate_vrl(vrl) Compile without running. Returns a VrlResult, never raises on bad VRL
get_vrl_performance(vrl, events, iterations=100) Run it repeatedly, get events/sec
Vector Batch runner holding state across calls - .initialize(), .process_logs(), .get_stats()
validate_config(path|dict) Compile every remap transform's VRL in a Vector config (YAML/TOML/JSON), in-process
validate_config_with_vector(path) Full config check by running vector validate - needs the binary, never a daemon

Vector runs the VRL step alone. Its config argument is stored but never applied - there is no sources/transforms/sinks pipeline here. If you want the full pipeline, run Vector itself.

Checking a Vector config

There are two levels, and the difference matters.

validate_config is in-process and needs no vector binary. It compiles the source of every remap transform and reports each by name. It says nothing about sources, sinks or wiring, and it cannot judge VRL that calls get_enrichment_table_record or get_secret - those are registered by Vector from enrichment_tables: and secret backends declared in the config, outside VRL, so this build has never heard of them. Rather than call a valid config broken, it reports those transforms as unchecked with a reason. Reading a YAML config needs pip install vector-vrl[yaml]; TOML and JSON need nothing.

validate_config_with_vector runs vector validate --no-environment and checks the lot - wiring, component options, and the enrichment-backed VRL the in-process check has to skip. It needs Vector installed, and it is one-shot: Vector exits as soon as it has answered, never running as a daemon and never moving data.

Exact signatures, return shapes, and the rough edges worth knowing (nested objects come back as JSON strings, a per-event runtime error replaces that event's dict) are in docs/reference-python-api.md.

Contributing

See CONTRIBUTING.md.

License

Apache License, Version 2.0. See LICENSE.

Metadata

Release files for vector-vrl 1.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vector-vrl 1.0.11
File Actions
vector_vrl-1.0.11-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for vector_vrl-1.0.11-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
vector_vrl-1.0.11-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for vector_vrl-1.0.11-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
vector_vrl-1.0.11-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for vector_vrl-1.0.11-cp312-abi3-macosx_11_0_arm64.whl
vector_vrl-1.0.11-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for vector_vrl-1.0.11-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 20.7 MB

Release files / vector_vrl-1.0.11-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL vector_vrl-1.0.11-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
667cd810e378389c1a650d035a1786dbdddba463264a2db23c0c13813c1e7048
BLAKE2b-256 checksum
How to use checksums
44a4efdacac5c361a4965a144cacaeafc616837c9058d3068d53992cbec937fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / vector_vrl-1.0.11-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL vector_vrl-1.0.11-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.4 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
09be7e9f44deb4fd4d9dc38e7fc6168245888652b227e55bbe51fb07be388bc0
BLAKE2b-256 checksum
How to use checksums
d50f3d710909d936c76ec9575a2c4e2f92c425b8bd727c84a45a1c031a962014
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / vector_vrl-1.0.11-cp312-abi3-macosx_11_0_arm64.whl

Download URL vector_vrl-1.0.11-cp312-abi3-macosx_11_0_arm64.whl
Size 4.7 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
55856f53cf7aa37ff19ad8f33c65a2d4110e51217bc33bd83ca879bcf1c33ad0
BLAKE2b-256 checksum
How to use checksums
ba24c7095f2a961bc2829abad9bfa7c147018d8ed268e9e4df32dd40576543c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / vector_vrl-1.0.11-cp312-abi3-macosx_10_12_x86_64.whl

Download URL vector_vrl-1.0.11-cp312-abi3-macosx_10_12_x86_64.whl
Size 5.1 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
85dc3f654df833ee6e1bdc95c655c8777b92ee9bdbb58d613b3cfbd82f73186c
BLAKE2b-256 checksum
How to use checksums
772ca1939993a30e7a06a187762a830130e7dc143aeb74086ddc41a57c563e0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for vector-vrl 1.0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page