diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/list_servers.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/list_servers.py b/python/list_servers.py new file mode 100644 index 0000000..9b8bc64 --- /dev/null +++ b/python/list_servers.py | |||
@@ -0,0 +1,12 @@ | |||
1 | try: | ||
2 | from ovh import ovh | ||
3 | except ImportError: | ||
4 | # In case it's installed globally | ||
5 | import ovh | ||
6 | |||
7 | client = ovh.Client() | ||
8 | |||
9 | vps_list = client.get('/vps/') | ||
10 | |||
11 | for vps in vps_list: | ||
12 | print(vps) | ||