colander_data_converter.converters.stix2.models
- class colander_data_converter.converters.stix2.models.File[source]
Bases:
Stix2ObjectBase
- Config:
str_strip_whitespace: bool = True
arbitrary_types_allowed: bool = True
extra: str = allow
- Fields:
- class colander_data_converter.converters.stix2.models.Identity[source]
Bases:
Stix2ObjectBase
- Config:
str_strip_whitespace: bool = True
arbitrary_types_allowed: bool = True
extra: str = allow
- Fields:
- class colander_data_converter.converters.stix2.models.Indicator[source]
Bases:
Stix2ObjectBase
- Config:
str_strip_whitespace: bool = True
arbitrary_types_allowed: bool = True
extra: str = allow
- Fields:
- class colander_data_converter.converters.stix2.models.Infrastructure[source]
Bases:
Stix2ObjectBase
- Config:
str_strip_whitespace: bool = True
arbitrary_types_allowed: bool = True
extra: str = allow
- Fields:
- class colander_data_converter.converters.stix2.models.Malware[source]
Bases:
Stix2ObjectBase
- Config:
str_strip_whitespace: bool = True
arbitrary_types_allowed: bool = True
extra: str = allow
- Fields:
- class colander_data_converter.converters.stix2.models.Relationship[source]
Bases:
Stix2ObjectBase
- Config:
str_strip_whitespace: bool = True
arbitrary_types_allowed: bool = True
extra: str = allow
- Fields:
- class colander_data_converter.converters.stix2.models.Stix2Bundle[source]
Bases:
BaseModel
- Fields:
- field objects: List[Annotated[File | Indicator | Infrastructure | Identity | Malware | ThreatActor | Relationship, FieldInfo(annotation=NoneType, required=True, discriminator='type')]] = []
- class colander_data_converter.converters.stix2.models.Stix2ObjectBase[source]
Bases:
BaseModel
- Config:
str_strip_whitespace: bool = True
arbitrary_types_allowed: bool = True
extra: str = allow
- Fields:
- model_post_init(_Stix2ObjectBase__context)[source]
Executes post-initialization logic for the model, ensuring the repository registers the current subclass instance.
- Parameters:
__context (
Any
) – Additional context provided for post-initialization handling.
- classmethod get_model_class(type_name)[source]
- Return type:
Type[Stix2ObjectBase] | None
- class colander_data_converter.converters.stix2.models.Stix2Repository(*args, **kwargs)[source]
Bases:
object
Singleton repository for managing and storing STIX2 objects.
This class provides centralized storage and reference management for all STIX2 objects, supporting conversion to and from Colander data.
- __lshift__(stix2_object)[source]
Adds a STIX2 object to the repository.
- Parameters:
stix2_object (
Dict[str
,Any]
) – The STIX2 object to add.
- stix2_objects: Dict[str, Annotated[File | Indicator | Infrastructure | Identity | Malware | ThreatActor | Relationship, FieldInfo(annotation=NoneType, required=True, discriminator='type')]]
- class colander_data_converter.converters.stix2.models.ThreatActor[source]
Bases:
Stix2ObjectBase
- Config:
str_strip_whitespace: bool = True
arbitrary_types_allowed: bool = True
extra: str = allow
- Fields: