13 lines
368 B
Python
13 lines
368 B
Python
import requests
|
||
|
||
with open("token.env", "r") as f:
|
||
for line in f:
|
||
if line.startswith("READ_TOKEN="):
|
||
TOKEN = line.strip().split("=")[1]
|
||
|
||
headers = {"Authorization": f"token {TOKEN}"}
|
||
response = requests.get("https://git.vyatsu.ru/api/v1/user", headers=headers)
|
||
print("Информация о пользователе:")
|
||
print(response.json())
|
||
|