imio.pyutils 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,370 @@
1
+ Metadata-Version: 2.1
2
+ Name: imio.pyutils
3
+ Version: 1.1.0
4
+ Summary: Some python useful methods
5
+ Home-page: https://github.com/imio/imio.pyutils/
6
+ Author: IMIO
7
+ Author-email: support@imio.be
8
+ License: GPL
9
+ Project-URL: PyPI, https://pypi.python.org/pypi/imio.pyutils
10
+ Project-URL: Source, https://github.com/imio/imio.pyutils
11
+ Keywords: Python IMIO
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: License :: OSI Approved :: GNU General Public License (GPL)
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 2.7
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Requires-Dist: setuptools
19
+ Requires-Dist: future
20
+ Requires-Dist: requests
21
+ Requires-Dist: six >=1.16.0
22
+
23
+ .. image:: https://github.com/IMIO/imio.pyutils/actions/workflows/main.yml/badge.svg?branch=master
24
+ :target: https://github.com/IMIO/imio.pyutils/actions/workflows/main.yml
25
+
26
+ .. image:: https://coveralls.io/repos/github/IMIO/imio.pyutils/badge.svg
27
+ :target: https://coveralls.io/github/IMIO/imio.pyutils
28
+
29
+ .. image:: http://img.shields.io/pypi/v/imio.pyutils.svg
30
+ :alt: PyPI badge
31
+ :target: https://pypi.org/project/imio.pyutils
32
+
33
+ .. contents::
34
+
35
+ Introduction
36
+ ============
37
+
38
+ This package provides python useful methods.
39
+
40
+ It relates to following kinds of operations:
41
+
42
+ 1) System level operations (system.py)
43
+
44
+ It provides helper methods to:
45
+
46
+ * read and write files,
47
+ * read directories,
48
+ * execute commands,
49
+ * store and load list and dict,
50
+ * trace printing,
51
+ * creating temporary files,
52
+ * etc.
53
+
54
+ 2) Various python helpers (utils.py)
55
+
56
+ About:
57
+
58
+ * ordereddict and dict manipulations
59
+ * list manipulations
60
+ * duration recording
61
+
62
+ 3) BeautifulSoup methods (bs.py)
63
+
64
+ * remove elements
65
+ * remove attributes
66
+ * remove comments
67
+ * replace entire strings
68
+ * unwrap tags
69
+
70
+ 4) Postgres level operations (postgres.py). It requires psycopg2 egg !
71
+
72
+ It provides helper methods to:
73
+
74
+ * single or multiple select,
75
+ * insert, update, delete rows,
76
+ * etc.
77
+
78
+ Tests
79
+ =====
80
+
81
+ Can be run with: `bin/python -m unittest discover`
82
+
83
+ Changelog
84
+ =========
85
+
86
+ 1.1.0 (2024-09-17)
87
+ ------------------
88
+
89
+ - Added `utils.add_key_if_value` to add a key in a dic only if value or is not None.
90
+ [sgeulette]
91
+ - Moved `batching.batch_delete_files` from imio.helpers to be used commonly.
92
+ [sgeulette]
93
+
94
+ 1.0.4 (2024-06-11)
95
+ ------------------
96
+
97
+ - Blacked files.
98
+ [sgeulette]
99
+ - Added `system.post_request` to send a POST request.
100
+ [sgeulette]
101
+
102
+ 1.0.3 (2024-05-24)
103
+ ------------------
104
+
105
+ - Fix bad release for python2.
106
+ [aduchene]
107
+
108
+ 1.0.2 (2024-05-15)
109
+ ------------------
110
+
111
+ - Added a new helper `utils.get_ordinal_clusters` to cluster ordinal numbers based on an offset.
112
+ [aduchene]
113
+
114
+ 1.0.1 (2024-04-08)
115
+ ------------------
116
+
117
+ - Added patterns parameter in `system.read_dir_filter`.
118
+ [sgeulette]
119
+ - Returned original filename in `system.hashed_filename` if string to hash is empty.
120
+ [sgeulette]
121
+
122
+ 1.0.0 (2024-03-05)
123
+ ------------------
124
+
125
+ - Require `six>=1.16.0`.
126
+ [sgeulette]
127
+ - Added `system.hashed_filename` to get a new filename differentiated by a hashed string.
128
+ [sgeulette]
129
+
130
+ 1.0.0a1 (2024-02-08)
131
+ --------------------
132
+
133
+ - Handled set in `load_var`.
134
+ [sgeulette]
135
+ - Added `load_pickle` and `dump_pickle`
136
+ [sgeulette]
137
+ - Improved `bs.is_empty`
138
+ [sgeulette]
139
+
140
+ 1.0.0a (2023-11-28)
141
+ -------------------
142
+
143
+ - Made py2 and py3 compliant
144
+ [sgeulette]
145
+ - Improved `utils_safe_encode`
146
+ [sgeulette]
147
+ - Added `bs.is_empty` function.
148
+ [sgeulette]
149
+ - Added `bs.remove_some_childrens` function.
150
+ [sgeulette]
151
+ - Added `bs.replace_strings_by_pattern` function
152
+ [sgeulette]
153
+ - Added `exclude_patterns` parameter in `system.read_recursive_dir`
154
+ [sgeulette]
155
+
156
+ 0.31 (2023-09-26)
157
+ -----------------
158
+
159
+ - Added `utils.listify` that will make sure a given value
160
+ is always returned as list-like iterable.
161
+ [gbastien]
162
+ - Improved `system.get_git_tag` with new parameter to get last tag from all branches
163
+ [sgeulette]
164
+ - Added `utils.radix_like_starting_1` to get list of positional numbers following a given base but starting with 1
165
+ [sgeulette]
166
+ - Added `utils.letters_sequence` to get a letters string corresponding to nth position
167
+ [sgeulette]
168
+
169
+ 0.30 (2023-07-24)
170
+ -----------------
171
+
172
+ - Added `system.read_recursive_dir` to get files recursively (with relative or full name).
173
+ [sgeulette]
174
+
175
+ 0.29 (2023-05-12)
176
+ -----------------
177
+
178
+ - Improved `utils.all_of_dict_values` to include optionally a label.
179
+ [sgeulette]
180
+ - Added `setup_logger` to modify a given logger independently
181
+ [sgeulette]
182
+ - Added `full_path` to prefix filename with path if necessary
183
+ [sgeulette]
184
+
185
+ 0.28 (2023-03-29)
186
+ -----------------
187
+
188
+ - Added `utils.one_of_dict_values` that gives the first non empty value of a list of keys.
189
+ [sgeulette]
190
+ - Added `utils.all_of_dict_values` that returns a not empty values list from a dict following a keys list
191
+ [sgeulette]
192
+
193
+ 0.27 (2023-02-27)
194
+ -----------------
195
+
196
+ - Added `utils.sort_by_indexes` that will sort a list of values
197
+ depending on a list of indexes.
198
+ [gbastien]
199
+
200
+ 0.26 (2022-12-12)
201
+ -----------------
202
+
203
+ - Added `stop` to print error and exit.
204
+ [sgeulette]
205
+
206
+ 0.25 (2022-09-16)
207
+ -----------------
208
+
209
+ - Added `get_git_tag`.
210
+ [sgeulette]
211
+
212
+ 0.24 (2022-08-19)
213
+ -----------------
214
+
215
+ - Added `utils.time_start` and `utils.time_elapsed` to print elapsed time from start.
216
+ Intended to be easily used when debugging...
217
+ [sgeulette]
218
+
219
+ 0.23 (2022-07-01)
220
+ -----------------
221
+
222
+ - Added `utils.append` to append a value and return it.
223
+ [sgeulette]
224
+
225
+ 0.22 (2022-04-28)
226
+ -----------------
227
+
228
+ - Added `utils.get_clusters` to display a list of number grouped by clusters.
229
+ [gbastien]
230
+
231
+ 0.21 (2022-04-26)
232
+ -----------------
233
+
234
+ - Added `utils.merge_dicts` to be able to merge several dicts for which values
235
+ are list, list are extended in final result.
236
+ [gbastien]
237
+
238
+ 0.20 (2022-02-10)
239
+ -----------------
240
+
241
+ - Modified `memory` to return more useful information.
242
+ [sgeulette]
243
+
244
+ 0.19 (2022-01-21)
245
+ -----------------
246
+
247
+ - Added `process_memory` to return current process memory.
248
+ [sgeulette]
249
+ - Added `memory` to return RAM information.
250
+ [sgeulette]
251
+
252
+ 0.18 (2022-01-12)
253
+ -----------------
254
+
255
+ - Made `insert_in_ordereddict` python3 compatible.
256
+ [sgeulette]
257
+ - Added `odict_pos_key` to get key at position in ordereddict.
258
+ [sgeulette]
259
+
260
+ 0.17 (2022-01-04)
261
+ -----------------
262
+
263
+ - Added `timed` and `ftimed` functions.
264
+ [sgeulette]
265
+ - Added OrderedDict for load_var function
266
+ [sgeulette]
267
+
268
+ 0.16 (2021-10-27)
269
+ -----------------
270
+
271
+ - Added `iterable_as_list_of_list` function.
272
+ [sgeulette]
273
+ - Added date in runCommand output
274
+ [sgeulette]
275
+
276
+ 0.15 (2021-04-27)
277
+ -----------------
278
+
279
+ - Added `ln_key` parameter in `read_dictcsv` method.
280
+ [sgeulette]
281
+
282
+ 0.14 (2021-04-21)
283
+ -----------------
284
+
285
+ - Added `read_dictcsv` function.
286
+ [sgeulette]
287
+ - Added `utils.replace_in_list` function to ease replacement of values in a list.
288
+ [gbastien]
289
+ - Added `safe_encode` function.
290
+ [sgeulette]
291
+
292
+ 0.13 (2020-10-07)
293
+ -----------------
294
+
295
+ - Added `insert_in_ordereddict` function to easier insert a new key at needed position.
296
+ [sgeulette]
297
+
298
+ 0.12 (2020-05-19)
299
+ -----------------
300
+
301
+ - Update syntax for py 3.
302
+ [odelaere]
303
+
304
+ 0.11 (2018-10-12)
305
+ -----------------
306
+
307
+ - Added warning log level function
308
+ [odelaere]
309
+
310
+ 0.10 (2018-07-23)
311
+ -----------------
312
+
313
+ - Added to_skip parameter in read_dir functions.
314
+ [sgeulette]
315
+
316
+ 0.9 (2017-07-28)
317
+ ----------------
318
+
319
+ - Added read_csv function.
320
+ [sgeulette]
321
+
322
+ 0.8 (2017-07-19)
323
+ ----------------
324
+
325
+ - runCommand can append to file.
326
+ [sgeulette]
327
+
328
+ 0.7 (2017-06-26)
329
+ ----------------
330
+
331
+ - Just release on pypi for collective.documentgenerator.
332
+ [sgeulette]
333
+
334
+ 0.6 (2017-02-08)
335
+ ----------------
336
+
337
+ - runCommand: return as third value the return code of the command.
338
+ [sgeulette]
339
+
340
+ 0.5 (2017-02-08)
341
+ ----------------
342
+
343
+ - Added outfile parameter to runCommand.
344
+ [sgeulette]
345
+
346
+ 0.4 (2016-12-07)
347
+ ----------------
348
+
349
+ - Added param to get only files in dir.
350
+ [sgeulette]
351
+ - Added methods for bs4 (beautifulsoup)
352
+ [sgeulette]
353
+
354
+ 0.3 (2016-09-21)
355
+ ----------------
356
+
357
+ - Return empty list when file doesn't exist.
358
+ [sgeulette]
359
+
360
+ 0.2 (2016-04-15)
361
+ ----------------
362
+
363
+ - Added options on read_file.
364
+ [sgeulette]
365
+
366
+ 0.1 (2015-06-03)
367
+ ----------------
368
+
369
+ - Initial release.
370
+ [sgeulette]
@@ -0,0 +1,13 @@
1
+ imio.pyutils-1.1.0-py3.11-nspkg.pth,sha256=XTPlQ7ZZOJ9eevOTxBxBdF9Aj2jiqvd7Y7Vv5Sy8VA4,457
2
+ imio/pyutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ imio/pyutils/batching.py,sha256=o3snckmwugfYLFezj9uPMuJGQeL9W_7TPUxQtA7XQYo,1462
4
+ imio/pyutils/bs.py,sha256=Ans2_udSbate7jUyyM6imIe9wAnfgtHyjBVv6ySc1oo,3505
5
+ imio/pyutils/postgres.py,sha256=5yjfj_r0flMIE61xo7MMNNQGe9JVvij3o3vCiHNT3bE,4738
6
+ imio/pyutils/system.py,sha256=imFH4clwQz0vr7gDrtA88vvbADvnqhWVDII6G4OV2U0,14492
7
+ imio/pyutils/tests.py,sha256=Uh5x6ZuNRnwurVngnB10EmPzesrUUctLnNeBocDOEE0,12225
8
+ imio/pyutils/utils.py,sha256=4Wow3QYW863-Av2MPoBpmKAvvYhAvtCXGjU1aLJI8bo,11389
9
+ imio.pyutils-1.1.0.dist-info/METADATA,sha256=2HgomtghzFTqL-4rVggmHAhGSkd8qlRZq37IOJ48rfs,8044
10
+ imio.pyutils-1.1.0.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
11
+ imio.pyutils-1.1.0.dist-info/namespace_packages.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
12
+ imio.pyutils-1.1.0.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
13
+ imio.pyutils-1.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (70.1.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ imio