In kivy python how to get data from a url request
<p>I am requesting JSON from a url in kivy. In the main App:</p>

<pre><code>data = UrlRequest('http://myhost.ninja/request', gotArticles, onFailure)
</code></pre>

<p>and the callback:</p>

<pre><code>def gotArticles(req, results):
  for key in results:
    return key
</code></pre>

<p>when I then <code>print(data)</code> I get <code>&lt;UrlRequest(Thread-1, started daemon 123145307557888)&gt;</code> printed. I can print the data from inside the callback, but how do I return the data to the rest of the application?</p>