Unreal INI Parser
Parser for Unreal Engine config files.
How to install
pip install unreal-ini-parser
Usage example
from pathlib import Path
from unreal_ini_parser import IniParser
def example_print(obj):
print(type(obj).__name__, obj, sep=" | ")
# Create an instance of IniParser
parser = IniParser()
# read ini file
# parser.read("example.ini")
# or parse string
parser.parse("""
[MySection]
IsBool = True
Path = path/to/file
IntValue = 123
FloatValue = 123.456
JustArray = one
JustArray = two
JustArray = three
""")
# all ini data stored in sections
example_print(parser.sections)
# dict | {'MySection': {'IsBool': ['True'], 'Path': ['path/to/file'], 'JustArray': ['one', 'two', 'three']}}
# all paths that was read
# you can read more files, all data will be added to "sections"
# ini parser also supports @requires keyword to validate required ini files was parsed
example_print(parser.paths)
# set | {WindowsPath('example.ini')}
# get string value of "IsBool" key
is_bool = parser.get_value("MySection", "IsBool")
# same as:
# is_bool = parser.get_value("MySection", "IsBool", str)
example_print(is_bool)
# str | True
# get bool value of "IsBool" key
is_bool = parser.get_value("MySection", "IsBool", bool)
example_print(is_bool)
# bool | True
# get int value of "IntValue" key
int_value = parser.get_value("MySection", "IntValue", int)
example_print(int_value)
# int | 123
# get float value of "FloatValue" key
float_value = parser.get_value("MySection", "FloatValue", float)
example_print(float_value)
# float | 123.456
# get path value of "Path" key
path = parser.get_value("MySection", "Path", Path)
example_print(path)
# Path | path/to/file
# get array of "JustArray" key
# you can use type converters in this case
just_array = parser.get_values("MySection", "JustArray")
example_print(just_array)
# list | ['one', 'two', 'three']
Metadata
Release files for unreal-ini-parser 1.0.2
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 | Actions |
|---|---|---|---|---|
| unreal_ini_parser-1.0.2.tar.gz | 28.3 kB | Without provenance | Details for unreal_ini_parser-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unreal_ini_parser-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for unreal_ini_parser-1.0.2-py3-none-any.whl |
Total release size: 56.8 kB
Release files / unreal_ini_parser-1.0.2.tar.gz
| Download URL | unreal_ini_parser-1.0.2.tar.gz |
|---|---|
| Size | 28.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e4738b17ef392ba8733eb44d7694cfb6df6628343d4c0df632a56845220b0fc
|
|
BLAKE2b-256 checksum How to use checksums |
b3b376926d116090603e747732ea23d336f0cc9f7a8f65ef3cf7fcebf82ea72b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.1
|
Release files / unreal_ini_parser-1.0.2-py3-none-any.whl
| Download URL | unreal_ini_parser-1.0.2-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
242513fdd9486a61e1ff4c5e9dd4d06c4c1c88b63e09ee6568e03522286c068b
|
|
BLAKE2b-256 checksum How to use checksums |
c0bcf29861df2f0911c351f29189600d48e5af6a46506b27bae1bf31e78de18a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.1
|
Security for unreal-ini-parser 1.0.2
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.