The recommended approach when the end user wants to manage multiple devices from a single remote system and/or leverage availability of modern languages and tools available on the remote system.
Out of the multiple options available today, Junos PyEZ is likely the most popular Python library to remotely manage/automate Junos devices. It's smooth learning curve allows users, without much programming experience, to start leveraging it for automation quickly.
Junos PyEZ is designed to provide the same capabilities as a user would have on the Junos CLI, but in an environment built for automation tasks. These capabilities include, but are not limited to:
Installation requires Python 2.7 or >=3.4 and associated pip tool
pip install junos-eznc
Installing from Git is also supported (OS must have git installed).
To install the latest MASTER code:
pip install git+https://github.com/Juniper/py-junos-eznc.git
To install a specific version, branch, tag, etc.
pip install git+https://github.com/Juniper/py-junos-eznc.git@<branch,tag,commit>
See GitHub page for more options...