Skip to main content

Injection Points

Centralized injection point definitions with no duplication.

Overview​

This module defines all injection points as class attributes with embedded metadata, eliminating the need for separate enums, description dicts, and categorization sets while preserving the familiar InjectionPoint.SOMETHING syntax.

Classes​

InjectionPointInstance​

Metadata container for an injection point.

Contains all information about an injection point in one place, providing IDE-friendly access to names, descriptions, and requirements.

Methods​

endswith​
endswith(self, suffix: str) -> bool

Check if the injection point name ends with the given suffix.

Parameters:

  • suffix (str, required)

Returns: bool

startswith​
startswith(self, prefix: str) -> bool

Check if the injection point name starts with the given prefix.

Parameters:

  • prefix (str, required)

Returns: bool

Properties​

  • value

InjectionPointMeta​

Metadata container for an injection point.

Contains all information about an injection point in one place, providing IDE-friendly access to names, descriptions, and requirements.

Methods​

endswith​
endswith(self, suffix: str) -> bool

Check if the injection point name ends with the given suffix.

Parameters:

  • suffix (str, required)

Returns: bool

startswith​
startswith(self, prefix: str) -> bool

Check if the injection point name starts with the given prefix.

Parameters:

  • prefix (str, required)

Returns: bool

Properties​

  • value

InjectionPointRegistry​

Registry that provides InjectionPoint.SOMETHING syntax with consolidated metadata.

All injection points are defined here with their metadata in one place, eliminating duplication across multiple constants and dictionaries.

Methods​

find_injection_point_by_name​
find_injection_point_by_name(name: str) -> specify_cli.assistants.injection_points.InjectionPointMeta | None

Find injection point metadata by name.

Parameters:

  • name (str, required)

Returns: specify_cli.assistants.injection_points.InjectionPointMeta | None

get_all_injection_points​
get_all_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all injection point metadata objects.

Returns: List

get_injection_point_descriptions​
get_injection_point_descriptions() -> Dict[str, str]

Get mapping of injection point names to descriptions.

Returns: Dict

get_injection_point_names​
get_injection_point_names() -> Set[str]

Get all injection point names.

Returns: Set

get_members​
get_members()

Provide enum-like members interface.

get_optional_injection_point_names​
get_optional_injection_point_names() -> Set[str]

Get optional injection point names.

Returns: Set

get_optional_injection_points​
get_optional_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all optional injection point metadata objects.

Returns: List

get_required_injection_point_names​
get_required_injection_point_names() -> Set[str]

Get required injection point names.

Returns: Set

get_required_injection_points​
get_required_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all required injection point metadata objects.

Returns: List

InjectionPointType​

Wrapper to make InjectionPointRegistry work like an enum.

Inherits from: InjectionPointRegistry

Methods​

find_injection_point_by_name​
find_injection_point_by_name(name: str) -> specify_cli.assistants.injection_points.InjectionPointMeta | None

Find injection point metadata by name.

Parameters:

  • name (str, required)

Returns: specify_cli.assistants.injection_points.InjectionPointMeta | None

get_all_injection_points​
get_all_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all injection point metadata objects.

Returns: List

get_injection_point_descriptions​
get_injection_point_descriptions() -> Dict[str, str]

Get mapping of injection point names to descriptions.

Returns: Dict

get_injection_point_names​
get_injection_point_names() -> Set[str]

Get all injection point names.

Returns: Set

get_members​
get_members()

Provide enum-like members interface.

get_optional_injection_point_names​
get_optional_injection_point_names() -> Set[str]

Get optional injection point names.

Returns: Set

get_optional_injection_points​
get_optional_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all optional injection point metadata objects.

Returns: List

get_required_injection_point_names​
get_required_injection_point_names() -> Set[str]

Get required injection point names.

Returns: Set

get_required_injection_points​
get_required_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all required injection point metadata objects.

Returns: List

Functions​

get_all_injection_points​

get_all_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all injection point metadata objects.

Returns: List

get_injection_point_descriptions​

get_injection_point_descriptions() -> Dict[str, str]

Get mapping of injection point names to descriptions.

Returns: Dict

get_injection_point_names​

get_injection_point_names() -> Set[str]

Get all injection point names.

Returns: Set

get_optional_injection_point_names​

get_optional_injection_point_names() -> Set[str]

Get optional injection point names.

Returns: Set

get_optional_injection_points​

get_optional_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all optional injection point metadata objects.

Returns: List

get_required_injection_point_names​

get_required_injection_point_names() -> Set[str]

Get required injection point names.

Returns: Set

get_required_injection_points​

get_required_injection_points() -> List[specify_cli.assistants.injection_points.InjectionPointMeta]

Get all required injection point metadata objects.

Returns: List