module documentation

Descriptor-driven direct protobuf classes for the Go PySDK generator.

Class DynamicRegistry Registry of SDK-owned message classes and descriptor facades.
Function enum_class Create an SDK enum for one registered protobuf enum.
Function export_file_symbols Export top-level and nested symbols from registered descriptor files.
Function extension Return a namespace-owned extension declaration.
Function message_class Create a direct SDK message class from a registered descriptor.
Function register_client Register a generated service client for lazy operation resolution.
Function register_file Register one serialized file descriptor, rejecting name conflicts.
Class _DynamicExtensionRegistry Undocumented
Class _LazyExtensionHandles Undocumented
Function _annotation_dependencies Undocumented
Function _codec_for Undocumented
Function _constructor_annotation Return the runtime constructor annotation matching generated setters.
Function _direct_field Undocumented
Function _distribution_api_modules Return and cache the API-module boundary for this installation.
Function _ensure_all_api_modules Undocumented
Function _find_distribution_api_modules Return API modules owned by the distribution containing this runtime.
Function _has_optional_keyword Undocumented
Function _is_repeated Undocumented
Function _is_required Undocumented
Function _property_annotations Return the getter and setter annotations for a generated property.
Function _refresh_runtime_annotations Resolve runtime annotations after new message and enum types appear.
Function _runtime_value_annotation Return the direct Python value type exposed for one descriptor field.
Function _well_known_adapters Undocumented
Constant _ANNOTATION_DEPENDENTS Undocumented
Constant _API_LOCAL_ROOT Undocumented
Constant _API_PACKAGE_ROOT Undocumented
Constant _CLASS_CACHE_LOCK Undocumented
Constant _CLIENTS Undocumented
Constant _DISTRIBUTION_API_MODULES_LOCK Undocumented
Constant _DISTRIBUTION_API_MODULES_UNSET Undocumented
Constant _ENUMS Undocumented
Constant _EXPORTED_ENUMS Undocumented
Constant _EXPORTED_MESSAGES Undocumented
Constant _EXTENDEES Undocumented
Constant _EXTENSION_LOCK Undocumented
Constant _INITIAL_PARAMETER_NAMES Undocumented
Constant _MESSAGES Undocumented
Constant _PROTO_NAME Undocumented
Constant _PYTHON_PACKAGE_ROOT Undocumented
def enum_class(full_name: str, python_name: str, values: Mapping[str, int], *, _exported: bool = True) -> type[Enum]: (source)

Create an SDK enum for one registered protobuf enum.

def export_file_symbols(namespace: dict[str, Any], file_names: tuple[str, ...]) -> list[str]: (source)

Export top-level and nested symbols from registered descriptor files.

def extension(full_name: str) -> Extension[Any]: (source)

Return a namespace-owned extension declaration.

def message_class(full_name: str, python_name: str, python_fields: Mapping[str, str] | None = None, python_oneofs: Mapping[str, str] | None = None, field_documentation: Mapping[str, str] | None = None, oneof_documentation: Mapping[str, str] | None = None, *, message_deprecation_details: str | None = None, field_deprecation_details: Mapping[str, str] | None = None, enum_value_deprecations: Mapping[str, Mapping[int, tuple[tuple[str, str], ...]]] | None = None, sensitive_fields: Collection[str] = (), credential_fields: Collection[str] = (), immutable_fields: Collection[str] = (), immutable_oneof_fields: Collection[str] = (), _exported: bool = True) -> type[Message]: (source)

Create a direct SDK message class from a registered descriptor.

def register_client(full_name: str, client: type[Any]): (source)

Register a generated service client for lazy operation resolution.

def register_file(name: str, serialized: bytes): (source)

Register one serialized file descriptor, rejecting name conflicts.

def _annotation_dependencies(field: FieldDescriptor) -> Iterator[str]: (source)

Undocumented

def _codec_for(field: FieldDescriptor, *, internal: bool = False) -> ValueCodec[Any]: (source)

Undocumented

def _constructor_annotation(field: FieldDescriptor) -> Any: (source)

Return the runtime constructor annotation matching generated setters.

def _direct_field(descriptor: FieldDescriptor, python_name: str, python_oneofs: Mapping[str, str] | None = None, deprecation_details: str | None = None, enum_value_deprecations: Mapping[int, tuple[tuple[str, str], ...]] | None = None, *, sensitive: bool = False, credentials: bool = False, immutable: bool = False, immutable_oneof: bool = False, internal: bool = False) -> Field: (source)

Undocumented

def _distribution_api_modules() -> frozenset[str] | None: (source)

Return and cache the API-module boundary for this installation.

def _ensure_all_api_modules(): (source)

Undocumented

def _find_distribution_api_modules() -> frozenset[str] | None: (source)

Return API modules owned by the distribution containing this runtime.

Installed namespace packages can share one physical nebius/api tree. Distribution metadata is the only reliable way to distinguish this SDK's files from modules contributed by another wheel. Bazel and source-tree execution have no owning distribution, so callers fall back to the local tree in that case.

def _has_optional_keyword(field: FieldDescriptor) -> bool: (source)

Undocumented

def _is_repeated(field: FieldDescriptor) -> bool: (source)

Undocumented

def _is_required(field: FieldDescriptor) -> bool: (source)

Undocumented

def _property_annotations(field: FieldDescriptor) -> tuple[Any, Any]: (source)

Return the getter and setter annotations for a generated property.

def _refresh_runtime_annotations(message_names: Iterable[str]): (source)

Resolve runtime annotations after new message and enum types appear.

def _runtime_value_annotation(field: FieldDescriptor) -> Any: (source)

Return the direct Python value type exposed for one descriptor field.

def _well_known_adapters(field: FieldDescriptor, *, internal: bool = False) -> tuple[Any | None, Any | None]: (source)

Undocumented

_ANNOTATION_DEPENDENTS: dict[str, set[str]] = (source)

Undocumented

Value
{}
_API_LOCAL_ROOT = (source)

Undocumented

Value
Path(__file__).resolve().parents[2] / 'api'
_API_PACKAGE_ROOT = (source)

Undocumented

Value
_PYTHON_PACKAGE_ROOT + '.api'
_CLASS_CACHE_LOCK = (source)

Undocumented

Value
RLock()

Undocumented

Value
{}
_DISTRIBUTION_API_MODULES_LOCK = (source)

Undocumented

Value
RLock()
_DISTRIBUTION_API_MODULES_UNSET = (source)

Undocumented

Value
object()

Undocumented

Value
{}
_EXPORTED_ENUMS: set[str] = (source)

Undocumented

Value
set()
_EXPORTED_MESSAGES: set[str] = (source)

Undocumented

Value
set()
_EXTENDEES: set[str] = (source)

Undocumented

Value
set()
_EXTENSION_LOCK = (source)

Undocumented

Value
RLock()
_INITIAL_PARAMETER_NAMES: dict[str, str] = (source)

Undocumented

Value
{}

Undocumented

Value
{}
_PROTO_NAME = (source)

Undocumented

Value
re.compile(r'[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\Z')
_PYTHON_PACKAGE_ROOT = (source)

Undocumented

Value
__name__.rsplit('.base.protos.dynamic', 1)[0]