2017-09-21 23:27:13 +02:00
|
|
|
"""Python APIs for STIX 2.
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:toctree: api
|
|
|
|
|
|
|
|
core
|
2018-03-01 15:04:42 +01:00
|
|
|
datastore
|
2017-09-21 23:27:13 +02:00
|
|
|
environment
|
|
|
|
exceptions
|
2017-09-22 16:01:00 +02:00
|
|
|
markings
|
2017-09-21 23:27:13 +02:00
|
|
|
patterns
|
|
|
|
properties
|
2017-09-22 16:01:00 +02:00
|
|
|
sources
|
2017-09-21 23:27:13 +02:00
|
|
|
utils
|
2018-05-23 17:43:52 +02:00
|
|
|
patterns
|
|
|
|
properties
|
2018-03-01 20:15:02 +01:00
|
|
|
utils
|
2018-03-22 15:55:10 +01:00
|
|
|
workbench
|
2018-03-01 20:15:02 +01:00
|
|
|
v20.common
|
|
|
|
v20.observables
|
2017-11-13 20:14:24 +01:00
|
|
|
v20.sdo
|
|
|
|
v20.sro
|
2018-05-23 17:43:52 +02:00
|
|
|
v21.common
|
|
|
|
v21.observables
|
|
|
|
v21.sdo
|
|
|
|
v21.sro
|
2018-06-14 20:09:17 +02:00
|
|
|
|
|
|
|
The .v21 import can't be relocated, or we get circular import problems.
|
|
|
|
The 'isort:skip' line comment didn't work to skip only that one problematic
|
|
|
|
import. The only thing that did was telling it to skip the whole file.
|
|
|
|
|
|
|
|
isort:skip_file
|
2017-09-21 23:27:13 +02:00
|
|
|
"""
|
2017-01-17 21:37:47 +01:00
|
|
|
|
2017-03-22 14:05:59 +01:00
|
|
|
# flake8: noqa
|
|
|
|
|
2018-07-10 21:31:22 +02:00
|
|
|
from .core import _collect_stix2_mappings, parse, parse_observable
|
2018-06-14 02:09:07 +02:00
|
|
|
from .v21 import * # This import will always be the latest STIX 2.X version
|
2018-03-01 15:04:42 +01:00
|
|
|
from .datastore import CompositeDataSource
|
2018-07-13 17:10:05 +02:00
|
|
|
from .datastore.filesystem import (
|
|
|
|
FileSystemSink, FileSystemSource,
|
|
|
|
FileSystemStore
|
|
|
|
)
|
2018-03-01 15:04:42 +01:00
|
|
|
from .datastore.filters import Filter
|
|
|
|
from .datastore.memory import MemorySink, MemorySource, MemoryStore
|
2018-07-13 17:10:05 +02:00
|
|
|
from .datastore.taxii import (
|
|
|
|
TAXIICollectionSink, TAXIICollectionSource,
|
|
|
|
TAXIICollectionStore
|
|
|
|
)
|
2017-09-08 15:01:12 +02:00
|
|
|
from .environment import Environment, ObjectFactory
|
2018-07-13 17:10:05 +02:00
|
|
|
from .markings import (
|
|
|
|
add_markings, clear_markings, get_markings, is_marked,
|
|
|
|
remove_markings, set_markings
|
|
|
|
)
|
|
|
|
from .patterns import (
|
|
|
|
AndBooleanExpression, AndObservationExpression,
|
|
|
|
BasicObjectPathComponent, BinaryConstant,
|
|
|
|
BooleanConstant, EqualityComparisonExpression,
|
|
|
|
FloatConstant, FollowedByObservationExpression,
|
|
|
|
GreaterThanComparisonExpression,
|
|
|
|
GreaterThanEqualComparisonExpression, HashConstant,
|
|
|
|
HexConstant, InComparisonExpression, IntegerConstant,
|
|
|
|
IsSubsetComparisonExpression,
|
|
|
|
IsSupersetComparisonExpression,
|
|
|
|
LessThanComparisonExpression,
|
|
|
|
LessThanEqualComparisonExpression,
|
|
|
|
LikeComparisonExpression, ListConstant,
|
|
|
|
ListObjectPathComponent, MatchesComparisonExpression,
|
|
|
|
ObjectPath, ObservationExpression, OrBooleanExpression,
|
|
|
|
OrObservationExpression, ParentheticalExpression,
|
|
|
|
QualifiedObservationExpression,
|
|
|
|
ReferenceObjectPathComponent, RepeatQualifier,
|
|
|
|
StartStopQualifier, StringConstant, TimestampConstant,
|
|
|
|
WithinQualifier
|
|
|
|
)
|
2018-04-13 17:08:03 +02:00
|
|
|
from .utils import new_version, revoke
|
2017-07-06 15:39:33 +02:00
|
|
|
from .version import __version__
|
2017-11-02 12:48:37 +01:00
|
|
|
|
2018-07-10 21:31:22 +02:00
|
|
|
_collect_stix2_mappings()
|
2017-11-02 12:48:37 +01:00
|
|
|
|
2018-06-30 00:38:04 +02:00
|
|
|
DEFAULT_VERSION = '2.1' # Default version will always be the latest STIX 2.X version
|