muffin 0.100.1__tar.gz → 0.101.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: muffin
3
- Version: 0.100.1
3
+ Version: 0.101.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
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.8
19
19
  Classifier: Programming Language :: Python :: 3.9
20
20
  Classifier: Programming Language :: Python :: 3.10
21
21
  Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
22
23
  Classifier: Programming Language :: Python :: Implementation :: PyPy
23
24
  Classifier: Topic :: Internet :: WWW/HTTP
24
25
  Provides-Extra: standard
@@ -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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "muffin"
3
- version = "0.100.1"
3
+ version = "0.101.0"
4
4
  description = "Muffin is a fast, simple and asyncronous web-framework for Python 3 (asyncio, trio, curio)"
5
5
  readme = "README.rst"
6
6
  license = "MIT"
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