modern-di-faststream 2.3.0__py3-none-any.whl → 2.5.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.
@@ -1,4 +1,9 @@
1
- from modern_di_faststream.main import FromDI, fetch_di_container, setup_di
1
+ from modern_di_faststream.main import FromDI, faststream_message_provider, fetch_di_container, setup_di
2
2
 
3
3
 
4
- __all__ = ["FromDI", "fetch_di_container", "setup_di"]
4
+ __all__ = [
5
+ "FromDI",
6
+ "faststream_message_provider",
7
+ "fetch_di_container",
8
+ "setup_di",
9
+ ]
@@ -14,7 +14,7 @@ T_co = typing.TypeVar("T_co", covariant=True)
14
14
  P = typing.ParamSpec("P")
15
15
 
16
16
 
17
- faststream_message = providers.ContextProvider(scope=Scope.REQUEST, context_type=faststream.StreamMessage)
17
+ faststream_message_provider = providers.ContextProvider(scope=Scope.REQUEST, context_type=faststream.StreamMessage)
18
18
 
19
19
 
20
20
  _major, _minor, *_ = version("faststream").split(".")
@@ -78,7 +78,7 @@ def setup_di(
78
78
  msg = "Broker must be defined to setup DI"
79
79
  raise RuntimeError(msg)
80
80
 
81
- container.providers_registry.add_providers(faststream_message=faststream_message)
81
+ container.providers_registry.add_providers(faststream_message_provider)
82
82
  app.context.set_global("di_container", container)
83
83
  app.after_shutdown(container.close_async)
84
84
  app.broker.add_middleware(_DIMiddlewareFactory(container))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modern-di-faststream
3
- Version: 2.3.0
3
+ Version: 2.5.0
4
4
  Summary: Modern-DI integration for FastStream
5
5
  Project-URL: repository, https://github.com/modern-python/modern-di
6
6
  Project-URL: docs, https://modern-di.readthedocs.io
@@ -0,0 +1,6 @@
1
+ modern_di_faststream/__init__.py,sha256=SDEvQf3I_InRU7KkR4Tn9p-JdvivN-EMvkou2wYlUzY,211
2
+ modern_di_faststream/main.py,sha256=HIPQ2uVVomazPdXyCRLSnD38m_7SORe0mRnlH7oTftQ,3646
3
+ modern_di_faststream/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ modern_di_faststream-2.5.0.dist-info/METADATA,sha256=f5pwaUEz3HX8bjNAX5GNEK9jZPcbrUq5fgt63jUOdYQ,999
5
+ modern_di_faststream-2.5.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
+ modern_di_faststream-2.5.0.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- modern_di_faststream/__init__.py,sha256=ENQRyE_73MsxFjo608cUUb5EN1pFPC5HkS5Z3wZ5IC0,132
2
- modern_di_faststream/main.py,sha256=pxrfa3Fs--4_7PKInXKfjO62MTvuyMGnRgegK78tMB4,3647
3
- modern_di_faststream/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- modern_di_faststream-2.3.0.dist-info/METADATA,sha256=of8xPqyE1Okv6svEEL90B_yVz1DYevtm8i3TCvlrSdM,999
5
- modern_di_faststream-2.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
- modern_di_faststream-2.3.0.dist-info/RECORD,,