How to use the steam.vdf.loads function in steam

To help you get started, we’ve selected a few steam examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Lagg / steamodd / tests / testvdf.py View on Github external
def test_simple_dict(self):
        self.assertEqual(self.EXPECTED_SIMPLE_DICT, vdf.loads(vdf.dumps(self.SIMPLE_DICT)))
github Lagg / steamodd / tests / testvdf.py View on Github external
def test_multikey_knode(self):
        self.maxDiff = 80*80
        self.assertEqual(self.EXPECTED_MULTIKEY_KNODE, vdf.loads(self.MULTIKEY_KNODE))
github Lagg / steamodd / tests / testvdf.py View on Github external
def test_multikey_kv(self):
        self.assertEqual(self.EXPECTED_MULTIKEY_KV, vdf.loads(self.MULTIKEY_KV))
github Lagg / steamodd / tests / testvdf.py View on Github external
def test_array_dict(self):
        self.assertEqual(self.EXPECTED_ARRAY_DICT, vdf.loads(vdf.dumps(self.ARRAY_DICT)))
github Lagg / steamodd / tests / testvdf.py View on Github external
def test_quoted(self):
        self.assertEqual(self.EXPECTED_DICT, vdf.loads(self.QUOTED_VDF))
github Lagg / steamodd / tests / testvdf.py View on Github external
def test_comment_quoted(self):
        self.assertEqual(self.EXPECTED_DICT, vdf.loads(self.COMMENT_QUOTED_VDF))
github Lagg / steamodd / tests / testvdf.py View on Github external
def test_unquoted(self):
        self.assertEqual(self.EXPECTED_DICT, vdf.loads(self.UNQUOTED_VDF))
github Lagg / optf2 / optf2 / models.py View on Github external
def _build_client_schema_specials(self):
        schema = self.load()

        cs = schema.client_url
        special = {}

        if not cs:
            return special

        req = steam.api.http_downloader(str(cs), timeout = STEAM_TIMEOUT)

        try:
            clients = steam.vdf.loads(req.download())["items_game"]
        except:
            return special

        prefabs = clients.get("prefabs", {})
        colors = clients.get("colors", {})
        csitems = clients.get("items", {})

        for sitem in schema:
            sid = sitem.schema_id
            item = csitems.get(str(sid))
            clientstuff = {}

            if not item:
                continue

            prefab = item.get("prefab", {})