__init__.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. """Python Utils
  2. This package contains dependency-free Python utility functions used throughout the
  3. codebase.
  4. Each utility should belong in its own file and be the default export.
  5. These functions are not part of the module interface and are subject to change.
  6. """
  7. from .convert_case import camel_to_snake, snake_to_camel
  8. from .cached_property import cached_property
  9. from .description import (
  10. Description,
  11. is_description,
  12. register_description,
  13. unregister_description,
  14. )
  15. from .did_you_mean import did_you_mean
  16. from .group_by import group_by
  17. from .identity_func import identity_func
  18. from .inspect import inspect
  19. from .is_awaitable import is_awaitable
  20. from .is_iterable import is_collection, is_iterable
  21. from .natural_compare import natural_comparison_key
  22. from .awaitable_or_value import AwaitableOrValue
  23. from .suggestion_list import suggestion_list
  24. from .frozen_error import FrozenError
  25. from .frozen_list import FrozenList
  26. from .frozen_dict import FrozenDict
  27. from .merge_kwargs import merge_kwargs
  28. from .path import Path
  29. from .print_path_list import print_path_list
  30. from .simple_pub_sub import SimplePubSub, SimplePubSubIterator
  31. from .undefined import Undefined, UndefinedType
  32. __all__ = [
  33. "camel_to_snake",
  34. "snake_to_camel",
  35. "cached_property",
  36. "did_you_mean",
  37. "Description",
  38. "group_by",
  39. "is_description",
  40. "register_description",
  41. "unregister_description",
  42. "identity_func",
  43. "inspect",
  44. "is_awaitable",
  45. "is_collection",
  46. "is_iterable",
  47. "merge_kwargs",
  48. "natural_comparison_key",
  49. "AwaitableOrValue",
  50. "suggestion_list",
  51. "FrozenError",
  52. "FrozenList",
  53. "FrozenDict",
  54. "Path",
  55. "print_path_list",
  56. "SimplePubSub",
  57. "SimplePubSubIterator",
  58. "Undefined",
  59. "UndefinedType",
  60. ]