a simple api for json data

kirby urner <[email protected]>
Newsgroups gmane.comp.python.education
Message-ID <CAPJgG3Rd8QzOY6kz62G6zAXfgoORFPCVjusSsXvNckzSRA8PDQ@mail.gmail.com>
[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

_______________________________________________
Edu-sig mailing list
[email protected]
https://mail.python.org/mailman/listinfo/edu-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.