Buckets:
AnonymousSpottedToad/human_verified_bucket / codebase /python /freqtrade_freqtrade /freqtrade /util /singleton.py
| from typing import Any | |
| class SingletonMeta(type): | |
| """ | |
| A thread-safe implementation of Singleton. | |
| Use as metaclass to create singleton classes. | |
| """ | |
| _instances: dict = {} | |
| def __call__(cls, *args: Any, **kwargs: Any) -> Any: | |
| if cls not in cls._instances: | |
| instance = super().__call__(*args, **kwargs) | |
| cls._instances[cls] = instance | |
| return cls._instances[cls] | |
Xet Storage Details
- Size:
- 423 Bytes
- Xet hash:
- 3714b9ce1e7e0e0e159a1f010fa8017b58d751ee70637db6fe2f77492396c45f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.