os-threat / Stix-ORM

GNU Affero General Public License v3.0
4 stars 0 forks source link

Reorder Methods in Data Source/Sink and Add DataStore #5

Open brettforbes opened 1 year ago

brettforbes commented 1 year ago

Quoting the Stix2 Python Library Documentation "The stix2 library features an interface for pulling and pushing STIX 2 content. This interface consists of [DataStore], [DataSource] and [DataSink] constructs:

When we examine the methods in typedb.py, we see that we have many methods on DataSink, and very few on DataSource. We have methods that pull data, incorrectly located on DataSink, which is only for pushing, for example:

We need to:

  1. Reorganise the methods, so methods that require pulling is on the Source, and methods that require pushing on the Sink. the assumption is that the delete() method is on the Source, since it requires pulling the id's
  2. Add the DataStore mixin method, using the filesystem methods as an example
  3. Produce documentation on the high-level methods in the docs directory, interaction sub-directory, python sub directory