https://github.com/doctorjohn/keyvalues1
Parser for version 1 of Valve's KeyValues format with focus on relevant steamcmd output
https://github.com/doctorjohn/keyvalues1
keyvalues parser python python3 valve
Last synced: 7 months ago
JSON representation
Parser for version 1 of Valve's KeyValues format with focus on relevant steamcmd output
- Host: GitHub
- URL: https://github.com/doctorjohn/keyvalues1
- Owner: DoctorJohn
- License: mit
- Created: 2023-10-18T01:23:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-13T15:08:38.000Z (10 months ago)
- Last Synced: 2025-07-13T06:30:20.658Z (8 months ago)
- Topics: keyvalues, parser, python, python3, valve
- Language: Python
- Homepage:
- Size: 198 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KeyValues1
[![PyPI][pypi-image]][pypi-url]
![PyPI - Python Version][python-image]
[![Codecov][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[pypi-image]: https://img.shields.io/pypi/v/keyvalues1
[pypi-url]: https://pypi.org/project/keyvalues1/
[python-image]: https://img.shields.io/pypi/pyversions/keyvalues1
[codecov-image]: https://codecov.io/gh/DoctorJohn/keyvalues1/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/DoctorJohn/keyvalues1
[license-image]: https://img.shields.io/pypi/l/keyvalues1
[license-url]: https://github.com/DoctorJohn/keyvalues1/blob/main/LICENSE
Parser for [version 1 of Valve's KeyValues format](https://developer.valvesoftware.com/wiki/KeyValues).
The focus of this particular library is parsing of relevant `steamcmd` output.
## Installation
```bash
pip install keyvalues1
```
## Usage
```python
from keyvalues1 import KeyValues1
text = """
"570"
{
"common"
{
"name" "Dota 2"
"oslist" "windows,macos,linux"
"type" "game"
}
}
"""
data = KeyValues1.parse(text)
print(data["570"]["common"]["name"])
```