<s> from abc import ABCMeta , abstractmethod <EOL> class BaseDecoder ( object ) : <EOL> __metaclass__ = ABCMeta <EOL> @ abstractmethod <EOL> def decode ( self , buffer ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abstractmethod <EOL> def decode_request ( self , buffer ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class BaseEncoder ( object ) : <EOL> __metaclass__ = ABCMeta <EOL> @ abstractmethod <EOL> def encode_add_seeds ( self , seeds ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abstractmethod <EOL> def encode_page_crawled ( self , response , links ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abstractmethod <EOL> def encode_request_error ( self , request , error ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abstractmethod <EOL> def encode_request ( self , request ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abstractmethod <EOL> def encode_update_score ( self , fingerprint , score , url , schedule ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abstractmethod <EOL> def encode_new_job_id ( self , job_id ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abstractmethod <EOL> def encode_offset ( self , partition_id , offset ) : <EOL> """<STR_LIT>""" <EOL> pass </s>
