Package: imio.pyutils
ContentsIntroductionTestsChangelog0.31 (2023-09-26)0.30 (2023-07-24)0.29 (2023-05-12)0.28 (2023-03-29)0.27 (2023-02-27)0.26 (2022-12-12)0.25 (2022-09-16)0.24 (2022-08-19)0.23 (2022-07-01)0.22 (2022-04-28)0.21 (2022-04-26)0.20 (2022-02-10)0.19 (2022-01-21)0.18 (2022-01-12)0.17 (2022-01-04)0.16 (2021-10-27)0.15 (2021-04-27)0.14 (2021-04-21)0.13 (2020-10-07)0.12 (2020-05-19)0.11 (2018-10-12)0.10 (2018-07-23)0.9 (2017-07-28)0.8 (2017-07-19)0.7 (2017-06-26)0.6 (2017-02-08)0.5 (2017-02-08)0.4 (2016-12-07)0.3 (2016-09-21)0.2 (2016-04-15)0.1 (2015-06-03)IntroductionThis package provides python useful methods.It relates to following kinds of operations:System level operations (system.py)It provides helper methods to:read and write files,read directories,execute commands,store and load list and dict,trace printing,creating temporary files,etc.Various python helpers (utils.py)About:ordereddict and dict manipulationslist manipulationsduration recordingBeautifulSoup methods (bs.py)remove elementsremove attributesremove commentsreplace entire stringsunwrap tagsPostgres level operations (postgres.py). It requires psycopg2 egg !It provides helper methods to:single or multiple select,insert, update, delete rows,etc.TestsCan be run with:bin/python -m unittest discoverChangelog0.31 (2023-09-26)Addedutils.listifythat will make sure a given value
is always returned as list-like iterable.
[gbastien]Improvedsystem.get_git_tagwith new parameter to get last tag from all branches
[sgeulette]Addedutils.radix_like_starting_1to get list of positional numbers following a given base but starting with 1
[sgeulette]Addedutils.letters_sequenceto get a letters string corresponding to nth position
[sgeulette]0.30 (2023-07-24)Addedsystem.read_recursive_dirto get files recursively (with relative or full name).
[sgeulette]0.29 (2023-05-12)Improvedutils.all_of_dict_valuesto include optionally a label.
[sgeulette]Addedsetup_loggerto modify a given logger independently
[sgeulette]Addedfull_pathto prefix filename with path if necessary
[sgeulette]0.28 (2023-03-29)Addedutils.one_of_dict_valuesthat gives the first non empty value of a list of keys.
[sgeulette]Addedutils.all_of_dict_valuesthat returns a not empty values list from a dict following a keys list
[sgeulette]0.27 (2023-02-27)Addedutils.sort_by_indexesthat will sort a list of values
depending on a list of indexes.
[gbastien]0.26 (2022-12-12)Addedstopto print error and exit.
[sgeulette]0.25 (2022-09-16)Addedget_git_tag.
[sgeulette]0.24 (2022-08-19)Addedutils.time_startandutils.time_elapsedto print elapsed time from start.
Intended to be easily used when debugging…
[sgeulette]0.23 (2022-07-01)Addedutils.appendto append a value and return it.
[sgeulette]0.22 (2022-04-28)Addedutils.get_clustersto display a list of number grouped by clusters.
[gbastien]0.21 (2022-04-26)Addedutils.merge_dictsto be able to merge several dicts for which values
are list, list are extended in final result.
[gbastien]0.20 (2022-02-10)Modifiedmemoryto return more useful information.
[sgeulette]0.19 (2022-01-21)Addedprocess_memoryto return current process memory.
[sgeulette]Addedmemoryto return RAM information.
[sgeulette]0.18 (2022-01-12)Madeinsert_in_ordereddictpython3 compatible.
[sgeulette]Addedodict_pos_keyto get key at position in ordereddict.
[sgeulette]0.17 (2022-01-04)Addedtimedandftimedfunctions.
[sgeulette]Added OrderedDict for load_var function
[sgeulette]0.16 (2021-10-27)Addediterable_as_list_of_listfunction.
[sgeulette]Added date in runCommand output
[sgeulette]0.15 (2021-04-27)Addedln_keyparameter inread_dictcsvmethod.
[sgeulette]0.14 (2021-04-21)Addedread_dictcsvfunction.
[sgeulette]Addedutils.replace_in_listfunction to ease replacement of values in a list.
[gbastien]Addedsafe_encodefunction.
[sgeulette]0.13 (2020-10-07)Addedinsert_in_ordereddictfunction to easier insert a new key at needed position.
[sgeulette]0.12 (2020-05-19)Update syntax for py 3.
[odelaere]0.11 (2018-10-12)Added warning log level function
[odelaere]0.10 (2018-07-23)Added to_skip parameter in read_dir functions.
[sgeulette]0.9 (2017-07-28)Added read_csv function.
[sgeulette]0.8 (2017-07-19)runCommand can append to file.
[sgeulette]0.7 (2017-06-26)Just release on pypi for collective.documentgenerator.
[sgeulette]0.6 (2017-02-08)runCommand: return as third value the return code of the command.
[sgeulette]0.5 (2017-02-08)Added outfile parameter to runCommand.
[sgeulette]0.4 (2016-12-07)Added param to get only files in dir.
[sgeulette]Added methods for bs4 (beautifulsoup)
[sgeulette]0.3 (2016-09-21)Return empty list when file doesn’t exist.
[sgeulette]0.2 (2016-04-15)Added options on read_file.
[sgeulette]0.1 (2015-06-03)Initial release.
[sgeulette]