Skip to main content

pyuepak is a Python library for working with Unreal Engine .pak files.

Project description

pyuepak

pyuepak is a Python library for working with Unreal Engine .pak files.

Features

  • Can read and write .pak versions 1–12
  • Can read encrypted paks
  • Can read Zlib, Oodle compressed paks

Installation

pip install pyuepak

Or install directly from the repository:

git clone https://github.com/stas96111/pyuepak.git
cd pyuepak
pip install -r requirements.txt
pip install .

CLT

pyuepak [OPTIONS] COMMAND [ARGS]...

Global option: --aes <key> — AES key for encrypted .pak files.


Commands

Command Description
info Show info about a .pak file
list List all files in the archive
extract Extract one file
unpack Unpack all files
pack Pack a folder into .pak
read Read a file and print to stdout

Examples

pyuepak info -p game.pak
pyuepak unpack -p game.pak -o out/
pyuepak extract -p game.pak -f "Game/Content/file.txt"
pyuepak pack -i folder -o new.pak

Encrypted file:

pyuepak --aes 1234567890ABCDEF info -p encrypted.pak

Usage

from pyuepak import PakFile, PakVersion

pak = PakFile()
pak.read(r"path/to/pak.pak")

print(pak.list_files()) # ["/Game/asset.uasset", ...]
print(pak.mout_point) # "../../../" (default)
print(pak.key) # b'0000000...' AES key (default)
print(pak.path_hash_seed) # 0 (default)
print(pak.count) # prints file count

data = pak.read_file(r"/Game/asset.uasset") # return binary data
pak.remove_file(r"/Game/asset.uasset")

new_pak = PakFile()
new_pak.add_file("/Game/asset.uasset", data)
new_pak.set_version(PakVersion.V11)
new_pak.set_mount_point("../../..")

new_pak.write(r"path/to/pak.pak")

Contributing

Contributions are welcome! Please open issues or submit pull requests.

Credits

This project is based on information and ideas from two great open-source tools:

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyuepak-0.2.7.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyuepak-0.2.7-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file pyuepak-0.2.7.tar.gz.

File metadata

  • Download URL: pyuepak-0.2.7.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for pyuepak-0.2.7.tar.gz
Algorithm Hash digest
SHA256 20222e1be5f5e62e0ec6bba13c4472263345d0c0605c5ccc115c729463d19443
MD5 3c3b3a879f9c0fc6cc8865187de42585
BLAKE2b-256 faadf4caf3fad1454c1475882bbeb057df761cf8c282fce85ffd945e588b8235

See more details on using hashes here.

File details

Details for the file pyuepak-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: pyuepak-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for pyuepak-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9ec2f49d154c4064595f407bd28504b81859a5f5dc985f6d4603d1e3b8be8147
MD5 185615efde4d0c101684df9b46aa8e4d
BLAKE2b-256 f018fe3d677d3668b4e681d0b314b97d1835bdbed93fcdbbd77b99fec08c6a27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page