22 lines
		
	
	
		
			535 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			535 B
		
	
	
	
		
			Python
		
	
	
	
	
	
 | 
						|
from .base import Base
 | 
						|
from typing import List
 | 
						|
 | 
						|
class Marketplace(Base):
 | 
						|
  imports:List[str] = []
 | 
						|
  exports:List[str] = []
 | 
						|
  exchange:List[str] = []
 | 
						|
  
 | 
						|
  def update(self, d):
 | 
						|
    self.setlst('imports', d, 'imports', 'symbol')
 | 
						|
    self.setlst('exports', d, 'exports', 'symbol')
 | 
						|
    self.setlst('exchange', d, 'exchange', 'symbol')
 | 
						|
    
 | 
						|
  @classmethod
 | 
						|
  def ext(self):
 | 
						|
    return 'mkt'
 | 
						|
  
 | 
						|
  def path(self):
 | 
						|
    sector, system, symbol, _ = self.symbol.split('-')
 | 
						|
    return f'atlas/{sector}/{system[0:1]}/{system}/{symbol}.{self.ext()}'
 |