{"id":13609981,"url":"https://github.com/ValvePython/vpk","last_synced_at":"2025-04-12T22:32:17.665Z","repository":{"id":32253768,"uuid":"35828129","full_name":"ValvePython/vpk","owner":"ValvePython","description":"📦 Open, Search, Extract and Create VPKs in python","archived":false,"fork":false,"pushed_at":"2023-09-20T20:33:49.000Z","size":58,"stargazers_count":172,"open_issues_count":9,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T03:12:03.428Z","etag":null,"topics":["gcf","hacktoberfest","python","steam","valve","valve-pak"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ValvePython.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-05-18T16:07:49.000Z","updated_at":"2025-03-21T03:18:44.000Z","dependencies_parsed_at":"2024-01-03T06:52:05.708Z","dependency_job_id":"9669cf53-a29f-43b1-a19f-f602c586a6ee","html_url":"https://github.com/ValvePython/vpk","commit_stats":{"total_commits":80,"total_committers":6,"mean_commits":"13.333333333333334","dds":"0.42500000000000004","last_synced_commit":"3ff641e5fa7cf53a12c886153db0aab7a7872821"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValvePython%2Fvpk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValvePython%2Fvpk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValvePython%2Fvpk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValvePython%2Fvpk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ValvePython","download_url":"https://codeload.github.com/ValvePython/vpk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248640998,"owners_count":21138127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcf","hacktoberfest","python","steam","valve","valve-pak"],"created_at":"2024-08-01T19:01:39.948Z","updated_at":"2025-04-12T22:32:17.380Z","avatar_url":"https://github.com/ValvePython.png","language":"Python","readme":"| |pypi| |license| |coverage| |master_build|\n| |sonar_maintainability| |sonar_reliability| |sonar_security|\n\nVPK is Valve's file format for storing game assets.\nPythonic access to VPK files and their contents together with a cli tool.\n\nWorks on: ``python2.7``, ``python3.4+``, ``pypy``, and ``pypy3``\n\n\nInstall\n-------\n\nYou can grab the latest release from https://pypi.python.org/pypi/vpk or via ``pip``\n\n.. code:: bash\n\n    pip install vpk\n\n\nQuick start\n-----------\n\nThe VPK instance is iterable in the standard ways and produces paths to files\n\n.. code:: python\n\n    import vpk\n\n    pak1 = vpk.open(\"/d/Steam/steamapps/common/dota 2 beta/dota/pak01_dir.vpk\")\n\n    for filepath in pak1:\n        print filepath\n\nReading a specifc file is done by passing the file path to ``get_file()`` method, which\nreturns a ``VPKFile`` instance, which acts as a regular ``file`` instance. Writting is not\npossible.\n\n.. code:: python\n\n    pakfile = pak1.get_file(\"scripts/emoticons.txt\")\n    pakfile = pak1[\"scripts/emoticons.txt\"]\n    print pakfile.read().decode('utf-16le')\n\n.. code:: text\n\n    -------------------------------------------------\n    \"emoticons\"\n    {\n        // An ID of zero is invalid\n\n        \"1\"\n        {\n            \"image_name\" \"wink.png\"\n            \"ms_per_frame\" \"100\"\n    ...\n\nSaving a file is just as easy.\n\n.. code:: python\n\n    pakfile.save(\"./emoticons.txt\")\n\n\nThe module supports creating basic VPKs.\nMulti archive paks are not yet supported.\n\n.. code:: python\n\n    newpak = vpk.new(\"./some/directory\")\n    newpak.save(\"file.vpk\")\n\n    pak = newpak.save_and_open(\"file.vpk\")\n\n\nCLI tool\n--------\n\nA command line utility is also included\n\n.. code:: text\n\n    usage: vpk [-h] [--version] [-l] [-la] [-x OUT_LOCATION] [-nd] [-t] [-c DIR]\n               [-p] [-f WILDCARD | -re REGEX | -name WILDCARD] [-v]\n               file\n\n    Manage Valve Pak files\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --version             show program's version number and exit\n\n    Main:\n      file                  Input VPK file\n      -l, --list            List file paths\n      -la                   List file paths, crc, size\n      -x OUT_LOCATION, --extract OUT_LOCATION\n                            Extract files to directory\n      -nd, --no-directories\n                            Don't create directries during extraction\n      -t, --test            Verify contents\n      -c DIR, --create DIR  Create VPK file from directory\n      -p, --pipe            Write file contents to stdout\n\n    Filters:\n      -f WILDCARD, --filter WILDCARD\n                            Wildcard filter for file paths\n      -re REGEX, --regex REGEX\n                            Regular expression filter for file paths\n      -name WILDCARD        Filename wildcard filter\n      -v, --invert-match    Use filters for exclusion\n\n\nLooking to decompile Valve custom asset formats?\n------------------------------------------------\n\nCheck out https://github.com/SteamDatabase/ValveResourceFormat/\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/vpk.svg?style=flat\u0026label=latest%20version\n    :target: https://pypi.python.org/pypi/vpk\n    :alt: Latest version released on PyPi\n\n.. |license| image:: https://img.shields.io/pypi/l/vpk.svg?style=flat\u0026label=license\n    :target: https://pypi.python.org/pypi/vpk\n    :alt: MIT License\n\n.. |coverage| image:: https://img.shields.io/coveralls/ValvePython/vpk/master.svg?style=flat\n    :target: https://coveralls.io/r/ValvePython/vpk?branch=master\n    :alt: Test coverage\n\n.. |master_build| image:: https://github.com/ValvePython/vpk/workflows/Tests/badge.svg?branch=master\n    :target: https://github.com/ValvePython/vpk/actions?query=workflow%3A%22Tests%22+branch%3Amaster\n    :alt: Build status of master branch\n\n.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=ValvePython_vpk\u0026metric=sqale_rating\n    :target: https://sonarcloud.io/dashboard?id=ValvePython_vpk\n    :alt: SonarCloud Rating\n\n.. |sonar_reliability| image:: https://sonarcloud.io/api/project_badges/measure?project=ValvePython_vpk\u0026metric=reliability_rating\n    :target: https://sonarcloud.io/dashboard?id=ValvePython_vpk\n    :alt: SonarCloud Rating\n\n.. |sonar_security| image:: https://sonarcloud.io/api/project_badges/measure?project=ValvePython_vpk\u0026metric=security_rating\n    :target: https://sonarcloud.io/dashboard?id=ValvePython_vpk\n    :alt: SonarCloud Rating\n","funding_links":[],"categories":["Python","Packages"],"sub_categories":["Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FValvePython%2Fvpk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FValvePython%2Fvpk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FValvePython%2Fvpk/lists"}