Coverage for Users/vladimirpavlov/PycharmProjects/parameterizable/src/mixinforge/__init__.py: 100%

1"""Tools for working with mixinforge classes.

2

3 This package provides reusable mixins and utility functions that help you build

4 well-structured Python classes. It offers tools for parameter management, cache

5 management, initialization control, thread safety, pickle prevention, JSON

6 serialization, and dictionary utilities.

7

8 Public API:

9- ParameterizableMixin: Base class for parameterizable objects with JSON serialization.

10- CacheablePropertiesMixin: Automatic discovery and invalidation of cached_property attributes.

11- NotPicklableMixin: Mixin that prevents pickling/unpickling.

12- SingleThreadEnforcerMixin: Enforces single-threaded execution with multi-process support.

13- GuardedInitMeta: Metaclass for strict initialization control and lifecycle hooks.

14- SingletonMixin: Ensures each subclass maintains exactly one instance.

15- sort_dict_by_keys: Sort a dictionary by its keys alphabetically.

16- dumpjs: Serialize an object (or parameters) into a JSON string.

17- loadjs: Deserialize a JSON string produced by dumpjs back into a Python object.

18- update_jsparams: Update parameters in a JSON-serialized string.

19- access_jsparams: Access parameters in a JSON-serialized string.

20- JsonSerializedObject: NewType alias for JSON strings produced by dumpjs.

21"""

22

23 from ._version_info import __version__

24

25 from .dict_sorter import *

26 from .not_picklable_mixin import *

27 from .json_processor import *

28 from .parameterizable_mixin import *

29 from .cacheable_properties_mixin import *

30 from .guarded_init_metaclass import *

31 from .single_thread_enforcer_mixin import *

32 from .singleton_mixin import *

33

34 __all__ = [

35 'CacheablePropertiesMixin',

36 'GuardedInitMeta',

37 'SingleThreadEnforcerMixin',

38 'sort_dict_by_keys',

39 'ParameterizableMixin',

40 'NotPicklableMixin',

41 'loadjs',

42 'dumpjs',

43 'JsonSerializedObject',

44 'update_jsparams',

45 'access_jsparams',

46 '__version__'

47]