Skip to content

Briefly describe major objects by providing __str__() functions #313

Open
@nealmcb

Description

@nealmcb

I'm a newbie to stix, just trying to parse a stix file I ran across. It would be much easier to explore the file, the format and the API if the objects would describe themselves when I print them, rather than just getting something like <stix.indicator.indicator.Indicator at 0x7f80481c0050>

Perhaps the output could look something like these:

Malicious FQDN Indicator: example.com
Malicious IPv4 Indicator (IP Watchlist in Netherlands): 183.81.201.105

Add types and/or ids if they seem useful enough.

Providing a summary description of a whole package, e.g. via some sort of package.summary() function that summarizes the numbers of different types of objects or something like that, would also be handy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions