__init__.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright (c) 2025-2026 Buf Technologies, Inc.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. """Protobuf core primitives and features."""
  15. from __future__ import annotations
  16. from ._descriptors import (
  17. DescComments,
  18. DescEnum,
  19. DescEnumValue,
  20. DescExtension,
  21. DescField,
  22. DescFieldValue,
  23. DescFieldValueEnum,
  24. DescFieldValueList,
  25. DescFieldValueMap,
  26. DescFieldValueMessage,
  27. DescFieldValueScalar,
  28. DescFieldValueSingular,
  29. DescFile,
  30. DescMessage,
  31. DescMethod,
  32. DescOneof,
  33. DescService,
  34. DescUnknownField,
  35. ScalarType,
  36. )
  37. from ._enum import Enum, enum_is_unknown
  38. from ._extension import Extension
  39. from ._from_binary import merge_from_binary
  40. from ._from_json import merge_from_json, message_from_json_value
  41. from ._merge import merge_from
  42. from ._message import Message
  43. from ._oneof import Oneof
  44. from ._registry import Registry
  45. from ._supported_editions import maximum_supported_edition, minimum_supported_edition
  46. from ._to_json import message_to_json_value
  47. __all__ = [
  48. "DescComments",
  49. "DescEnum",
  50. "DescEnumValue",
  51. "DescExtension",
  52. "DescField",
  53. "DescFieldValue",
  54. "DescFieldValueEnum",
  55. "DescFieldValueList",
  56. "DescFieldValueMap",
  57. "DescFieldValueMessage",
  58. "DescFieldValueScalar",
  59. "DescFieldValueSingular",
  60. "DescFile",
  61. "DescMessage",
  62. "DescMethod",
  63. "DescOneof",
  64. "DescService",
  65. "DescUnknownField",
  66. "Enum",
  67. "Extension",
  68. "Message",
  69. "Oneof",
  70. "Registry",
  71. "ScalarType",
  72. "enum_is_unknown",
  73. "maximum_supported_edition",
  74. "merge_from",
  75. "merge_from_binary",
  76. "merge_from_json",
  77. "message_from_json_value",
  78. "message_to_json_value",
  79. "minimum_supported_edition",
  80. ]