luigi.local_target module

LocalTarget provides a concrete implementation of a Target class that uses files on the local file system

class luigi.local_target.atomic_file(path)[source]

Bases: luigi.target.AtomicLocalFile

Simple class that writes to a temp file and moves it on close() Also cleans up the temp file if close is not invoked

move_to_final_destination()[source]
generate_tmp_path(path)[source]
class luigi.local_target.LocalFileSystem[source]

Bases: luigi.target.FileSystem

Wrapper for access to file system operations.

Work in progress - add things as needed.

copy(old_path, new_path, raise_if_exists=False)[source]
exists(path)[source]
mkdir(path, parents=True, raise_if_exists=False)[source]
isdir(path)[source]
listdir(path)[source]
remove(path, recursive=True)[source]
move(old_path, new_path, raise_if_exists=False)[source]

Move file atomically. If source and destination are located on different filesystems, atomicity is approximated but cannot be guaranteed.

class luigi.local_target.LocalTarget(path=None, format=None, is_tmp=False)[source]

Bases: luigi.target.FileSystemTarget

fs = <luigi.local_target.LocalFileSystem object>
makedirs()[source]

Create all parent folders if they do not exist.

open(mode='r')[source]
move(new_path, raise_if_exists=False)[source]
move_dir(new_path)[source]
remove()[source]
copy(new_path, raise_if_exists=False)[source]
fn