tse2sql.utils
¶Utilities module.
is_url()
:
Deterime if given string is an url.
ensure_dir()
:
Ensure that a path exists.
download()
:
Download given file in system temporal files folder.
sha256()
:
Calculate SHA256 of given filename.
unzip()
:
Unzip given filename.
get_file()
:
Case-insensitive get file from a directory.
count_lines()
:
Count the number of lines in filename.
tse2sql.utils.
is_url
(url)¶Deterime if given string is an url.
tse2sql.utils.
ensure_dir
(path)¶Ensure that a path exists.
path (str) – Directory path to create.
tse2sql.utils.
download
(url, subdir=None)¶Download given file in system temporal files folder.
tse2sql.utils.
sha256
(filename)¶Calculate SHA256 of given filename.
tse2sql.utils.
unzip
(filename)¶Unzip given filename.
The extraction folder will be determined by the archive filename removing the extension, including it’s parent folder.
tse2sql.utils.
get_file
(search_dir, filename)¶Case-insensitive get file from a directory.