python_template_server.models¶
Pydantic models for the server.
Classes
|
Base response model for all API endpoints. |
|
CORS (Cross-Origin Resource Sharing) configuration model. |
|
Certificate configuration model. |
|
Custom JSONResponse with configurable rendering options. |
|
Response model for the health endpoint. |
|
Response model for login endpoint. |
|
JSON response rendering configuration model. |
|
Rate limit configuration model. |
|
HTTP response codes for API endpoints. |
|
Security headers configuration model. |
|
Template server configuration. |
- class python_template_server.models.SecurityConfigModel(**data)[source]¶
Security headers configuration model.
- class python_template_server.models.CORSConfigModel(**data)[source]¶
CORS (Cross-Origin Resource Sharing) configuration model.
- class python_template_server.models.RateLimitConfigModel(**data)[source]¶
Rate limit configuration model.
- class python_template_server.models.CertificateConfigModel(**data)[source]¶
Certificate configuration model.
- class python_template_server.models.JSONResponseConfigModel(**data)[source]¶
JSON response rendering configuration model.
- class python_template_server.models.TemplateServerConfig(**data)[source]¶
Template server configuration.
- security: SecurityConfigModel¶
- cors: CORSConfigModel¶
- rate_limit: RateLimitConfigModel¶
- certificate: CertificateConfigModel¶
- json_response: JSONResponseConfigModel¶
- class python_template_server.models.CustomJSONResponse(content, status_code=200, headers=None, media_type=None, background=None)[source]¶
Custom JSONResponse with configurable rendering options.
- class python_template_server.models.ResponseCode(*values)[source]¶
HTTP response codes for API endpoints.
- OK = 200¶
- CREATED = 201¶
- ACCEPTED = 202¶
- NO_CONTENT = 204¶
- BAD_REQUEST = 400¶
- UNAUTHORIZED = 401¶
- FORBIDDEN = 403¶
- NOT_FOUND = 404¶
- CONFLICT = 409¶
- INTERNAL_SERVER_ERROR = 500¶
- SERVICE_UNAVAILABLE = 503¶
- class python_template_server.models.BaseResponse(**data)[source]¶
Base response model for all API endpoints.