Use the generator directly instead of pulling down all items at once (you can remove line 272 after this of course)

```python
for software in Software.query:
```