aboutsummaryrefslogtreecommitdiff
path: root/services/manager/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'services/manager/__init__.py')
-rw-r--r--services/manager/__init__.py60
1 files changed, 60 insertions, 0 deletions
diff --git a/services/manager/__init__.py b/services/manager/__init__.py
new file mode 100644
index 0000000..17799a9
--- /dev/null
+++ b/services/manager/__init__.py
@@ -0,0 +1,60 @@
+import sys
+
+from ._base import CRU, CruNamespaceError, CRU_NAME_PREFIXES
+from ._error import (
+ CruException,
+ CruLogicError,
+ CruInternalError,
+ CruUnreachableError,
+ cru_unreachable,
+)
+from ._const import (
+ CruConstantBase,
+ CruDontChange,
+ CruNotFound,
+ CruNoValue,
+ CruPlaceholder,
+ CruUseDefault,
+)
+from ._func import CruFunction
+from ._iter import CruIterable, CruIterator
+from ._event import CruEvent, CruEventHandlerToken
+from ._type import CruTypeSet, CruTypeCheckError
+
+
+class CruInitError(CruException):
+ pass
+
+
+def check_python_version(required_version=(3, 11)):
+ if sys.version_info < required_version:
+ raise CruInitError(f"Python version must be >= {required_version}!")
+
+
+check_python_version()
+
+__all__ = [
+ "CRU",
+ "CruNamespaceError",
+ "CRU_NAME_PREFIXES",
+ "check_python_version",
+ "CruException",
+ "CruInternalError",
+ "CruLogicError",
+ "CruUnreachableError",
+ "cru_unreachable",
+ "CruInitError",
+ "CruConstantBase",
+ "CruDontChange",
+ "CruNotFound",
+ "CruNoValue",
+ "CruPlaceholder",
+ "CruUseDefault",
+ "CruFunction",
+ "CruIterable",
+ "CruIterator",
+ "CruEvent",
+ "CruEventHandlerToken",
+ "CruTypeSet",
+ "CruTypeCheckError",
+]