Skip to main content

UE5Config

A config file parsing solution for Unreal 5.

A grammatical parsing library for Unreal Engine 5 configuration files, born out of a need to be able to make sense of PalWorld dedicated server configuration files.

NOTICES

This code tries to parse UE5 configuration data correctly, but due to its immaturity, it may get it wrong. You are responsible for checking output prior to usage. You risk losing data if you've not made backups. Please file a bug report if something is incorrect.

While I have a UE license, I have not based this library off of any Unreal Engine code. The syntax was made by eyeballing PalWorld and Satisfactory configuration files and slapping around pyparsing until it worked.

This code is by no means the most efficient way of doing things, either.

Installation

Please note that this software is designed to be used by your own scripts or application and doesn't have its own front end.

Release builds of this software is available on pypi as ue5config.

poetry

To install UE5Config in your poetry project:

poetry add ue5config

To install the most cutting-edge (and possibly broken) code, use our gitlab repo:

poetry add git+https://gitlab.com/N3X15/UE5Config.git

pipx

To install UE5Config into your pipx project:

pipx install ue5config

To install the most cutting-edge (and possibly broken) code, use our gitlab repo:

pipx install git+https://gitlab.com/N3X15/UE5Config.git@dev

pip

To install UE5Config globally:

sudo pip install ue5config

To install the most cutting-edge (and possibly broken) code, use our gitlab repo:

sudo pip install git+https://gitlab.com/N3X15/UE5Config.git

How to use

from pathlib import Path

from ue5config import UE5Config

cfg = UE5Config()
cfg.read_file((Path("samples") / "DefaultPalWorldSettings.ini"))

# Dump to JSON
cfg.write_json(Path("samples") / "DefaultPalWorldSettings.json", indent=2)

# Dump to YAML - requires ruamel.yaml package
cfg.write_yaml(Path("samples") / "DefaultPalWorldSettings.yml")

# Dump to TOML - requires toml package
cfg.write_toml(Path("samples") / "DefaultPalWorldSettings.toml")

## Mess around

# Get the main section
palworld_section = cfg.get_or_create("/Script/Pal.PalGameWorldSettings")

# Get the option all the settings are crammed into for some reason
optsettings = palworld_section["OptionSettings"]
# Change stuff
optsettings["ServerName"] = "Grugworld"
optsettings["ServerPlayerMaxNum"] = 64
optsettings["PlayerStomachDecreaceRate"] = 0.01
optsettings["ServerDescription"] = "Brought to you by the Eggman Empire"
# NOTE: If the value is something like All (no quotes), it's just an unquoted string.
optsettings["DeathPenalty"] = "All"

## Saving
cfg.write_file(Path("samples") / "MyServerSettings.ini")

License

This library is available to you under the terms of the MIT Open Source License. See LICENSE for more details.

Metadata

Release files for ue5config 0.0.3

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

Source distribution (sdist)

Source distribution for ue5config 0.0.3
File Size Uploaded Provenance
ue5config-0.0.3.tar.gz 6.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ue5config 0.0.3
File Interpreter ABI Platform
ue5config-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 kB

Release files / ue5config-0.0.3.tar.gz

Download URL ue5config-0.0.3.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9086c3095ac56fb89a2e30d1d50a146355be1bf9ff2f538d1508b496581618df
BLAKE2b-256 checksum
How to use checksums
21d27c9c7199a2ef4ff6ed3a4b598e08493b098d475440e9999422687efe23de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / ue5config-0.0.3-py3-none-any.whl

Download URL ue5config-0.0.3-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30ca13ae2762fe4ace0bb89783e55dfc1e22ff4e97aada19247b35e9fe7b6d51
BLAKE2b-256 checksum
How to use checksums
66430d960b9611ebe8221fb46f34c92a589ffe87c8d711e6a2f755375e611c56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for ue5config 0.0.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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