owmeta_core.capabilities module

class owmeta_core.capabilities.CacheDirectoryCapability(*args, **kwargs)[source]

Bases: Capability

Capability that provides a cache directory.

The provider of this capability must be capable of persisting effectively distinct directories for each Capable which needs this capability. The provider must permit depositing files in the directory by the current effective user.

class owmeta_core.capabilities.CacheDirectoryProvider[source]

Bases: Provider

Provides the CacheDirectoryCapability

cache_directory(cache_key)[source]

Return the cache directory path

Parameters
cache_keystr

The key for the cache entry

Returns
str

The cache directory

clear(cache_key)[source]

Clear the cache directory for the Capable.

Should remove the directory itself, if possible.

class owmeta_core.capabilities.FilePathCapability(*args, **kwargs)[source]

Bases: Capability

Provides a file path where named files can be retrieved.

This capability may be needed when files are referred to that aren’t necessarily stored on the local machine, or which on the local machine, but only in non-portable locations (e.g., a home directory).

class owmeta_core.capabilities.FilePathProvider[source]

Bases: Provider

Provides the FilePathCapability

file_path()[source]

The needed file path

class owmeta_core.capabilities.OutputFilePathCapability(*args, **kwargs)[source]

Bases: Capability

Provides a file path where named files can be put

class owmeta_core.capabilities.OutputFilePathProvider[source]

Bases: Provider

Provides the OutputFilePathCapability

output_file_path()[source]

The needed file path

class owmeta_core.capabilities.TemporaryDirectoryCapability(*args, **kwargs)[source]

Bases: Capability

Provides new, empty temporary directories

class owmeta_core.capabilities.TemporaryDirectoryProvider[source]

Bases: Provider

Provides the TemporaryDirectoryCapability

temporary_directory()[source]

Return the path of a new, empty temporary directory. The receiver of the temporary directory should delete the directory when they’re done with it.

Returns
str

The temporary directory path