ccproxy.api.app¶
ccproxy.api.app
¶
FastAPI application factory for CCProxy API Server with plugin system.
merge_router_tags
¶
Merge router tags with spec tags, removing duplicates while preserving order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
router
|
APIRouter
|
FastAPI router instance |
required |
spec_tags
|
list[str] | None
|
Tags from route specification |
None
|
default_tags
|
list[str] | None
|
Fallback tags if no other tags exist |
None
|
Returns:
| Type | Description |
|---|---|
list[str | Enum] | None
|
Deduplicated list of tags, or None if no tags |
Source code in ccproxy/api/app.py
setup_task_manager_startup
async
¶
Start the async task manager.
Source code in ccproxy/api/app.py
setup_task_manager_shutdown
async
¶
Stop the async task manager.
Source code in ccproxy/api/app.py
setup_service_container_shutdown
async
¶
Close the service container and its resources.
initialize_plugins_startup
async
¶
Initialize plugins during startup (runtime phase).
Source code in ccproxy/api/app.py
shutdown_plugins
async
¶
Shutdown plugins.
Source code in ccproxy/api/app.py
shutdown_hook_system
async
¶
Shutdown the hook system and background thread.
Source code in ccproxy/api/app.py
initialize_hooks_startup
async
¶
Initialize hook system with plugins.
Source code in ccproxy/api/app.py
lifespan
async
¶
Application lifespan manager using component-based approach.
Source code in ccproxy/api/app.py
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | |