def get_by_symbol(self, symbol: str) -> Commodity:
        """ Loads currency by symbol """
        assert isinstance(symbol, str)

        query = (
            self.currencies_query
                .filter(Commodity.mnemonic == symbol)
        )
        return query.one()
def get_by_symbol ( self , symbol : str ) -> Commodity : assert isinstance ( symbol , str ) query = ( self . currencies_query . filter ( Commodity . mnemonic == symbol ) ) return query . one ( )
Loads currency by symbol