NAVIADDRESS API
Python
To access the Naviaddress API using the Python programming language you must use the requests library
Python 3

To access the Naviaddress API using the Python programming language you must use the requests library.

To do this, it must be installed using the pip command below.
> pip install requests
Then create a file main.py, which we add a few lines to.

First, we import the definition of the requests library.

In the next line, we make a Naviaddress API URL request, in which we indicate the container and the address of the object we want to receive (in our example, the address of the Russian Naviaddress office). For convenience, let's save the received response as a string in the variable r.

Prepare an object for easy access to the fields of the object. For this purpose we convert the string to a JSON object using the json() method.
import requests

r = requests.get('https://staging-api.naviaddress.com/api/v1.5/Addresses/7/0022')

j = r.json()["result"]

print("["+j["container"]+"]"+j["naviaddress"]+" - "+j["description"])
In the last line we printout the data of received Naviaddress.

Now let's run the program using the python interpreter. If we successfully coped with the task, then we should get the following line at the result:
> python main.py

[7495]0022 - Office Naviaddress.ru
written by: A.Gershun (09/12/2018)
Made on
Tilda