Showing results for 
Search instead for 
Did you mean: 

Can't import api from exos

Can't import api from exos

New Contributor
Hey everybody!

I'm working on a project with an Extreme Networks Summit X440-8p running firmware-version I want to write a python script, but I'm stuck at the beginning.

The Python Scripting Guide ( tells me I have to import api from exos with the following line:

"from exos import api"

Unfortunately, every time I want to execute my script (which just has a print command at the moment), there's an error:

"* X440-8p.81 # run script print_test
Traceback (most recent call last):
File "/config/", line 1, in
from exos import api
File "/exos/tools/lib/python2.7/site-packages/exos/api/", line 21, in
File "/exos/tools/lib/python2.7/site-packages/exos/api/", line 10, in
ImportError: No module named _exos_ext_ems".

What am I doing wrong? It's exactly how the scripting guide tells me to import the api. This site tells me the same:

Has anything changed since it looks like this site is for software-version 15.7.1 whereas I'm running

Thanks in advance!

New Contributor II
I ended up just copying the file from EXOS_Apps for now to our internal repo, since that was all that was required. It works great! We'll look into using the entire repos when our needs get more complicated. Thanks.

New Contributor II
Thanks Dave. Do you or anyone have any general insights into the purpose and distinction between all these repos that appear to overlap a lot in that they all have examples of extreme scripts: ExtremeScripting, EXOS_Apps, exoslib?

I'm cloning what I need to our git server, and would rather not just clone everything willy nilly. Was hoping someone could point out the rhyme and reason for the code organization there. Thanks.

Extreme Employee
I'd recommend using
It has support for authentication cookies so each JSONRPC transaction doesn't re-authenticate on the switch.
It also has HTTP/HTTPS support which tries HTTPS first before trying HTTP.

I had forgotten about the version posted in ExtremeScripting but I see someone has contributed to that version.which is why the date is recent.

New Contributor II
Thanks Dave. I see your name as the last person to update the version of in the EXOS_Apps project (back in March), so I will ask you my next question directly:

I also see an implementation for the JsonRPC class required to use this API defined in the module in the ExtremeScripting project, which was modified much more recently (3 months ago). I'm confused by these multiple implementations - seems like one should be using the other, since they're both in ExtremeNetworks' repos. Which should I use, to maximize my chances of being able to pull improvements moving forward, and/or be able to contribute to?

I was going to just use the one in the EXOS_Apps project, since this is the one that Stephane Grosjean pointed me at in [filter_by]=all&topic-reply-list[settings][reply_id]=19790751#reply_19790751]my other thread. But that one apparently isn't the most up-to-date.

Any advice would be appreciated, thanks.