11How To Use This Module
22======================
3- More documentation can be found [ On PyPI] ( http://pythonhosted.org/restfulengine/ )
3+ * More documentation can be found [ On PyPI] ( http://pythonhosted.org/restfulengine/ ) *
4+
451 . Import the module:
56```
67import restfulengine
@@ -24,8 +25,10 @@ report = restfulengine.create_report(
2425 template
2526)
2627```
27- 3 . Set up "DataSource" objects and add them to a list.
28- "XmlDataSource" objects or "AdoDataSource" objects:
28+ 3 . Set up [ DataSource] ( http://pythonhosted.org/restfulengine/#restfulengine.DataSource )
29+ objects and add them to a list.
30+ [ XmlDataSource] ( http://pythonhosted.org/restfulengine/#restfulengine.XmlDataSource )
31+ objects or [ AdoDataSource] ( http://pythonhosted.org/restfulengine/#restfulengine.AdoDataSource ) objects:
2932```
3033data_sources = [
3134 AdoDataSource(
@@ -36,13 +39,16 @@ data_sources = [
3639 "User=demo;Password=demo")
3740]
3841```
39- 4 . Call "Report.process()" with your data sources to send the request:
42+ 4 . Call [ Report.process()] ( http://pythonhosted.org/restfulengine/#restfulengine.Report.process )
43+ with your data sources to send the request:
4044```
4145report.process(data_sources)
4246```
43- 5 . (for async reports) call "Report.get_status()" to poll the
44- server so you know when the report is done. Then call
45- "Report.get_report()" to retrieve the output. Finally, call delete
47+ 5 . (for async reports) call
48+ [ Report.get_status()] ( http://pythonhosted.org/restfulengine/#restfulengine.Report.get_status )
49+ to poll the server so you know when the report is done. Then call
50+ [ Report.get_report()] ( http://pythonhosted.org/restfulengine/#restfulengine.Report.get_report )
51+ to retrieve the output. Finally, call delete
4652when you are done with the report to delete it from the server:
4753```
4854while report.get_status() == Status.working:
0 commit comments