avro_to_python.utils package

Submodules

avro_to_python.utils.exceptions module

contains all exceptions raised for package

avro_to_python.utils.paths module

contains functions to helping find file paths

avro_to_python.utils.paths.get_avsc_files(directory: str) → List[str][source]

Gets system paths for all avsc files in a dir

directory: str
dir containing avsc files to be read
paths: list of str
system file paths of avsc files in directory
avro_to_python.utils.paths.get_joined_path(*paths) → str[source]

Gets system paths joined for the current OS

paths: str
paths to be joined
paths: str
joined paths for the current OS
avro_to_python.utils.paths.get_or_create_path(path: str) → None[source]

Gets or created a specified sys path

The python “os.makedirs” recursively makes paths.

path: str
path to be verified or created can be relative or sys path
None
avro_to_python.utils.paths.get_system_path(path: str) → str[source]

gets system path of a file

path: str
local path of a file
syspath: str
system path of a file
avro_to_python.utils.paths.is_avsc_file(path: str) → bool[source]

verifies file is avsc file

TODO: Verify more then just the file path

path: str
path of file to verify
avsc_file_flag: bool
boolean if file is a avsc file
avro_to_python.utils.paths.verify_or_create_namespace_path(rootdir: str, namespace: str) → None[source]

creates namespace structure in file system

rootdir: str
root path to start the namespace
namespace: str
period seperated namespace to create
avro_to_python.utils.paths.verify_path_exists(path: str) → bool[source]

verifies path exists

path: str
path of file to verify
exists_flag: bool
boolean if the file exists or not

Module contents