srctools.steam

Parse Steam configuration files to locate apps by their ID.

Locating Steam

srctools.steam.get_steam_install_path() Path

Retrieve the installation path of Steam.

Raises:

FileNotFoundError – If no Steam installation could be located.

srctools.steam.get_libraries(
steam_installpath: Path,
) Collection[Path]

Locate all Steam library folders.

srctools.steam.clear_caches() None

Clear cached data, so they will be parsed again.

Locating Apps

srctools.steam.find_app(app_id: int) AppInfo

Locate information for the specified app ID.

Raises:

KeyError – if the app could not be found.

srctools.steam.find_all_apps() Mapping[int, AppInfo]

Parse all apps, then return a appid -> info mapping.

class srctools.steam.AppInfo(id: int, name: str, path: Path)

Information about a Steam app, parsed from the ACF file.

id: int

Steam appid.

name: str

Display name for the app.

path: Path

Install directory.

classmethod parse(
folder: Path,
filepath: Path,
) AppInfo

Parse from an ACF file.