muffin 0.100.1__py3-none-any.whl → 0.102.0__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.
muffin/manage.py CHANGED
@@ -22,7 +22,7 @@ if TYPE_CHECKING:
22
22
  from .types import TVShellCtx
23
23
 
24
24
  VERSION = metadata.version("muffin")
25
- PARAM_RE = re.compile(r"^\s+:param (\w+): (.+)$", re.M)
25
+ PARAM_RE = re.compile(r"^\s+:param (\w+): (.+)$", re.MULTILINE)
26
26
 
27
27
 
28
28
  class Manager:
@@ -70,7 +70,7 @@ class Manager:
70
70
  )
71
71
 
72
72
  self.subparsers = self.parser.add_subparsers(dest="subparser")
73
- self.commands: Dict[str, Callable] = {} # noqa: FA100
73
+ self.commands: Dict[str, Callable] = {}
74
74
 
75
75
  self.shell(
76
76
  getattr(
muffin/plugins.py CHANGED
@@ -64,6 +64,14 @@ class BasePlugin(ABC):
64
64
  """Human readable representation."""
65
65
  return f"<muffin.Plugin: { self.name }>"
66
66
 
67
+ async def __aenter__(self):
68
+ if self.startup is not None:
69
+ await self.startup()
70
+
71
+ async def __aexit__(self, exc_type, exc, tb):
72
+ if self.shutdown is not None:
73
+ await self.shutdown()
74
+
67
75
  @property
68
76
  def app(self) -> Application:
69
77
  """Get the application."""
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: muffin
3
- Version: 0.100.1
3
+ Version: 0.102.0
4
4
  Summary: Muffin is a fast, simple and asyncronous web-framework for Python 3 (asyncio, trio, curio)
5
5
  Home-page: https://github.com/klen/muffin
6
6
  License: MIT
7
7
  Keywords: asgi,web,web framework,asyncio,trio,curio
8
8
  Author: Kirill Klenov
9
9
  Author-email: horneds@gmail.com
10
- Requires-Python: >=3.8,<4.0
10
+ Requires-Python: >=3.9,<4.0
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Framework :: AsyncIO
13
13
  Classifier: Framework :: Trio
@@ -15,14 +15,14 @@ Classifier: Intended Audience :: Developers
15
15
  Classifier: License :: OSI Approved :: MIT License
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
18
  Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: Implementation :: PyPy
23
23
  Classifier: Topic :: Internet :: WWW/HTTP
24
24
  Provides-Extra: standard
25
- Requires-Dist: asgi-tools (>=0,<1)
25
+ Requires-Dist: asgi-tools (>=1,<2)
26
26
  Requires-Dist: gunicorn (>=20.1.0,<21.0.0) ; extra == "standard"
27
27
  Requires-Dist: modconfig (>=1,<2)
28
28
  Requires-Dist: ujson
@@ -3,13 +3,13 @@ muffin/app.py,sha256=m3m98XOVwgt44iClqXuVROqYn91-UU81Jf147UPmnc8,5213
3
3
  muffin/constants.py,sha256=Ga1UJiEdXUk6dIEH_IEVYkFSZxQFPhxie7fCJwQY8V0,71
4
4
  muffin/errors.py,sha256=I-vKbMMBiMU07zPdKvoJKqA7s4xYAUA-4oZXrRMRzcM,701
5
5
  muffin/handler.py,sha256=cbEt5hKSGBTHSI5IEZ9T8RNiKcvcliYVsY_1PPnvpZE,3755
6
- muffin/manage.py,sha256=yOKhfF_wEfHCsSrQNzt6wDiPcMQlVhzCK1XLy5i5ve8,8842
7
- muffin/plugins.py,sha256=Mc6AhsJQdth-jZN2hNPtvn_F3LR3G_A8C1SgoBE4Ifc,2964
6
+ muffin/manage.py,sha256=03yWa1phPeq1vR_rMbwuWPtoCgbAEFDVDSni0LnGKKc,8835
7
+ muffin/plugins.py,sha256=V2tyKR371mxYsCdAq7MIxA-vLIsBWB3bzJFZwGw2OvY,3190
8
8
  muffin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  muffin/pytest.py,sha256=51pJ-JJ2vwqiPhR9TPqXvT78X35l3v3oEkN5LBnfY8E,2679
10
10
  muffin/types.py,sha256=wsUj5oAfqSZMoEf-wyFJLBlWa8Mc-eJGqKLr02HxuXE,153
11
11
  muffin/utils.py,sha256=6Domw0vOVj9hv9NYadaRgfBUgPYhJTMc7sG8VgqszRQ,2905
12
- muffin-0.100.1.dist-info/METADATA,sha256=9dA8w4QGs4b6d03BQlqab47WAWT2JvC17qMYBgl_aGg,11330
13
- muffin-0.100.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
14
- muffin-0.100.1.dist-info/entry_points.txt,sha256=GvPS3M-tNVPzhUS5jnUpOmWw2NAqedY34VRCYgPYzlM,84
15
- muffin-0.100.1.dist-info/RECORD,,
12
+ muffin-0.102.0.dist-info/METADATA,sha256=yOjKg--McBTfGhK5l9ho5HhnrST4f22Ap4qOA3YtMuQ,11331
13
+ muffin-0.102.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
+ muffin-0.102.0.dist-info/entry_points.txt,sha256=GvPS3M-tNVPzhUS5jnUpOmWw2NAqedY34VRCYgPYzlM,84
15
+ muffin-0.102.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.7.0
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any