skillfed

vdf

Library for working with Valve's VDF text format

vdf v3.4 236.9K downloads/30d#8,972 on PyPI213
Permissive license MIT DORMANT released

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 vdf

uv

uv add vdf

poetry

poetry add vdf

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Tags

vdf keyvalue format parservalve vdf serializationkeyvalue text format pythonvdf file parsingsteam config format readerduplicate key dict handlervdf binary format support
file-format-parsersteam-ecosystemserialization

More Python Modules packages