P
P
progerstas2020-05-17 17:56:02
Python
progerstas, 2020-05-17 17:56:02

How does the API work (in PYTHON)?

I know that the API is used to communicate two applications. But I don't know how to create, enable and use. Throw off please a link to a suitable resource or briefly explain.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2020-05-17
@NeiroNx

API - application programming interface
Usually implemented as a network port (even if the applications are on the same computer - this is the easiest way) in the application and the library for the target language.
RESTful API - as a special case, api is implemented via the HTTP protocol and usually does not require special libraries, since almost any top-level language supports HTTP requests.

S
Sergey Sokolov, 2020-05-17
@sergiks

An API is an agreement on how to interact with a program.
A simple program or a large-complex service.
For example, VKontakte works there somewhere on the servers, and they have an API accessible via the web via the HTTP protocol at https://api.vk.comAND detailed documentation . Programs in any languages ​​can work with their API, incl. in python.
To get started, try interacting with some ready-made API - for example, the same VK. Try to make a Python program that will connect to VK, get the time value and display it on the screen. Look on github for ready-made Python libraries for working with VK - this will reduce your own code to 3 lines.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question