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, Gzip, 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.8.tar.gz (18.8 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.8-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyuepak-0.2.8.tar.gz
  • Upload date:
  • Size: 18.8 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.8.tar.gz
Algorithm Hash digest
SHA256 03ec0ff5a30599546a159b91e589a8e2d6ba6e6424ca141abc04e4756190c15d
MD5 a7688b047912806abebc4592b1bf2a97
BLAKE2b-256 8a47866f1effd4edf9c2f4e1cef20dc44884088174c9e35d8fc881f5a0781a74

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyuepak-0.2.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 22628162e755ef2e42a537bbb35a51251a75494af95edaeb4d6baf76007be26c
MD5 6e0e9ab3d6a3988e75501d87ff1910e5
BLAKE2b-256 f8ec3efc16113edbcca1c2f50759c17d8be04a2a923d249ce68ba006c1ed1ff6

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