SimpleSource

class SimpleSource(path: Path)[source]

Bases: Source

A source that is directly opened.

Supports regular files and zipped files via pystow.utils.safe_open().

Attributes Summary

path

The local path where the resource is stored on disk.

Methods Summary

open()

Open the wrapped path with pystow.utils.safe_open().

Attributes Documentation

Parameters:

path (Path)

path: Path = <dataclasses._MISSING_TYPE object>

The local path where the resource is stored on disk.

Methods Documentation

open() → Generator[IO[str]][source]

Open the wrapped path with pystow.utils.safe_open().

Return type:

Generator[IO[str]]