This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Fast and Easy Python Valve Data File (VDF) Reader and Writer

What is a VDF?

A VDF, or Valve Data File, is a file that uses Valve’s KeyValues format.

####Valve Files that use the KeyValues format * .vdf (Valve Data File) * .acf (Application Cache File) * .vmt (Valve Material Type) * Some .cfg (Configuration File), Usually those found in Source Engine bin Folder * Some .txt (Text File), Usually those found in Source Engine bin Folder * Some .res (Resource File) [NOT YET IMPLMENTED]


Requires PyVDF

$ pip install PyVDF

You will probably have to make vdfedit executable

chmod +x vdfedit

Thats it.

What is vdfedit?

vdfedit is a program that makes use of PyVDF to create an easy to use VDF editor.


$ vdfedit -h
usage: vdfedit [-h] [-o FILE] [-p] [-g key] [-s key=value] [-w] [-c]
               [-len int] [-d str] [--indent str] [--spacing str] [--condense]

Read and Write VDF KeyValue Files

positional arguments:
  FILE                  The file to Read

optional arguments:
  -h, --help            show this help message and exit
  -o FILE, --out FILE   The file to Write out to Defaults to the infile
  -p, --print           Print the file as groups of Paths.Key=Value
  -g key, --get key     Add a key to Search For
  -s key=value, --set key=value
                        Add/set a key-value pair in the vdf
  -w, --write           Write out the data regardless of setting a value.
  -c, --check           Check the file for validity
  -len int, --token-length int
                        Set the maximum token length. Larger values cause
                        slower searching, however smaller values can result in
                        errors. Defaults to 1200
  -d str, --delim str   Set the string used to separate found values. Defaults
                        to ','
  --indent str          Set the indention used when writing out a file.
                        Defaults to \t
  --spacing str         Set the spacing used when writing out a file. Defaults
                        to \t\t
  --condense, --condensed, --use-condensed
                        Use consensed output when writing a file
  --fast, --faster-reading
                        Use faster reading. **Note** If you write a file while
                        this option is set, your output will not be in the
                        same order as the original file


Paths are what vdfedit uses to find and retrieve values.

Reading Paths

Without any get or set options, the output will be a list of Keys and Values

Ex. PathHead.NextPath.OneMoreLevel.Key Value

Formatting Keys is a bit tricky Any key that contains a period . must be enclosed by brackets '[',']'

Getting/Setting Values from Paths

For each path that you want to search, place it after a '-g', after the file name.

$ vdfedit config.vdf -g Store.Software.apps.240.LastPlayed

$ vdfedit config.vdf -gStore.depots.241.CDN.[].Expires

$ vdfedit config.vdf -gStore.Software.apps."218_Black Mesa".LastPlayed

$ vdfedit config.vdf -g Store.system.EnableGameOverlay \
-gStore.system.JumplistSettings \

You can set the seperator between each returned value by setting the '-d' argument

For each value that you want to set, place it and the path to it after a '-s', after the file name.

$ vdfedit config.vdf -s Store.Software.apps.240.LastPlayed=0000000000

If you want to write the new data to a different file, set the '-o' argument.

$ vdfedit config.vdf -o \
-s Store.Software.apps.240.LastPlayed=0000000000
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
vdfedit-1.0.0.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Dec 9, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting