[Tutor] Working with APIs - understanding the basics (Python 3.5)

Alan Gauld alan.gauld at yahoo.co.uk
Sat Apr 29 14:52:49 EDT 2017


On 29/04/17 18:13, Rafael Knuth wrote:
> can anyone recommend good resources? I am primarily in search of
> simple, clean code examples & practical usecases (Google APIs for
> example). 

An API is just a set of classes or functions.
The Python standard library is an API.

You already have lots of examples and documentation
for the standard library.

What exactly is it you are looking for?
If I describe, for example, the API to WxPython (for
building GUIs) that will probably not help you unless
you want to build a GUI.

Similarly if I describe Twisted's API (for writing
networking programs) that won't help unless you want to
write a network server or somesuch.

Is there a specific API you have in mind (you mention
Google - is that because you want to use it or just
because its one you've heard about?)? Or is it just
the concept of APIs?

If the latter stick with the standard library, or a
sub-set of it. For example the os package provides
an API into your operating system. Try exploring that.
Start with the os module documentation.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list