udk_configparser
Like CPython standard configparser but adjusted for UDK config files.
Installation
pip install udk_configparser
Example usage
Setting a single value
from udk_configparser import UDKConfigParser
cg = UDKConfigParser()
cg.read("Engine.ini")
cg["Section"]["Key"] = "NewValue"
Setting a multi-value field and writing the file
# Multi-value example.
pkg_name = "MyPackage"
edit_packages = cg["UnrealEd.EditorEngine"].getlist("+EditPackages")
if pkg_name not in edit_packages:
edit_packages.append(pkg_name)
# Currently, setting multi-value data requires manually
# joining the data to ensure it is written correctly.
cg["UnrealEd.EditorEngine"]["+EditPackages"] = "\n".join(edit_packages)
with open("Engine.ini", "w") as config_file:
cg.write(config_file, space_around_delimiters=False)
# Engine.ini before writing:
# [UnrealEd.EditorEngine]
# +EditPackages=UTGame
# +EditPackages=UTGameContent
# After:
# [UnrealEd.EditorEngine]
# +EditPackages=UTGame
# +EditPackages=UTGameContent
# +EditPackages=MyPackage
Known issues
- Comments get removed during writes.
Metadata
Release files for udk_configparser 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| udk_configparser-1.1.1.tar.gz | 7.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| udk_configparser-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / udk_configparser-1.1.1.tar.gz
| Download URL | udk_configparser-1.1.1.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb22f98fb9e85b446ef2b7e912fa555ebcb9c93b2b07cb6193848a3e698f7ff8
|
|
BLAKE2b-256 checksum How to use checksums |
dfad494ab516350043ed059ba444605ec020e723d6d19cf9f92d609b5620d083
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.1
|
Release files / udk_configparser-1.1.1-py3-none-any.whl
| Download URL | udk_configparser-1.1.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
981b9913c1ab476741dd1e90911862f4c822a2c6137d509b28ca258ffce18f46
|
|
BLAKE2b-256 checksum How to use checksums |
e554ee3d9e2b2a86c070d56e15851274319dd9499b61e94a34d4aff821df8d8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.1
|
Security for udk_configparser 1.1.1
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.