Skip to main content

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.

Entries are stored relative to the pak's mount point, so a pak mounted at ../../../Game/Content/Sub/ holds them under bare names like Asset.uasset. files() joins the mount point back on and drops the leading ../, giving the path the entry actually mounts at:

with repak.PakBuilder().reader("game.pak") as pak:
    pak.mount_point  # '../../../Game/Content/Sub/'
    pak.files()  # ['Game/Content/Sub/Asset.uasset', ...]
    pak.entries()  # ['Asset.uasset', ...]

get(), read_file() and in accept either form. unpack() recreates the mounted layout.

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.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repak 0.2.3.post1
File Size Uploaded
repak-0.2.3.post1.tar.gz 38.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for repak 0.2.3.post1
File
repak-0.2.3.post1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
repak-0.2.3.post1-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.post1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
repak-0.2.3.post1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
repak-0.2.3.post1-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.post1.tar.gz

Download URL repak-0.2.3.post1.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
648e54e4f3f0711df95b5b7ff9f1864ff9cbe16c7d0ff8da9826e2f81c24af54
BLAKE2b-256 checksum
How to use checksums
072139ef23d77a924acb794466367b9feb47bf06c23dfd9f0f9ac558ba84ed64
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 5, 2026.

Transparency log

Release files / repak-0.2.3.post1-cp310-abi3-win_amd64.whl

Download URL repak-0.2.3.post1-cp310-abi3-win_amd64.whl
Size 1.6 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
cf402d21e86f3e9263e2928579c54cff4ca439857590f4eb1e1dc236623237f6
BLAKE2b-256 checksum
How to use checksums
e08146f2354dab62c85cc08a67ab29f65d3b8038ef7b762e66c7a33022bfded2
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 5, 2026.

Transparency log

Release files / repak-0.2.3.post1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL repak-0.2.3.post1-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
8773b794f58eb4d4c7b6f2aea1a4a29ec22a01321c39352a5c6b377ccc8fe6dd
BLAKE2b-256 checksum
How to use checksums
fa59ba103a7a390d407cfca92a70e10698d3ecf624ac5d70b741cce130ddeaa5
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 5, 2026.

Transparency log

Release files / repak-0.2.3.post1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL repak-0.2.3.post1-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
e92313df3f847814e3a96c39f72d63d32dae636ee0c1683337e4c1267f38895f
BLAKE2b-256 checksum
How to use checksums
1cf30a50458b35aa1ec37962398295d4871d5b7b558a4e4cabc931a7bbd25bc3
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 5, 2026.

Transparency log

Release files / repak-0.2.3.post1-cp310-abi3-macosx_11_0_arm64.whl

Download URL repak-0.2.3.post1-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
a5bb242d6e4e6ce32cde96dbc8c27fb9ea2c2f3ea0f2daececdefa2d2b7cd4b6
BLAKE2b-256 checksum
How to use checksums
376954df5d78cad1b345653b8273d57f9c2b34718cd2d537c71e41feaf7cbe59
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 5, 2026.

Transparency log

Release files / repak-0.2.3.post1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL repak-0.2.3.post1-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
8bf32ee1ab401cfc2521a85947f72015a38ac14814fe539e90445158de4e91f3
BLAKE2b-256 checksum
How to use checksums
bc70a43ca5ad012402da6964f74ae7db8a0c34bebcd61bf128fcd3fc3d489f9f
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 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3.post1 This release

6 release files

0.2.3

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page