Session Class — fastapi Architecture
Architecture documentation for the Session class in test_dependency_after_yield_streaming.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD c0c5f8f0_7c05_58ff_8e1d_a1375bba331b["Session"] c577968e_a400_0bfd_3947_3f6bc4f681d1["test_dependency_after_yield_streaming.py"] c0c5f8f0_7c05_58ff_8e1d_a1375bba331b -->|defined in| c577968e_a400_0bfd_3947_3f6bc4f681d1 6c306574_4c68_bf69_b778_67bcd7761540["__init__()"] c0c5f8f0_7c05_58ff_8e1d_a1375bba331b -->|method| 6c306574_4c68_bf69_b778_67bcd7761540 bf0f4b65_415a_6089_e391_4c962c2d5172["__iter__()"] c0c5f8f0_7c05_58ff_8e1d_a1375bba331b -->|method| bf0f4b65_415a_6089_e391_4c962c2d5172
Relationship Graph
Source Code
tests/test_dependency_after_yield_streaming.py lines 11–21
class Session:
def __init__(self) -> None:
self.data = ["foo", "bar", "baz"]
self.open = True
def __iter__(self) -> Generator[str, None, None]:
for item in self.data:
if self.open:
yield item
else:
raise ValueError("Session closed")
Domain
Source
Frequently Asked Questions
What is the Session class?
Session is a class in the fastapi codebase, defined in tests/test_dependency_after_yield_streaming.py.
Where is Session defined?
Session is defined in tests/test_dependency_after_yield_streaming.py at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free