Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MemoryStore.load_from_url() #552

Open
jondricek opened this issue Jul 19, 2022 · 0 comments
Open

Add MemoryStore.load_from_url() #552

jondricek opened this issue Jul 19, 2022 · 0 comments

Comments

@jondricek
Copy link

tl;dr

The MemoryStore object currently allows you to load_from_file() from JSON files - which is great. What would be even better would be to add an option for load_from_url()!

Use Case

Sometimes you just really want to load some STIX content into memory, and find the perfect dataset is available online. Sure, you could download it and load_from_file(), but what if you just don't have time for that? What if you really, really just want it now? Enter load_from_url(), the perfect solution to this problem! I don't know how exactly it would work or be implemented, but it sure beats my attempt at adding requests.get(url) myself, then deciding whether or not to save it to a file and use it as FileSystemStore or just use it in memory. I'd much rather have the stix library handle that for me! Win, win (somehow)!

You might ask, "well what about TAXII? that was designed to transport STIX over the network, not STIX itself. you shouldn't do that."

Great question! I'll counter that with, "turns out that not every STIX dataset is hosted on a TAXII server, but sometimes fully available on, e.g. GitHub. or in the case of some TAXII servers (like the one I help manage) it goes down often and I still want to access the raw STIX since that's always around"

Anyway, hopefully this helps paint a picture of why I believe that load_from_url() makes sense as an addition to MemoryStore objects. Please, by all means let me know if you have other plans in mind. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant