mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-08-29 12:52:25 +00:00
- Implemented TemplateResponseDto and UpdateTemplateRequestDto for subscription templates. - Created models for system statistics including CPU, memory, and bandwidth. - Developed user models for user creation, updates, and responses. - Added bulk actions for user updates and statistics tracking. - Introduced tests for authentication, bandwidth statistics, hosts, inbounds, key generation, nodes, subscriptions, and user management. - Enhanced utility functions for generating random strings, emails, and date ranges for testing.
21 lines
723 B
Python
21 lines
723 B
Python
from typing import Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from remnawave_api.enums import TemplateType
|
|
|
|
|
|
class TemplateResponseDto(BaseModel):
|
|
uuid: UUID
|
|
template_type: TemplateType = Field(alias="templateType")
|
|
template_json: Optional[dict] = Field(None, alias="templateJson")
|
|
encoded_template_yaml: Optional[str] = Field(None, alias="encodedTemplateYaml")
|
|
|
|
|
|
class UpdateTemplateRequestDto(BaseModel):
|
|
template_type: TemplateType = Field(serialization_alias="templateType")
|
|
template_json: Optional[dict] = Field(None, serialization_alias="templateJson")
|
|
encoded_template_yaml: Optional[str] = Field(
|
|
None, serialization_alias="encodedTemplateYaml"
|
|
)
|