13 lines
294 B
Python
13 lines
294 B
Python
import os
|
|
from dotenv import load_dotenv
|
|
from portainer import PortainerApi
|
|
|
|
|
|
load_dotenv()
|
|
portainer_url = os.getenv("PORTAINER_URL")
|
|
portainer_token = os.getenv("PORTAINER_TOKEN")
|
|
|
|
portainer = PortainerApi(portainer_url, portainer_token)
|
|
stacks = portainer.stacks.list_stacks()
|
|
print(stacks)
|