runway.sources.source module¶
Abstract parent class for a ‘Source’ type object.
Allows us to specify specific remote sourced resources for out application (Git, S3, ect.)
-
class
runway.sources.source.
Source
(*, cache_dir: Union[pathlib.Path, str] = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/onica-runway/checkouts/latest/docs/source/.runway/cache'), **_: Any)[source]¶ Bases:
object
Abstract parent class for a ‘Source’ type object.
The Source parent class allows us to specify remote resources for our application via services such as Git or S3. A cache directory, as part of object’s configuration, is automatically created by default:
./.runway/cache
. This folder can be overridden by specifying thecache_dir
property in the configuration passed.Every Source type object is expected to have a
fetch
method which will return the folder path at where the module requested resides.Source.
- Parameters
cache_dir – The directory where the given remote resource should be cached.
-
cache_dir
: pathlib.Path¶
-
fetch
() → pathlib.Path[source]¶ Retrieve remote source. To be implemented in each subclass.