Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /MTSWebServices_syncmaster /syncmaster /dto /transfers_strategy.py
| # SPDX-FileCopyrightText: 2023-present MTS PJSC | |
| # SPDX-License-Identifier: Apache-2.0 | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| class Strategy: | |
| type: str | |
| def from_dict(cls, data: dict) -> Strategy: | |
| strategy_classes = { | |
| "full": FullStrategy, | |
| "incremental": IncrementalStrategy, | |
| } | |
| strategy_type = data.get("type") | |
| if strategy_type not in strategy_classes: | |
| msg = f"Unknown strategy type: {strategy_type}" | |
| raise ValueError(msg) | |
| return strategy_classes[strategy_type](**data) | |
| class FullStrategy(Strategy): | |
| pass | |
| class IncrementalStrategy(Strategy): | |
| increment_by: str | |
Xet Storage Details
- Size:
- 752 Bytes
- Xet hash:
- c38e627573fe830f3cf570ee21433acb8063d2cc55b01c214daac22d70aba353
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.