Start CLI implementation

This commit is contained in:
Lucas Mathews
2024-05-30 11:03:17 +02:00
parent 558d818aac
commit 60114d6ef2
6 changed files with 63 additions and 26 deletions

14
cli/connection.py Normal file
View File

@@ -0,0 +1,14 @@
# api_client.py
import requests
from config import CONFIG
def login(username, password):
url = f"{CONFIG['server']['url']}/login"
payload = {'username': username, 'password': password}
response = requests.get(url, params=payload)
return response
def logout():
url = f"{CONFIG['server']['url']}/logout"
response = requests.get(url)
return response