Does PyEZ work with an EX4300 switch?
Looking https://www.juniper.net/documentation/en_US/junos/topics/concept/rest-api-overview.html under the Platform and Release Support link, it appears that EX series switches do not support the REST API. Does PyEZ use REST to talk with the switches?
PyEZ makes netconf session to devices over SSH/Telnet/Serial connection. Check below link for more details
You can use PyEZ to connect to any of EX device and get back output in XML/JSON.