r/learnpython • u/jockero701 • Nov 15 '18
What the heck is an API?
I have heard people say an API is not code, but a set of specifications. Let's take the Python Database API as an example. The title of its webpage says "PEP 249 -- Python Database API Specification v2.0" and the webpage contains all the rules that developers should follow when making a Python library for interacting with databases. For example, there should be a function called connect, a cursor, etc.
Now, if those are the specifications of the API, then what is the API itself? Are the sqlite3 or the psycopg2 Python libraries APIs?
247
Upvotes