import json class Config: FIELD_MAP = { "x01": "#user_id", "x02": "#account_id", "x03": "#distinct_id", "x04": "#event_name", "x05": "#server_time", "a01": "#ip", "a02": "#country", "a03": "#country_code", "a04": "#province", "a05": "#city", "a06": "#os_version", "a07": "#manufacturer", "a08": "#os", "a09": "#device_id", "a10": "#screen_height", "a11": "#screen_width", "a12": "#device_model", "a13": "#app_version", "a14": "#bundle_id", "a15": "#lib", "a16": "#lib_version", "a17": "#network_type", "a18": "#carrier", "a19": "#browser", "a20": "#browser_version", "a21": "#duration", "a22": "#url", "a23": "#url_path", "a24": "#referrer", "a25": "#referrer_host", "a26": "#title", "a27": "#screen_name", "a28": "#element_id", "a29": "#element_type", "a30": "#resume_from_background", "a31": "#element_selector", "a32": "#element_position", "a33": "#element_content", "a34": "#scene", "a35": "#mp_platform", "a36": "#app_crashed_reason", "a37": "#zone_offset", "b01": "#app_id", "b06": "#event_time" } TA_OUTER = {'#time', '#ip', '#type', '#distinct_id', '#account_id', '#event_name'} REDIS_CONF = { 'address': ('192.168.0.161', 6379), 'password': 'd1Gh*zp5', 'db': 1 } SALT = { '3F9AdWKZGhhNS2': 's4epprEG8DdyG5' } OUTPUT_NAME = { '3F9AdWKZGhhNS2': 'test' } KAFKA_CONF = { 'bootstrap_servers': ["192.168.0.30:9092", "192.168.0.71:9092", "192.168.0.229:9092"], 'value_serializer': lambda v: json.dumps(v).encode('utf-8'), } class Debug(Config): REDIS_CONF = { 'address': ('192.168.0.161', 6379), 'password': 'd1Gh*zp5', 'db': 0 } settings = Debug