1414import logging
1515from contextlib import asynccontextmanager
1616
17- from nexios import get_application
17+ from nexios import NexiosApp
1818from nexios .http .request import Request
1919from nexios .http .response import Response
2020
@@ -98,7 +98,7 @@ async def lifespan_context(app):
9898# Create application instances to demonstrate different approaches
9999
100100# 1. Application with regular startup/shutdown handlers
101- regular_app = get_application (title = "Regular Handlers Example" )
101+ regular_app = NexiosApp (title = "Regular Handlers Example" )
102102
103103
104104@regular_app .on_startup ()
@@ -130,11 +130,11 @@ async def shutdown_handler2():
130130
131131
132132# 2. Application with custom lifespan context manager
133- custom_app = get_application (title = "Custom Lifespan Example" , lifespan = lifespan_context )
133+ custom_app = NexiosApp (title = "Custom Lifespan Example" , lifespan = lifespan_context )
134134
135135
136136# 3. Application demonstrating error handling
137- error_app = get_application (title = "Error Handling Example" )
137+ error_app = NexiosApp (title = "Error Handling Example" )
138138
139139
140140@error_app .on_startup ()
@@ -153,7 +153,7 @@ async def error_cleanup():
153153
154154
155155# Main application that combines regular handlers and custom lifespan
156- app = get_application (title = "Nexios Lifespan Demo" , lifespan = lifespan_context )
156+ app = NexiosApp (title = "Nexios Lifespan Demo" , lifespan = lifespan_context )
157157
158158
159159# Add some regular handlers too (these won't run when custom lifespan is used)
0 commit comments