<s> from lbrynet . conf import BLOB_SIZE <EOL> class ClientRequest ( object ) : <EOL> def __init__ ( self , request_dict , response_identifier = None ) : <EOL> self . request_dict = request_dict <EOL> self . response_identifier = response_identifier <EOL> class ClientPaidRequest ( ClientRequest ) : <EOL> def __init__ ( self , request_dict , response_identifier , max_pay_units ) : <EOL> ClientRequest . __init__ ( self , request_dict , response_identifier ) <EOL> self . max_pay_units = max_pay_units <EOL> class ClientBlobRequest ( ClientPaidRequest ) : <EOL> def __init__ ( self , request_dict , response_identifier , write_func , finished_deferred , <EOL> cancel_func , blob ) : <EOL> if blob . length is None : <EOL> max_pay_units = BLOB_SIZE <EOL> else : <EOL> max_pay_units = blob . length <EOL> ClientPaidRequest . __init__ ( self , request_dict , response_identifier , max_pay_units ) <EOL> self . write = write_func <EOL> self . finished_deferred = finished_deferred <EOL> self . cancel = cancel_func <EOL> self . blob = blob </s>
