spoc 0.3.2__tar.gz → 0.3.4__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.
- {spoc-0.3.2 → spoc-0.3.4}/PKG-INFO +1 -1
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/__about__.py +1 -1
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/__init__.py +2 -0
- spoc-0.3.4/src/spoc/utils.py +16 -0
- {spoc-0.3.2 → spoc-0.3.4}/.github/workflows/docs.yml +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/.github/workflows/release.yml +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/.gitignore +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/.prettierignore +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/CONTRIBUTING.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/LICENSE +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/README.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/Taskfile.yml +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/.gitignore +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/custom_theme/css/extra.css +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/custom_theme/main.html +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/advanced/lifecycle.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/advanced/plugins.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/advanced/workers.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/api/components.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/api/core-utils.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/api/framework.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/api/importer.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/api/tools.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/api/workers.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/assets/images/logo.png +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/assets/images/title.png +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/contributing.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/core/app-system.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/core/components.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/core/dependencies.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/core/framework.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/core/importer.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/examples/app-example.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/examples/basic.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/getting-started/configuration.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/getting-started/installation.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/getting-started/quick-start.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/docs/index.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/main.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/docs/mkdocs.yml +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/another/__init__.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/another/models.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/another/views.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/auth/__init__.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/auth/models.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/auth/views.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/demo/__init__.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/demo/extras.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/demo/models.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/demo/views.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/other/__init__.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/other/models.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/apps/other/views.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/config/__init__.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/config/settings.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/config/spoc.toml +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/framework/__init__.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/framework/framework.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/main.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/examples/workers.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/pyproject.toml +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/case_style.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/components.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/core/__init__.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/core/config_loader.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/core/exceptions.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/core/importer.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/core/logging_utils.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/core/singleton.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/core/toml_core.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/core/utils.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/framework.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/inject_apps.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/tools.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/types.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/src/spoc/workers.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/tests/TEST.md +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/tests/__init__.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/tests/test_components.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/tests/test_config_loader.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/tests/test_importer.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/tests/test_singleton.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/tests/test_tools.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/tests/test_workers.py +0 -0
- {spoc-0.3.2 → spoc-0.3.4}/uv.lock +0 -0
|
@@ -23,6 +23,7 @@ from .core.utils import DependencyGraph
|
|
|
23
23
|
from .framework import Config, Framework, Hook, Schema
|
|
24
24
|
from .inject_apps import inject_apps
|
|
25
25
|
from .case_style import case_style
|
|
26
|
+
from .utils import get_info
|
|
26
27
|
|
|
27
28
|
__all__ = [
|
|
28
29
|
# Framework Utilities
|
|
@@ -34,6 +35,7 @@ __all__ = [
|
|
|
34
35
|
"Importer",
|
|
35
36
|
# Components
|
|
36
37
|
"Components",
|
|
38
|
+
"get_info",
|
|
37
39
|
# Exceptions
|
|
38
40
|
"SpocError",
|
|
39
41
|
"AppNotFoundError",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
utils.py
|
|
4
|
+
|
|
5
|
+
Provides utilities for the SPOC framework.
|
|
6
|
+
"""
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from .components import Internal
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def get_info(obj: Any) -> Internal | None:
|
|
13
|
+
"""
|
|
14
|
+
Get the Component(Info) for a given object.
|
|
15
|
+
"""
|
|
16
|
+
return getattr(obj, "__spoc__", None)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|