initial commit

This commit is contained in:
Hirad 2024-12-06 15:29:36 +03:30
parent 8e2da75eab
commit 96296a65ad
4 changed files with 38 additions and 0 deletions

3
requirements.txt Normal file
View file

@ -0,0 +1,3 @@
python-dotenv~=1.0.1
requests~=2.32.3
setuptools~=75.5.0

23
setup.py Normal file
View 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
View file

12
test/test_api.py Normal file
View 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)