import requests
import os
from dotenv import load_dotenv

load_dotenv()

TOKEN = os.getenv("GITEA_TOKEN")


headers = {"Authorization": f"token {TOKEN}"}

data = {
    "name": "3lab_testrepo",
    "description": "Репозиторий созданный через API",
    "private": False,
    "auto_init": True
}

response = requests.post("https://git.vyatsu.ru/api/v1/user/repos", json=data, headers=headers)

print("Status code:", response.status_code)
print("Text:", response.text)