Debian Codegraph @

tests/apps/complex-demo/docs/source/cli/server.rst

raw
1 Server Commands
2 ===============
3
4 Server management commands demonstrating **Pydantic model support**.
5
6 .. note::
7
8 If Pydantic is not installed, the server commands will use simpler
9 parameter definitions as a fallback.
10
11 Server Management
12 -----------------
13
14 .. cyclopts:: complex_app:app
15 :heading-level: 3
16 :recursive:
17 :commands: server
18
19 Pydantic Integration
20 --------------------
21
22 When Pydantic is available, the ``start`` command accepts two Pydantic models:
23
24 * ``ServerConfig`` - Server bind address, port, workers, timeout
25 * ``AuthConfig`` - Authentication provider, token settings, CORS origins
26
27 Pydantic's field validators are respected, providing automatic validation
28 of port numbers, worker counts, etc.