Skip to main content

No project description provided

Project description

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)

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

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 / PckPackage objects 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 ElementsConfig to override
  • Entry fields support both attribute-style (entry.Name) and dict-style (entry['Name']) access
  • Modify fields in-place, then call data.save(path) or data.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

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

autoangel-0.8.2-cp37-abi3-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.7+Windows x86-64

autoangel-0.8.2-cp37-abi3-win32.whl (3.3 MB view details)

Uploaded CPython 3.7+Windows x86

autoangel-0.8.2-cp37-abi3-manylinux_2_34_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.34+ x86-64

autoangel-0.8.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (7.1 MB view details)

Uploaded CPython 3.7+macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

File details

Details for the file autoangel-0.8.2-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: autoangel-0.8.2-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for autoangel-0.8.2-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7a11bac99fc40e02f3571ea7c7bea110da5605af71e186df2b4adbc27704a09e
MD5 7f2be832da8d76189d186f09bd8ff957
BLAKE2b-256 0f96e213ae3f102938874f305b87a883a4512eb98484e43bbddc980e3bd35978

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoangel-0.8.2-cp37-abi3-win_amd64.whl:

Publisher: publish.yml on Smertig/autoangel-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autoangel-0.8.2-cp37-abi3-win32.whl.

File metadata

  • Download URL: autoangel-0.8.2-cp37-abi3-win32.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for autoangel-0.8.2-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 0864cb2cdf9bc415959f951b255b8e26ec30a7bee2ad4ac99f34dfce127e81b7
MD5 d0f5b9289f3d1ee89af6d42ddbd8014e
BLAKE2b-256 75c157f1cd419315cf2d383585659aa2317d6b40078a60a354fa140cb696ac6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoangel-0.8.2-cp37-abi3-win32.whl:

Publisher: publish.yml on Smertig/autoangel-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autoangel-0.8.2-cp37-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for autoangel-0.8.2-cp37-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 81408146a188886ac97f41a8834b9659eb93af09c36c82da4055f8ed5a7022c1
MD5 b45a230f9019036156b2acce16fea646
BLAKE2b-256 dec52c832fe390a29fbc3510a42eab74aba52214d030af2a53d258cd0afb3945

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoangel-0.8.2-cp37-abi3-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on Smertig/autoangel-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autoangel-0.8.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for autoangel-0.8.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e0823bf4cec2b5e581f51bd5a2c8fd38c5fb826c2a923fb1b1f998a4ff377c75
MD5 ea854f0094a886962a7af5f8a692821f
BLAKE2b-256 b0ad332e4dd09c34bf1d6d61492aceb7eb2d8695b704fd267003b0c9c4c56fc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoangel-0.8.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl:

Publisher: publish.yml on Smertig/autoangel-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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