Using Pyral package with Komodo ide

104 Views Asked by At

I'm using Python, write down in Komodo IDE, to create toolkit that works with CA agile central API service(Rally) - Rally for Developer. When using GET HTTP request, I encounter with several problems:

1. Fetching partial records - if I set FETCH property == True not all records return. On the other hand, if I set FETCH with specific value/s from the query(e.g., FETCH = 'FormattedID'), the instance fetch all the records. This is my GET request:

> rallyApiObjectModels = rally.get('HierarchicalRequirement',
> projectScopeDown = True, project="myProject", fetch=True,
> order="FormattedID", start=1, pagesize = 500);

And than:

 for _objModel in rallyApiObjectModels.data["Result"]
            print(_objModel)

2. Low performance using Komodo ide - when trying to fetch data from the HTTP request that is greater than 200, it takes for the end of time(e.g., pagesize =300 takes 11 min). On the other hand, using command promp is very fast for the same script when writing to file. I set the same rally.get request like above and just print to IDE console:

print rallyApiObjectModels.data["Result"]

Any ideas?

1

There are 1 best solutions below

1
On

Please don't use fetch=true. The performance is terrible, as you found. It is much better to specify exactly the fields you want included in the response. You should be able to use a page size of up to 2000, with the performance sweet spot being some balance between the set of fields fetched and your network latency.

I bet the Komodo IDE is just choking on the large response- unfortunately there's not much that can be done about that on the Rally end...