airflow.providers.samba.hooks.samba

Module Contents

Classes

SambaHook

Allows for interaction with a Samba server.

class airflow.providers.samba.hooks.samba.SambaHook(samba_conn_id=default_conn_name, share=None)[source]

Bases: airflow.hooks.base.BaseHook

Allows for interaction with a Samba server.

The hook should be used as a context manager in order to correctly set up a session and disconnect open connections upon exit.

Parameters
  • samba_conn_id (str) -- The connection id reference.

  • share (Optional[str]) -- An optional share name. If this is unset then the "schema" field of the connection is used in its place.

conn_name_attr = samba_conn_id[source]
default_conn_name = samba_default[source]
conn_type = samba[source]
hook_name = Samba[source]
__enter__(self)[source]
__exit__(self, exc_type, exc_value, traceback)[source]
listdir(self, path)[source]
lstat(self, path)[source]
makedirs(self, path, exist_ok=False)[source]
mkdir(self, path)[source]
open_file(self, path, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, share_access=None, desired_access=None, file_attributes=None, file_type='file')[source]
remove(self, path)[source]
removedirs(self, path)[source]
rename(self, src, dst)[source]
replace(self, src, dst)[source]
rmdir(self, path)[source]
scandir(self, path, search_pattern='*')[source]
stat(self, path, follow_symlinks=True)[source]
stat_volume(self, path)[source]
truncate(self, path, length)[source]
utime(self, path, times=None, ns=None, follow_symlinks=True)[source]
walk(self, path, topdown=True, onerror=None, follow_symlinks=False)[source]
getxattr(self, path, attribute, follow_symlinks=True)[source]
listxattr(self, path, follow_symlinks=True)[source]
removexattr(self, path, attribute, follow_symlinks=True)[source]
setxattr(self, path, attribute, value, flags=0, follow_symlinks=True)[source]
push_from_local(self, destination_filepath, local_filepath)[source]

Push local file to samba server

Was this entry helpful?