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–11
  • 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.6.3.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.6.3-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyuepak-0.2.6.3.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.6.3.tar.gz
Algorithm Hash digest
SHA256 6280f3232ff27569da76ec928319a314c2ed18b0c4738dc3982a5fe58bcceab2
MD5 83c156171ce813e8fdf64e720657a3c3
BLAKE2b-256 12b18a38e0597ac8b3da1447f053b0e43463d403eeffa96ede8325284d444693

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyuepak-0.2.6.3-py3-none-any.whl
  • Upload date:
  • Size: 18.8 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.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f50097cbfd91c9a7aa5ae6b3ea4901c481f4b249daf76da39f25b8b1833ae82d
MD5 2ff48a42a3956bfeeee605e120d07853
BLAKE2b-256 94b2933789c258e8375d1dbd0a56896cdd27330ef7e4ba3f63e6778b6ad83731

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