Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /freqtrade_freqtrade /freqtrade /resolvers /protection_resolver.py
| """ | |
| This module load custom pairlists | |
| """ | |
| import logging | |
| from pathlib import Path | |
| from freqtrade.constants import Config | |
| from freqtrade.plugins.protections import IProtection | |
| from freqtrade.resolvers import IResolver | |
| logger = logging.getLogger(__name__) | |
| class ProtectionResolver(IResolver): | |
| """ | |
| This class contains all the logic to load custom PairList class | |
| """ | |
| object_type = IProtection | |
| object_type_str = "Protection" | |
| user_subdir = None | |
| initial_search_path = Path(__file__).parent.parent.joinpath("plugins/protections").resolve() | |
| def load_protection( | |
| protection_name: str, config: Config, protection_config: dict | |
| ) -> IProtection: | |
| """ | |
| Load the protection with protection_name | |
| :param protection_name: Classname of the pairlist | |
| :param config: configuration dictionary | |
| :param protection_config: Configuration dedicated to this pairlist | |
| :return: initialized Protection class | |
| """ | |
| return ProtectionResolver.load_object( | |
| protection_name, | |
| config, | |
| kwargs={ | |
| "config": config, | |
| "protection_config": protection_config, | |
| }, | |
| ) | |
Xet Storage Details
- Size:
- 1.24 kB
- Xet hash:
- dd3a7a1b29916f2605a8f2eb09c539b51efd411385e7698000c100b27e3e2603
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.