demosys.core package

Submodules

demosys.core.exceptions module

Custom exceptions

exception demosys.core.exceptions.ImproperlyConfigured

Bases: Exception

Raised when demosys is configured incorrectly

demosys.core.finders module

Base finders

class demosys.core.finders.FileSystemFinder(paths)

Bases: object

Find files in the local file system

cache(path, abspath, exists=True)

Caches an entry. Should ideally not be overridden.

Parameters:
  • path – The path
  • abspath – The absolute path
  • exists – Did the file exist? (bool)
find(path)

Find a file in the path. When creating a custom finder, this is the method you override.

Parameters:path – The path to find
Returns:The absolute path to the file or None if not found
find_cached(path)

Check if the path is already cached. This method should normally not be overridden.

Parameters:path – The path to the file
Returns:The absolute path to the file or None
class demosys.core.finders.FinderEntry(path, abspath, exists)

Bases: tuple

abspath

Alias for field number 1

exists

Alias for field number 2

path

Alias for field number 0

Module contents