colander_data_converter.formats.stix2.converter module
- class colander_data_converter.formats.stix2.converter.ColanderToStix2Mapper[source]
Bases:
Stix2Mapper
Maps Colander data to STIX2 data using the mapping file.
- convert(colander_feed)[source]
Convert Colander data to STIX2 data.
- Parameters:
colander_feed (ColanderFeed) – The Colander data to convert.
- Returns:
The converted STIX2 data.
- Return type:
Dict[str, Any]
- convert_colander_entity(entity)[source]
Convert a Colander entity to a STIX2 object.
- Parameters:
entity (Actor | Device | Artifact | Observable | Threat | DetectionRule | DataFragment) – The Colander entity to convert.
- Returns:
The converted STIX2 object, or None if the entity type is not supported.
- Return type:
Optional[Dict[str, Any]]
- convert_colander_relation(relation)[source]
Convert a Colander EntityRelation to a STIX2 relationship object.
- Parameters:
relation (EntityRelation) – The Colander EntityRelation to convert.
- Returns:
The converted STIX2 relationship object, or None if the relation cannot be converted.
- Return type:
Optional[Dict[str, Any]]
- class colander_data_converter.formats.stix2.converter.Stix2Mapper[source]
Bases:
object
Base class for mapping between STIX2 and Colander data using the mapping file.
- class colander_data_converter.formats.stix2.converter.Stix2ToColanderMapper[source]
Bases:
Stix2Mapper
Maps STIX2 data to Colander data using the mapping file.
- convert(stix2_data)[source]
Convert STIX2 data to Colander data.
- Parameters:
stix2_data (Dict[str, Any]) – The STIX2 data to convert.
- Returns:
The converted Colander data.
- Return type:
- convert_stix2_object(stix2_object)[source]
Convert a STIX2 object to a Colander entity.
- Parameters:
stix2_object (Dict[str, Any]) – The STIX2 object to convert.
- Returns:
The converted Colander entity, or None if the object type is not supported.
- Return type:
Optional[Union[Actor, Device, Artifact, Observable, Threat, Event, DetectionRule, DataFragment, EntityRelation]]