Metadata-Version: 1.1
Name: vdf
Version: 1.4
Summary: Library for working with Valve's VDF text format
Home-page: https://github.com/rossengeorgiev/vdf-python
Author: Rossen Georgiev
Author-email: hello@rgp.io
License: MIT
Description: |pypi| |license| |coverage| |master_build|
        
        VDF is Valve's KeyValue text file format
        
        https://developer.valvesoftware.com/wiki/KeyValues
        
        The module works just like ``json`` to convert VDF to a dict, and vise-versa.
        
        
        Poblems & solutions
        ------------
        
        - There are known files that contain duplicate keys. This can be solved by
          creating a class inherating from ``dict`` and implementing a way to handle
          duplicate keys.
        
        - By default the module uses ``dict``, so key order is preserved. If key order
          is important then I suggest using ``collections.OrderedDict``. See example.
        
        
        Install
        -----------
        
        You can grab the latest release from https://pypi.python.org/pypi/vdf or via ``pip``
        
        .. code:: bash
        
            pip install vdf
        
        
        Example usage
        -----------
        
        .. code:: python
        
            import vdf
        
            # parsing vdf from file or string
            d = vdf.load(open('file.txt'))
            d = vdf.loads(vdf_text)
            d = vdf.parse(open('file.txt'))
            d = vdf.parse(vdf_text)
        
            # dumping dict as vdf to string
            vdf_text = vdf.dumps(d)
            indented_vdf = vdf.dumps(d, pretty=True)
        
            # dumping dict as vdf to file
            vdf.dump(d, open('file2.txt','w'), pretty=True)
        
        
        Using ``OrderedDict`` to preserve key order.
        
        .. code:: python
        
            import vdf
            from collections import OrderedDict
        
            # parsing vdf from file or string
            d = vdf.load(open('file.txt'), mapper=OrderedDict)
            d = vdf.loads(vdf_text, mapper=OrderedDict)
        
        
        .. |pypi| image:: https://img.shields.io/pypi/v/vdf.svg?style=flat&label=latest%20version
            :target: https://pypi.python.org/pypi/vdf
            :alt: Latest version released on PyPi
        
        .. |license| image:: https://img.shields.io/pypi/l/vdf.svg?style=flat&label=license
            :target: https://pypi.python.org/pypi/vdf
            :alt: MIT License
        
        .. |coverage| image:: https://img.shields.io/coveralls/rossengeorgiev/vdf-python/master.svg?style=flat
            :target: https://coveralls.io/r/rossengeorgiev/vdf-python?branch=master
            :alt: Test coverage
        
        .. |master_build| image:: https://img.shields.io/travis/rossengeorgiev/vdf-python/master.svg?style=flat&label=master%20build
            :target: http://travis-ci.org/rossengeorgiev/vdf-python
            :alt: Build status of master branch
        
Keywords: valve keyvalue vdf tf2 dota2 csgo
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing 
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
