vdf
Library for working with Valve's VDF text format
What it is and what it does
VDF is a pure-Python library for reading and writing Valve's KeyValue text format, the configuration and data format used by Steam, Team Fortress 2, Dota 2, and Counter-Strike. It works like the standard json module—load/loads for parsing, dump/dumps for serialization—and supports both text and binary VDF representations. The library handles the quirk that VDF files can contain duplicate keys, which standard dicts cannot; for such cases it provides VDFDict, a dict-like class that preserves duplicates and insertion order while allowing access by key index.
The package has no runtime dependencies and installs cleanly on py2.7, py3.3+, pypy and pypy3. It is marked production-stable and has been in use since 2015, though maintenance is dormant (no releases since 2021-05-22). It supports only kv1 format; kv2 and kv3 are documented as unsupported.
Use it for:
- Parse Steam configuration files or game settings stored in VDF format for analysis or modification
- Handle Dota 2 or Team Fortress 2 data files that use the KeyValue format
- Migrate or convert VDF data to JSON or other formats for integration with other tools
- Work with files containing duplicate keys by using VDFDict instead of standard dict
- Read binary VDF representations including VBKV with CRC checking from game or Steam data
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Serializes and deserializes Valve's KeyValue (VDF) text format to and from Python dicts, with support for duplicate keys via a specialized VDFDict class.
Yes, if you need to work with Valve's VDF format. The package is stable, has no dependencies, and handles the format correctly including edge cases like duplicate keys. The dormant maintenance is not a blocker for a format-parsing library, but verify compatibility with your Python version, and note that kv2 and kv3 formats remain unsupported.
Install
vdf on PyPI
pip
pip install vdfuv
uv add vdfpoetry
poetry add vdfInstalling vdf
Before you install
Low friction installation with no runtime dependencies. Maintenance is dormant (last release May 2021, last commit June 2024), but the package is marked stable and has been in production use since 2015.
License in practice
MIT license permits commercial and private use with minimal restrictions; you must include the license text in distributions.
Quickstart
import vdf
# Parse VDF from string
d = vdf.loads(vdf_text)
# Dump back to VDF format
vdf_text = vdf.dumps(d, pretty=True)
# For binary VDF
b = vdf.binary_loads(vdf_bytes)
vdf_bytes = vdf.binary_dumps(b)
Verify before relying
- Whether kv2 and kv3 format support has been added since the latest release (May 2021)
- Current compatibility with modern Python versions given the last release predates recent versions
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,910 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 236,881/month — #8,972 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: vdf-3.4-py2.py3-none-any.whl
Keywords: valve, keyvalue, vdf, tf2, dota2, csgo
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
avro-python3Serializes and deserializes data in Apache Avro…
permissive · top 5,000 on PyPI
jsonsConverts Python objects (dataclasses, attrs…
permissive · top 5,000 on PyPI
orderedmultidictorderedmultidict provides a dictionary that…
permissive · top 5,000 on PyPI
odProvides shorthand syntax to create OrderedDict…
permissive · top 15,000 on PyPI
vobjectParses and serializes iCalendar and vCard…
permissive · top 5,000 on PyPI
pyserdeSerialize and deserialize Python dataclasses to…
permissive · top 5,000 on PyPI
cborSerializes and deserializes data in CBOR…
permissive · top 5,000 on PyPI
chiavdfProvides Python bindings to a high-performance…
permissive · top 15,000 on PyPI
json5Parses and writes JSON5 data format, which…
permissive · top 1,000 on PyPI
u-msgpack-pythonu-msgpack-python serializes and deserializes…
permissive · top 5,000 on PyPI