mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
18 lines
425 B
Python
18 lines
425 B
Python
![]() |
import sys
|
||
|
import os
|
||
|
import dop.client
|
||
|
from django.conf import settings
|
||
|
|
||
|
sys.path.append(os.getcwd())
|
||
|
|
||
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
doapi = dop.client.Client(settings.DO_CLIENT_KEY, settings.DO_API_KEY)
|
||
|
droplets = doapi.show_active_droplets()
|
||
|
for droplet in droplets:
|
||
|
if sys.argv[1] in droplet.name:
|
||
|
print droplet.ip_address
|
||
|
break
|
||
|
|