ae-base 0.3.39__py3-none-any.whl → 0.3.40__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.
- ae/base.py +22 -5
- {ae_base-0.3.39.dist-info → ae_base-0.3.40.dist-info}/METADATA +5 -5
- ae_base-0.3.40.dist-info/RECORD +7 -0
- ae_base-0.3.39.dist-info/RECORD +0 -7
- {ae_base-0.3.39.dist-info → ae_base-0.3.40.dist-info}/LICENSE.md +0 -0
- {ae_base-0.3.39.dist-info → ae_base-0.3.40.dist-info}/WHEEL +0 -0
- {ae_base-0.3.39.dist-info → ae_base-0.3.40.dist-info}/top_level.txt +0 -0
- {ae_base-0.3.39.dist-info → ae_base-0.3.40.dist-info}/zip-safe +0 -0
ae/base.py
CHANGED
|
@@ -3,7 +3,7 @@ basic constants, helper functions and context manager
|
|
|
3
3
|
=====================================================
|
|
4
4
|
|
|
5
5
|
this module is pure python, has no external dependencies, and is providing base constants, common helper
|
|
6
|
-
functions and context managers.
|
|
6
|
+
functions, useful classes and context managers.
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
base constants
|
|
@@ -24,6 +24,9 @@ the constants :data:`PACKAGE_NAME`, :data:`PACKAGE_DOMAIN` and :data:`PERMISSION
|
|
|
24
24
|
on mobile devices. to avoid redundancies, these values get loaded from the
|
|
25
25
|
:data:`build config file <BUILD_CONFIG_FILE>` - if it exists in the current working directory.
|
|
26
26
|
|
|
27
|
+
with the help of the format string constant :data:`NOW_STR_FORMAT` and the function :func:`now_str` you can create a
|
|
28
|
+
sortable and compact string from a timestamp.
|
|
29
|
+
|
|
27
30
|
|
|
28
31
|
base helper functions
|
|
29
32
|
---------------------
|
|
@@ -99,6 +102,15 @@ code and build Kivy apps for the Android OS, and to `Gabriel Pettier <https://gi
|
|
|
99
102
|
osc example.
|
|
100
103
|
|
|
101
104
|
|
|
105
|
+
types, classes and mixins
|
|
106
|
+
-------------------------
|
|
107
|
+
|
|
108
|
+
the :class:`UnsetType` class can be used e.g. for the declaration of optional function and method parameters,
|
|
109
|
+
allowing also `None` is an accepted argument value.
|
|
110
|
+
|
|
111
|
+
to extend any class with an intelligent error message property, add the mixin :class:`ErrorMsgMixin` to it.
|
|
112
|
+
|
|
113
|
+
|
|
102
114
|
generic context manager
|
|
103
115
|
-----------------------
|
|
104
116
|
|
|
@@ -148,7 +160,7 @@ from types import ModuleType
|
|
|
148
160
|
from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Tuple, Union, cast
|
|
149
161
|
|
|
150
162
|
|
|
151
|
-
__version__ = '0.3.
|
|
163
|
+
__version__ = '0.3.40'
|
|
152
164
|
|
|
153
165
|
|
|
154
166
|
DOCS_FOLDER = 'docs' #: project documentation root folder name
|
|
@@ -202,7 +214,9 @@ _env_variable = re.compile(r"""
|
|
|
202
214
|
""", re.IGNORECASE | re.VERBOSE)
|
|
203
215
|
|
|
204
216
|
|
|
205
|
-
NAME_PARTS_SEP = '_'
|
|
217
|
+
NAME_PARTS_SEP = '_' #: name parts separator character, e.g. for :func:`norm_name`
|
|
218
|
+
|
|
219
|
+
NOW_STR_FORMAT = "{sep}%Y%m%d{sep}%H%M%S{sep}%f" #: timestamp format of :func:`now_str`
|
|
206
220
|
|
|
207
221
|
SKIPPED_MODULES = ('ae.base', 'ae.paths', 'ae.dynamicod', 'ae.core', 'ae.console', 'ae.gui_app', 'ae.gui_help',
|
|
208
222
|
'ae.kivy', 'ae.kivy.apps', 'ae.kivy.behaviors', 'ae.kivy.i18n', 'ae.kivy.tours', 'ae.kivy.widgets',
|
|
@@ -612,9 +626,12 @@ def now_str(sep: str = "") -> str:
|
|
|
612
626
|
|
|
613
627
|
:param sep: optional prefix and separator character (separating date from time and in time part
|
|
614
628
|
the seconds from the microseconds).
|
|
615
|
-
:return: UTC timestamp as string (length=20 + 3 * len(sep)).
|
|
629
|
+
:return: naive UTC timestamp (without timezone info) as string (length=20 + 3 * len(sep)).
|
|
616
630
|
"""
|
|
617
|
-
|
|
631
|
+
# if sys.version_info >= (3, 12):
|
|
632
|
+
return datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None).strftime(NOW_STR_FORMAT.format(sep=sep))
|
|
633
|
+
# else:
|
|
634
|
+
# return datetime.datetime.utcnow().strftime(NOW_STR_FORMAT.format(sep=sep))
|
|
618
635
|
|
|
619
636
|
|
|
620
637
|
def os_host_name() -> str:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ae_base
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.40
|
|
4
4
|
Summary: ae namespace module portion base: basic constants, helper functions and context manager
|
|
5
5
|
Home-page: https://gitlab.com/ae-group/ae_base
|
|
6
6
|
Author: AndiEcker
|
|
@@ -53,17 +53,17 @@ Requires-Dist: twine; extra == "tests"
|
|
|
53
53
|
|
|
54
54
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.94 -->
|
|
55
55
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->
|
|
56
|
-
# base 0.3.
|
|
56
|
+
# base 0.3.40
|
|
57
57
|
|
|
58
58
|
[](
|
|
59
59
|
https://gitlab.com/ae-group/ae_base)
|
|
60
60
|
[](
|
|
62
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.39)
|
|
63
63
|
[](
|
|
64
64
|
https://pypi.org/project/ae-base/#history)
|
|
65
65
|
|
|
66
|
-
>ae_base module 0.3.
|
|
66
|
+
>ae_base module 0.3.40.
|
|
67
67
|
|
|
68
68
|
[](
|
|
69
69
|
https://ae-group.gitlab.io/ae_base/coverage/index.html)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ae/base.py,sha256=-_eBIIgBgO1opcu_GlqDB1qQOU0qzuUvKUd1YM0hT5c,55971
|
|
2
|
+
ae_base-0.3.40.dist-info/LICENSE.md,sha256=3X7IwvwQFt4PqRHb7mV8qoJjQ1E-HmcGioyT4Y6-6c8,35002
|
|
3
|
+
ae_base-0.3.40.dist-info/METADATA,sha256=Mvak-VG2CUOXlP0lNF5wi2UuQSSkdPm8WdS5FsUwL5g,5219
|
|
4
|
+
ae_base-0.3.40.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
5
|
+
ae_base-0.3.40.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
|
|
6
|
+
ae_base-0.3.40.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
|
+
ae_base-0.3.40.dist-info/RECORD,,
|
ae_base-0.3.39.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
ae/base.py,sha256=aA_qa4s-17EzXKjN9wwfya688eGnFNJP0EglSLeYJjw,55182
|
|
2
|
-
ae_base-0.3.39.dist-info/LICENSE.md,sha256=3X7IwvwQFt4PqRHb7mV8qoJjQ1E-HmcGioyT4Y6-6c8,35002
|
|
3
|
-
ae_base-0.3.39.dist-info/METADATA,sha256=YPZbM4qKqfaO-3WvDLvV77O9WNWOfxg6uxhkO7nu0vA,5219
|
|
4
|
-
ae_base-0.3.39.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
5
|
-
ae_base-0.3.39.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
|
|
6
|
-
ae_base-0.3.39.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
|
-
ae_base-0.3.39.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|