repak
Python bindings for repak, a Rust library for reading and writing Unreal Engine .pak files.
Installation
# Using pip
pip install repak
# Using uv
uv add repak
# Using poetry
poetry add repak
Prebuilt wheels are published for Linux, macOS and Windows. A single abi3 wheel per platform covers CPython 3.10 and newer, including 3.14. No Rust toolchain is required.
Reading
import repak
with repak.PakBuilder().reader("game.pak") as pak:
print(pak.version, pak.mount_point)
for path in pak:
print(path)
data = pak.get("Content/Asset.uasset")
pak.read_file("Content/Asset.uasset", "Asset.uasset")
pak.unpack("out")
PakReader supports len(), in and iteration over entry paths. A pak may also be read from memory by passing bytes instead of a path.
Writing
import repak
builder = repak.PakBuilder().compression([repak.Compression.ZLIB])
with builder.writer("mod.pak") as pak:
pak.write_file("Content/Asset.uasset", data)
The index is written when the with block exits. Without a context manager, call write_index() yourself. Entries are only compressed if the builder was given a compression algorithm.
To append to an existing pak, turn a reader into a writer:
import repak
reader = repak.PakBuilder().reader("mod.pak")
with reader.into_writer("mod.pak") as pak:
pak.write_file("Content/Extra.uasset", data)
Encryption
import repak
pak = repak.PakBuilder().key("0x0123456789abcdef...").reader("game.pak")
The key is a 256 bit AES key given as bytes, a hex string with an optional 0x prefix, or base64.
Oodle
Oodle works out of the box:
import repak
builder = repak.PakBuilder().compression([repak.Compression.OODLE])
The Oodle library is proprietary and cannot be shipped inside the wheel, so repak downloads it on first use, the first time an Oodle pak is read or written.
To avoid the download, or when the install directory is not writable, point REPAK_OODLE_PATH at a copy you already have. That also lets you substitute a different Oodle version:
export REPAK_OODLE_PATH=/opt/oodle/liboo2corelinux64.so.9
repak.oodle_library_path() returns the path in use. If the library cannot be fetched or loaded, Oodle operations raise repak.OodleError.
Errors
All failures raise repak.RepakError or one of its subclasses: MissingEntryError, VersionError, EncryptionError and CompressionError. Filesystem failures raise the usual OSError.
Versioning
The package version tracks the version of the upstream repak crate it wraps. Fixes to the bindings alone are released as post releases, for example 0.2.3.post1.
Upstream resolves the Oodle library relative to the running executable, which inside a Python extension is the interpreter and is often not writable. vendor/oodle_loader replaces that crate through a cargo [patch] entry so the path is resolvable, without forking repak itself.
Development
The preferred dev environment requires Python 3.14 and Rust nightly toolchain, pinned in rust-toolchain.toml.
uv sync
uv run pytest
uv run ruff check
uv run ruff format
uv run pyright
cargo clippy --all-targets
cargo fmt
uv sync compiles the extension module. Use uv run maturin develop --uv to rebuild it after changing Rust code.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for repak 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| repak-0.2.3.tar.gz | 36.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| repak-0.2.3-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| repak-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| repak-0.2.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| repak-0.2.3-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| repak-0.2.3-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 8.6 MB
Release files / repak-0.2.3.tar.gz
| Download URL | repak-0.2.3.tar.gz |
|---|---|
| Size | 36.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2d51d40320ffd30eb5f29b98e9b8d28fc65b2f2c08c4e5078fa0023f414cf89
|
|
BLAKE2b-256 checksum How to use checksums |
02f2a7c28cc3849ea0f830805f7e57fb3d17c54c0d60e5c141bf486b1b889b2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / repak-0.2.3-cp310-abi3-win_amd64.whl
| Download URL | repak-0.2.3-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
661a4421f2f28a7212bba82d94f01290d8f05448ee5fe23ab8b2772947bcc2b7
|
|
BLAKE2b-256 checksum How to use checksums |
d60e1962e6c6501dc875f6d0f57880bc2b414987eee71826aef65ff4068a355e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / repak-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | repak-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
43328f3829ff60e231253e067251057512f7a1b4020acbe7d702670f8c2aa515
|
|
BLAKE2b-256 checksum How to use checksums |
46417be5e0def90ef34c21b3e5f03fb9035e5b76ae96623c320eca8355bf8d93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / repak-0.2.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | repak-0.2.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
9f681b2dfb5034abd72337d96395bc3fb12206264e97069f07ff3eb8efd3440b
|
|
BLAKE2b-256 checksum How to use checksums |
5c80d34aceb42e4a81a8f8e1ff49679d6070290623ac2f659283eff2ce32ef77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / repak-0.2.3-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | repak-0.2.3-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4c8cf3130101315086b45af4732562b70b02507f424ab93efff117ca4e08fc88
|
|
BLAKE2b-256 checksum How to use checksums |
5268733f05482ea5749276747dbf77f94078e6e0265268a312574afa203f66d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / repak-0.2.3-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | repak-0.2.3-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f36f00f059af43bbc5e569c0231d711fd8269287566586033e3c00b1dc9cf1f3
|
|
BLAKE2b-256 checksum How to use checksums |
8d7a19602ad18ef46e95bd7cb8d6cf3fc1fe2f455a40f23676c6fa77c7d26542
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency log