Network resource API
When we have network devices in production, each of the devices will have a certain state and information that you would like to keep in a persistent location so that you can easily retrieve them later on. This is often done in terms of storing data in a database. We saw many examples of such information storage in the monitoring chapters.
However, we would not normally give other non-network administrative users who might want this information direct access to the database; nor would they want to learn all the complex SQL query language. For these cases, we can leverage Flask and the Flask-SQLAlchemy extension of Flask to give them the necessary information via a network API.
You can learn more about Flask-SQLAlchemy at: https://flask-sqlalchemy.palletsprojects.com/en/2.x/.
Flask-SQLAlchemy
SQLAlchemy and the Flask-SQLAlchemy extension are a database abstraction and object-relational mapper, respectively. It's a fancy...