ephaptic 0.2.5__tar.gz → 0.2.7__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.
- {ephaptic-0.2.5 → ephaptic-0.2.7}/PKG-INFO +1 -1
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/cli/__main__.py +10 -2
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/ephaptic.py +3 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic.egg-info/PKG-INFO +1 -1
- {ephaptic-0.2.5 → ephaptic-0.2.7}/pyproject.toml +1 -1
- {ephaptic-0.2.5 → ephaptic-0.2.7}/LICENSE +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/README.md +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/__init__.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/adapters/__init__.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/adapters/fastapi_.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/adapters/quart_.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/cli/__init__.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/client/__init__.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/client/client.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/localproxy.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/transports/__init__.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/transports/fastapi_ws.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic/transports/websocket.py +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic.egg-info/SOURCES.txt +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic.egg-info/dependency_links.txt +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic.egg-info/entry_points.txt +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic.egg-info/requires.txt +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/ephaptic.egg-info/top_level.txt +0 -0
- {ephaptic-0.2.5 → ephaptic-0.2.7}/setup.cfg +0 -0
|
@@ -95,10 +95,11 @@ def generate(
|
|
|
95
95
|
|
|
96
96
|
method_schema = {
|
|
97
97
|
"args": {},
|
|
98
|
-
"return": None
|
|
98
|
+
"return": None,
|
|
99
|
+
"required": [],
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
for param_name in sig.parameters:
|
|
102
|
+
for param_name, param in sig.parameters.items():
|
|
102
103
|
hint = hints.get(param_name, typing.Any)
|
|
103
104
|
adapter = TypeAdapter(hint)
|
|
104
105
|
|
|
@@ -107,6 +108,13 @@ def generate(
|
|
|
107
108
|
schema_output["definitions"],
|
|
108
109
|
)
|
|
109
110
|
|
|
111
|
+
if param.default == inspect.Parameter.empty:
|
|
112
|
+
method_schema["required"].append(param_name)
|
|
113
|
+
else:
|
|
114
|
+
method_schema["args"][param_name]["default"] = str(param.default)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
110
118
|
return_hint = hints.get("return", typing.Any)
|
|
111
119
|
if return_hint is not type(None):
|
|
112
120
|
adapter = TypeAdapter(return_hint)
|
|
@@ -95,14 +95,17 @@ class EphapticTarget:
|
|
|
95
95
|
return emitter
|
|
96
96
|
|
|
97
97
|
def expose(func: Callable):
|
|
98
|
+
global _EXPOSED_FUNCTIONS
|
|
98
99
|
_EXPOSED_FUNCTIONS[func.__name__] = func
|
|
99
100
|
return func
|
|
100
101
|
|
|
101
102
|
def identity_loader(func: Callable):
|
|
103
|
+
global _IDENTITY_LOADER
|
|
102
104
|
_IDENTITY_LOADER = func
|
|
103
105
|
return func
|
|
104
106
|
|
|
105
107
|
def event(model: typing.Type[pydantic.BaseModel]):
|
|
108
|
+
global _EXPOSED_EVENTS
|
|
106
109
|
_EXPOSED_EVENTS[model.__name__] = model
|
|
107
110
|
return model
|
|
108
111
|
|
|
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
|