0ptr/nullptr/analyzer.py
2023-06-13 09:27:13 +02:00

12 lines
330 B
Python

from nullptr.models.marketplace import Marketplace
class Analyzer:
def __init__(self, store):
self.store = store
def find_markets(self, resource, sellbuy, location):
for m in self.store.all(Marketplace):
resources = m.imports if sellbuy == 'sell' else m.exports
if resource in resources:
yield m