Home | Trees | Indices | Help |
---|
|
1 # -*- encoding: utf-8 -*- 2 ############################################################################## 3 # 4 # ETL system- Extract Transfer Load system 5 # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved 6 # $Id$ 7 # 8 # This program is free software: you can redistribute it and/or modify 9 # it under the terms of the GNU General Public License as published by 10 # the Free Software Foundation, either version 3 of the License, or 11 # (at your option) any later version. 12 # 13 # This program is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 # GNU General Public License for more details. 17 # 18 # You should have received a copy of the GNU General Public License 19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 20 # 21 ############################################################################## 22 """ 23 To get the response for the request made to xmlrpc server. 24 25 Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). 26 GNU General Public License. 27 """ 28 29 from etl.component import component 3032 """ 33 To get the response for the request made to xmlrpc server. 34 """5835 - def __init__(self, xmlrpc_connector, name='component.output.xmlrpc_out', transformer=None, row_limit=0):36 super(xmlrpc_out, self).__init__(name=name, connector=xmlrpc_connector, transformer=transformer, row_limit=row_limit) 37 self._type = 'component.output.xmlrpc_out'38 4244 super(xmlrpc_out, self).end() 45 if self.server: 46 self.connector.close(self.server) 47 self.server = False4860 from etl_test import etl_test 61 import etl 62 xmlrpc_conn = etl.connector.xmlrpc_connector('localhost', 8050) 63 test1 = etl_test.etl_component_test(xmlrpc_out(xmlrpc_conn)) 64 server = xmlrpc_conn.connect() 65 server.import_data([])66 67 if __name__ == '__main__': 68 test() 69 70 #s = xmlrpclib.ServerProxy('http://localhost:5000') 71 #s.import_data([ 72 # {'org':'X.Ltd','fn':'Mr.X','email':'x@xmail.com'}, 73 # {'org':'Y.Ltd','fn':'Mr.Y','email':'y@ymail.com'}, 74 # {'org':'X.Ltd','fn':'Mr.XX','email':'xx@xmail.com'}, 75 # {'org':'X.Ltd','fn':'Mr.X2','email':'x2@xmail.com'}, 76 # {'org':'Y.Ltd','fn':'Mr.Y1','email':'y1@ymail.com'}, 77 # ]) 78
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Apr 29 20:27:03 2009 | http://epydoc.sourceforge.net |