invesytoolbox 0.0.23__tar.gz → 0.0.24__tar.gz

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.
Files changed (29) hide show
  1. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/HISTORY.md +3 -0
  2. {invesytoolbox-0.0.23/src/invesytoolbox.egg-info → invesytoolbox-0.0.24}/PKG-INFO +6 -3
  3. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/setup.cfg +2 -2
  4. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_data.py +13 -6
  5. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_email_phone.py +1 -0
  6. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24/src/invesytoolbox.egg-info}/PKG-INFO +6 -3
  7. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/LICENSE.txt +0 -0
  8. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/README.md +0 -0
  9. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/setup.py +0 -0
  10. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/__init__.py +0 -0
  11. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_date_time.py +0 -0
  12. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_html.py +0 -0
  13. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_locales.py +0 -0
  14. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_restricted_python.py +0 -0
  15. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_security.py +0 -0
  16. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_text_name.py +0 -0
  17. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox/itb_www.py +0 -0
  18. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox.egg-info/SOURCES.txt +0 -0
  19. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox.egg-info/dependency_links.txt +0 -0
  20. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox.egg-info/requires.txt +0 -0
  21. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/invesytoolbox.egg-info/top_level.txt +0 -0
  22. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/tests/__init__.py +0 -0
  23. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/tests/test_data.py +0 -0
  24. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/tests/test_date_time.py +0 -0
  25. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/tests/test_email_phone.py +0 -0
  26. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/tests/test_html.py +0 -0
  27. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/tests/test_locales.py +0 -0
  28. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/tests/test_text_name.py +0 -0
  29. {invesytoolbox-0.0.23 → invesytoolbox-0.0.24}/src/tests/test_www.py +0 -0
@@ -1,4 +1,7 @@
1
1
  # History
2
+ ## 0.0.24 (2024-09-29)
3
+ **timezone** can be passed as an argument to **dictlist_2datatypes** and **dict_2datatypes**
4
+
2
5
  ## 0.0.23 (2024-07-22)
3
6
  * **adjust_spaces_on_punctuation**: inserts narrow (or normal spaces) for certain languages
4
7
  * **value_2datatype**:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: invesytoolbox
3
- Version: 0.0.23
3
+ Version: 0.0.24
4
4
  Summary: Tools for Python scripts or terminal
5
5
  Home-page: https://gitlab.com/Rastaf/invesytoolbox
6
6
  Author: Georg Pfolz
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: License :: OSI Approved :: MIT License
18
18
  Classifier: Operating System :: OS Independent
19
- Requires-Python: >=3.7
19
+ Requires-Python: <3.12,>=3.7
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE.txt
22
22
  Requires-Dist: bs4
@@ -44,6 +44,9 @@ That's also why all date and time functions also take into account the old DateT
44
44
  The documentation can be found [here](https://rastaf.gitlab.io/invesytoolbox/).
45
45
 
46
46
  # History
47
+ ## 0.0.24 (2024-09-29)
48
+ **timezone** can be passed as an argument to **dictlist_2datatypes** and **dict_2datatypes**
49
+
47
50
  ## 0.0.23 (2024-07-22)
48
51
  * **adjust_spaces_on_punctuation**: inserts narrow (or normal spaces) for certain languages
49
52
  * **value_2datatype**:
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = invesytoolbox
3
- version = 0.0.23
3
+ version = 0.0.24
4
4
  author = Georg Pfolz
5
5
  author_email = georg.pfolz@invesy.at
6
6
  description = Tools for Python scripts or terminal
@@ -26,7 +26,7 @@ classifiers =
26
26
  package_dir =
27
27
  = src
28
28
  packages = find:
29
- python_requires = >=3.7
29
+ python_requires = >=3.7,<3.12
30
30
  install_requires =
31
31
  bs4
32
32
  babel
@@ -36,7 +36,7 @@ def any_2boolean(
36
36
  def dict_from_dict_list(
37
37
  dict_list: List[dict],
38
38
  key: str,
39
- single_value: Optional[bool] = None,
39
+ single_value: Optional[str] = None,
40
40
  include_key: Optional[bool] = False
41
41
  ) -> dict:
42
42
  """ Create a dictionary from a list of dictionaries
@@ -155,7 +155,8 @@ def dict_2datatypes(
155
155
  convert_keys: bool = False,
156
156
  convert_to_unicode: bool = False,
157
157
  dt: str = 'datetime',
158
- fmt: str = None
158
+ fmt: str = None,
159
+ timezone: str = 'local'
159
160
  ) -> Dict[Any, Any]:
160
161
  """ Convert all data of a dictionary to specific (json metadata) or guessed types
161
162
 
@@ -175,6 +176,7 @@ def dict_2datatypes(
175
176
  - pendulum
176
177
  - default: datetime, because it's Python's default
177
178
  :param fmt: format for datetime parsing
179
+ :param timezone: default is 'local', other options are 'UTC' or 'Europe/Vienna'
178
180
  """
179
181
 
180
182
  if convert_keys:
@@ -190,7 +192,8 @@ def dict_2datatypes(
190
192
  key=key,
191
193
  convert_to_unicode=convert_to_unicode,
192
194
  dt=dt,
193
- fmt=fmt
195
+ fmt=fmt,
196
+ timezone=timezone
194
197
  )
195
198
  for key, val in d.items()
196
199
  } # dict comprehension
@@ -202,7 +205,8 @@ def dict_2datatypes(
202
205
  key=key,
203
206
  convert_to_unicode=convert_to_unicode,
204
207
  dt=dt,
205
- fmt=fmt
208
+ fmt=fmt,
209
+ timezone=timezone
206
210
  )
207
211
  for key, val in d.items()
208
212
  } # dict comprehension
@@ -214,7 +218,8 @@ def dictlist_2datatypes(
214
218
  convert_keys: bool = False,
215
219
  convert_to_unicode: bool = False,
216
220
  dt: str = 'datetime',
217
- fmt: str = None
221
+ fmt: str = None,
222
+ timezone: str = 'local'
218
223
  ) -> list:
219
224
  """ Convert all data of a list of dictionaries to specific (json metadata) or guessed types
220
225
 
@@ -234,6 +239,7 @@ def dictlist_2datatypes(
234
239
  - pendulum
235
240
  - default: datetime, because it's Python's default
236
241
  :param fmt: format for datetime parsing
242
+ :param timezone: default is 'local', other options are 'UTC' or 'Europe/Vienna'
237
243
  """
238
244
  return [
239
245
  dict_2datatypes(
@@ -242,7 +248,8 @@ def dictlist_2datatypes(
242
248
  convert_keys=convert_keys,
243
249
  convert_to_unicode=convert_to_unicode,
244
250
  dt=dt,
245
- fmt=fmt
251
+ fmt=fmt,
252
+ timezone=timezone
246
253
  )
247
254
  for dic
248
255
  in dictlist
@@ -10,6 +10,7 @@ import phonenumbers
10
10
  from email.mime.multipart import MIMEMultipart
11
11
  from email.mime.text import MIMEText
12
12
  from email import encoders
13
+ from email.header import Header
13
14
  from email.mime.base import MIMEBase
14
15
 
15
16
  from itb_locales import get_locale
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: invesytoolbox
3
- Version: 0.0.23
3
+ Version: 0.0.24
4
4
  Summary: Tools for Python scripts or terminal
5
5
  Home-page: https://gitlab.com/Rastaf/invesytoolbox
6
6
  Author: Georg Pfolz
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: License :: OSI Approved :: MIT License
18
18
  Classifier: Operating System :: OS Independent
19
- Requires-Python: >=3.7
19
+ Requires-Python: <3.12,>=3.7
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE.txt
22
22
  Requires-Dist: bs4
@@ -44,6 +44,9 @@ That's also why all date and time functions also take into account the old DateT
44
44
  The documentation can be found [here](https://rastaf.gitlab.io/invesytoolbox/).
45
45
 
46
46
  # History
47
+ ## 0.0.24 (2024-09-29)
48
+ **timezone** can be passed as an argument to **dictlist_2datatypes** and **dict_2datatypes**
49
+
47
50
  ## 0.0.23 (2024-07-22)
48
51
  * **adjust_spaces_on_punctuation**: inserts narrow (or normal spaces) for certain languages
49
52
  * **value_2datatype**:
File without changes
File without changes