autoangel
Python bindings for parsing and manipulating Angelica Engine game files.
Installation
pip install autoangel
Quick Start
Working with elements.data
import autoangel
# Load elements.data file
data = autoangel.read_elements('/path/to/elements.data')
# Inspect data
print(f'Version: {data.version}')
print(f'Number of lists: {len(data)}')
# Access a specific list (e.g., weapons list)
weapons_list = data[3]
print(f'List: {weapons_list.config.caption}')
# Iterate through entries
for i in range(10):
weapon = weapons_list[i]
print(f'ID: {weapon.ID}, name: {weapon.Name}')
# Modify entries
for weapon in weapons_list:
weapon.durability_min = weapon.durability_max = 99999
# Save modifications
data.save('modified_elements.data')
Working with pck/pkx files
import autoangel
# Load package
package = autoangel.read_pck('/path/to/package.pck')
# Or load a paired pck+pkx package
package = autoangel.read_pck('/path/to/package.pck', '/path/to/package.pkx')
# List all files in the package
files = package.file_list()
print(f'Number of files: {len(files)}')
# Find files with a specific prefix
textures = package.find_prefix('textures/')
print(f'Number of texture files: {len(textures)}')
# Extract a specific file
file_content = package.get_file('some/path/in/package.txt')
if file_content:
with open('extracted_file.txt', 'wb') as f:
f.write(file_content)
Creating and modifying pck packages
from pathlib import Path
import autoangel
# Create a package from scratch
builder = autoangel.PackageBuilder()
builder.add_file('models/npc.ecm', Path('npc.ecm').read_bytes())
builder.add_file('models/player.ecm', Path('player.ecm').read_bytes())
builder.save('models.pck')
# Modify an existing package
package = autoangel.read_pck('/path/to/textures.pck')
builder = package.to_builder()
builder.add_file('textures/new_texture.dds', new_texture_data)
builder.remove_file('textures/old_texture.dds')
builder.save('textures_modified.pck')
# Serialize to bytes instead of file
raw = builder.to_bytes()
API Reference
Functions
| Function | Description |
|---|---|
read_elements(path, config?) |
Parse elements.data from file (memory-mapped) |
read_elements_bytes(content, config?) |
Parse elements.data from bytes |
read_elements_config(path) |
Parse elements config from file |
read_elements_config_string(content) |
Parse elements config from string |
read_pck(path, pkx_path?, config?) |
Parse pck package from file (memory-mapped) |
read_pck_bytes(content, config?) |
Parse pck package from bytes |
Classes
ElementsData, ElementsDataList, ElementsDataEntry, ElementsConfig, ElementsListConfig, PackageConfig, PckPackage, PackageBuilder
Full type stubs are included with the package. See autoangel.pyi for details.
API documentation is available on GitHub Pages.
Key Details
- File-backed parsing uses memory-mapped I/O — source files cannot be modified while
ElementsData/PckPackageobjects are alive - Byte array parsing available via
read_elements_bytes()/read_pck_bytes()when mmap is not desired - Bundled configs auto-detect game version from the data header; pass your own
ElementsConfigto override - Entry fields support both attribute-style (
entry.Name) and dict-style (entry['Name']) access - Modify fields in-place, then call
data.save(path)ordata.save_bytes()to serialize
Development
Requires uv and a Rust toolchain.
# Build (dev)
uv run maturin develop
# Build (release)
uv run maturin build --release
# Run tests (Python 3.10+ required)
uv run pytest
# Run stubtest
uv run --with mypy python -m mypy.stubtest autoangel --ignore-missing-stub --allowlist stubtest_allowlist.txt
Test data uses Git LFS — run git lfs pull if tests fail on missing files.
License
Metadata
Release files for autoangel 0.14.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| autoangel-0.14.1-cp37-abi3-win_amd64.whl | CPython 3.7 | abi3 | Windows x86-64 | Details |
| autoangel-0.14.1-cp37-abi3-win32.whl | CPython 3.7 | abi3 | Windows x86-32 | Details |
| autoangel-0.14.1-cp37-abi3-manylinux_2_34_x86_64.whl | CPython 3.7 | abi3 | Linux glibc 2.34+ x86-64 | Details |
| autoangel-0.14.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl | CPython 3.7 | abi3 | macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 | Details |
Total release size: 19.2 MB
Release files / autoangel-0.14.1-cp37-abi3-win_amd64.whl
| Download URL | autoangel-0.14.1-cp37-abi3-win_amd64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.7 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3b3bd6b6b21065a24fa334c1592d88c772514a9a6c76dcd139365219314be0af
|
|
BLAKE2b-256 checksum How to use checksums |
403a225b3f1f039fb16d976dd2b4fcb9c7319f6480264a30073f50807b848ab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 3, 2026.
Transparency logRelease files / autoangel-0.14.1-cp37-abi3-win32.whl
| Download URL | autoangel-0.14.1-cp37-abi3-win32.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.7 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
3eb786d6d655d14605fb1eaa827ed95873490c105f4658c2ad8d2d10f75c6c8f
|
|
BLAKE2b-256 checksum How to use checksums |
0408829bda9f085c8f59c1783c07644b7243d3bd6b83cb7e76217e2030e19ca2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 3, 2026.
Transparency logRelease files / autoangel-0.14.1-cp37-abi3-manylinux_2_34_x86_64.whl
| Download URL | autoangel-0.14.1-cp37-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.7 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
42413eca9e3d506fa09c32d1264431259f154a37d0de44f51261e8cbeced3e0c
|
|
BLAKE2b-256 checksum How to use checksums |
592c3eaa772bd9c0d6577c6fdf59fbdb5dc7c24d63b81deb01ad19de55baa61b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 3, 2026.
Transparency logRelease files / autoangel-0.14.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | autoangel-0.14.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 7.9 MB |
| Tags | CPython 3.7 abi3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b3cd4049f90049215aa62b961a2062edbfe466ed68b30411328c47b6695b7bd2
|
|
BLAKE2b-256 checksum How to use checksums |
cde0c5a1f60f8cde1a00c80f2fcb5ec833db86cee10bb7528ffdebf2c32d084e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 3, 2026.
Transparency log