appier 1.34.6__py2.py3-none-any.whl → 1.34.8__py2.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.
- appier/__init__.py +1 -1
- appier/api.py +10 -0
- appier/asgi.py +10 -0
- appier/async_neo.py +2 -2
- appier/async_old.py +1 -1
- appier/base.py +15 -2
- appier/bus.py +10 -0
- appier/config.py +409 -401
- appier/data.py +2 -0
- appier/exceptions.py +450 -442
- appier/http.py +1292 -1283
- appier/model.py +7 -2
- appier/mongo.py +24 -0
- appier/scheduler.py +342 -334
- appier/test/data.py +10 -0
- appier/test/error_handler.py +142 -0
- appier/test/exception_handler.py +146 -0
- appier/test/http.py +24 -0
- appier/test/tags.py +109 -0
- appier/util.py +2517 -2503
- {appier-1.34.6.dist-info → appier-1.34.8.dist-info}/METADATA +1 -1
- {appier-1.34.6.dist-info → appier-1.34.8.dist-info}/RECORD +25 -22
- {appier-1.34.6.dist-info → appier-1.34.8.dist-info}/LICENSE +0 -0
- {appier-1.34.6.dist-info → appier-1.34.8.dist-info}/WHEEL +0 -0
- {appier-1.34.6.dist-info → appier-1.34.8.dist-info}/top_level.txt +0 -0
appier/__init__.py
CHANGED
appier/api.py
CHANGED
|
@@ -19,6 +19,16 @@
|
|
|
19
19
|
# You should have received a copy of the Apache License along with
|
|
20
20
|
# Hive Appier Framework. If not, see <http://www.apache.org/licenses/>.
|
|
21
21
|
|
|
22
|
+
"""appier.api
|
|
23
|
+
|
|
24
|
+
High-level client-side companion to Appier's App.
|
|
25
|
+
Provides the `API` base class with HTTP helpers, signing and retries.
|
|
26
|
+
Simplifies GET, POST and other verbs while handling ordered params.
|
|
27
|
+
Integrates logging, configuration and observer event hooks.
|
|
28
|
+
Supports authentication callbacks, singleton pattern and timeouts.
|
|
29
|
+
Adopted by SDKs to wrap REST or RPC endpoints in a uniform way.
|
|
30
|
+
"""
|
|
31
|
+
|
|
22
32
|
__author__ = "João Magalhães <joamag@hive.pt>"
|
|
23
33
|
""" The author(s) of the module """
|
|
24
34
|
|
appier/asgi.py
CHANGED
|
@@ -19,6 +19,16 @@
|
|
|
19
19
|
# You should have received a copy of the Apache License along with
|
|
20
20
|
# Hive Appier Framework. If not, see <http://www.apache.org/licenses/>.
|
|
21
21
|
|
|
22
|
+
"""appier.asgi
|
|
23
|
+
|
|
24
|
+
ASGI integration layer enabling async deployment of Appier apps.
|
|
25
|
+
Provides `ASGIApp` adapter that converts requests to async workflow.
|
|
26
|
+
Implements `asgi_entry` plus helpers to serve with uvicorn, hypercorn,
|
|
27
|
+
and daphne with optional live-reload and TLS support.
|
|
28
|
+
Bridges ASGI scope, receive and send to Appier's response mechanics.
|
|
29
|
+
Lets developers leverage HTTP/2, WebSockets and asyncio concurrency.
|
|
30
|
+
"""
|
|
31
|
+
|
|
22
32
|
__author__ = "João Magalhães <joamag@hive.pt>"
|
|
23
33
|
""" The author(s) of the module """
|
|
24
34
|
|
appier/async_neo.py
CHANGED
|
@@ -92,7 +92,7 @@ class CoroutineWrapper(object):
|
|
|
92
92
|
self._buffer.append(value)
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
class
|
|
95
|
+
class AsyncgenWrapper(object):
|
|
96
96
|
def __init__(self, async_iter):
|
|
97
97
|
self.async_iter = async_iter
|
|
98
98
|
self.current = None
|
|
@@ -149,7 +149,7 @@ def ensure_generator(value):
|
|
|
149
149
|
if hasattr(inspect, "isasyncgen") and inspect.isasyncgen(
|
|
150
150
|
value
|
|
151
151
|
): # @UndefinedVariable
|
|
152
|
-
return True,
|
|
152
|
+
return True, AsyncgenWrapper(value)
|
|
153
153
|
|
|
154
154
|
return False, value
|
|
155
155
|
|
appier/async_old.py
CHANGED
appier/base.py
CHANGED
|
@@ -19,6 +19,16 @@
|
|
|
19
19
|
# You should have received a copy of the Apache License along with
|
|
20
20
|
# Hive Appier Framework. If not, see <http://www.apache.org/licenses/>.
|
|
21
21
|
|
|
22
|
+
"""appier.base
|
|
23
|
+
|
|
24
|
+
Core module of the Appier framework providing the App class and helpers.
|
|
25
|
+
Handles HTTP/ASGI lifecycle, routing, configuration, logging and events.
|
|
26
|
+
Includes utilities for caching, background scheduling and compression.
|
|
27
|
+
Serves as the foundation on which controllers, models and plugins build.
|
|
28
|
+
Applications subclass App to create fully featured web or API services.
|
|
29
|
+
All other framework modules assume the functionality defined here.
|
|
30
|
+
"""
|
|
31
|
+
|
|
22
32
|
__author__ = "João Magalhães <joamag@hive.pt>"
|
|
23
33
|
""" The author(s) of the module """
|
|
24
34
|
|
|
@@ -94,7 +104,7 @@ NAME = "appier"
|
|
|
94
104
|
""" The name to be used to describe the framework while working
|
|
95
105
|
on its own environment, this is just a descriptive value """
|
|
96
106
|
|
|
97
|
-
VERSION = "1.34.
|
|
107
|
+
VERSION = "1.34.8"
|
|
98
108
|
""" The version of the framework that is currently installed
|
|
99
109
|
this value may be used for debugging/diagnostic purposes """
|
|
100
110
|
|
|
@@ -6138,7 +6148,10 @@ class App(
|
|
|
6138
6148
|
continue
|
|
6139
6149
|
if _handler[1] and not scope == _handler[1]:
|
|
6140
6150
|
continue
|
|
6141
|
-
if
|
|
6151
|
+
# if the handler has explicitly defined to handle JSON
|
|
6152
|
+
# contexts then it should only be used if the JSON flag
|
|
6153
|
+
# is also set to the same value as in the handler
|
|
6154
|
+
if not _handler[2] == None and not json == _handler[2]:
|
|
6142
6155
|
continue
|
|
6143
6156
|
handler = _handler
|
|
6144
6157
|
break
|
appier/bus.py
CHANGED
|
@@ -19,6 +19,16 @@
|
|
|
19
19
|
# You should have received a copy of the Apache License along with
|
|
20
20
|
# Hive Appier Framework. If not, see <http://www.apache.org/licenses/>.
|
|
21
21
|
|
|
22
|
+
"""appier.bus
|
|
23
|
+
|
|
24
|
+
Lightweight event-bus component for decoupled in-app messaging.
|
|
25
|
+
Defines abstract `Bus` plus memory-based and Redis sub-classes.
|
|
26
|
+
Allows components to bind, unbind and trigger named callbacks.
|
|
27
|
+
Redis backend employs pub/sub enabling cross-process broadcasts.
|
|
28
|
+
Serializes handlers so worker processes can reload their state.
|
|
29
|
+
Empowers controllers, schedulers and plugins to coordinate tasks.
|
|
30
|
+
"""
|
|
31
|
+
|
|
22
32
|
__author__ = "João Magalhães <joamag@hive.pt>"
|
|
23
33
|
""" The author(s) of the module """
|
|
24
34
|
|