10 lines
336 B
Python
10 lines
336 B
Python
from starlette.requests import HTTPConnection
|
|
|
|
from infrastructure.storage import InMemoryStorage
|
|
|
|
|
|
def get_storage(connection: HTTPConnection) -> InMemoryStorage:
|
|
"""Получение in-memory хранилища, созданного в lifespan."""
|
|
storage: InMemoryStorage = connection.app.state.storage
|
|
return storage
|