Files
catalyst/zipline/protocol.py
T
Eddie Hebert 77af1ca632 Applies PEP-8 and pyflakes style to tests and zipline.
Mostly whitespace, line width and other spacing changes.
Also, removes use of deprecated has_key in favor of `in`

Going forward new patches should pass running `flake8` before
submission.
2012-10-05 12:14:09 -04:00

27 lines
542 B
Python

from utils.protocol_utils import Enum, ndict, namelookup
# Datasource type should completely determine the other fields of a
# message with its type.
DATASOURCE_TYPE = Enum(
'AS_TRADED_EQUITY',
'MERGER',
'SPLIT',
'DIVIDEND',
'TRADE',
'EMPTY',
'DONE'
)
#Transform type needs to be a ndict to facilitate merging.
TRANSFORM_TYPE = ndict({
'PASSTHROUGH': 'PASSTHROUGH',
'EMPTY': ''
})
FINANCE_COMPONENT = namelookup({
'TRADING_CLIENT': 'TRADING_CLIENT',
'PORTFOLIO_CLIENT': 'PORTFOLIO_CLIENT',
})