[Edu-sig] a simple api for json data

kirby urner kirby.urner at gmail.com
Sun Jun 18 11:28:00 EDT 2017


[1] also a missing footnote from my previous post:
https://github.com/4dsolutions/Python5/blob/master/py_async_get_chemicals.py

Feel free to hit against my $5/mo Hacker account with pythonAnywhere for
teaching your students how to go against an API with urllib or requests or
whatever e.g.:

url = "http://thekirbster.pythonanywhere.com/api/elements?elem=Fe"

with urllib.request.urlopen(url) as response:
    html = response.read()


html
Out[11]: b'[26, "Fe", "Iron", 55.8452, "transition metal", 1493462392,
"KTU"]'

The API itself is pretty simple and documented on the home page:
http://thekirbster.pythonanywhere.com

Feel free to ask me questions on this thread on edu-sig. I'm not selling
you a product, just yakking about a free service.  The complete source code
for this tiny Flask application is also visible on Github.  I use this for
teaching my courses.

Kirby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20170618/47852d68/attachment.html>


More information about the Edu-sig mailing list