initial commit
This commit is contained in:
parent
8e2da75eab
commit
96296a65ad
3
requirements.txt
Normal file
3
requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
python-dotenv~=1.0.1
|
||||||
|
requests~=2.32.3
|
||||||
|
setuptools~=75.5.0
|
23
setup.py
Normal file
23
setup.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
|
with open("README.md", "r") as file:
|
||||||
|
load_description = file.read()
|
||||||
|
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="portman",
|
||||||
|
version="0.0.1",
|
||||||
|
author="Hirad",
|
||||||
|
author_email="hirad@hirad.it",
|
||||||
|
description="A tool to manage Portainer stacks and endpoints",
|
||||||
|
load_description=load_description,
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
url="https://git.hirad.it/Hirad/Portman",
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
],
|
||||||
|
python_requires=">=3.6"
|
||||||
|
)
|
0
test/__init__.py
Normal file
0
test/__init__.py
Normal file
12
test/test_api.py
Normal file
12
test/test_api.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
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)
|
Loading…
Reference in a new issue