practice03-api-mamaev/README.md

20 lines
846 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Лабораторная 3: socket и requests
## Подготовка окружения
- python -m venv venv
- venv\Scripts\activate (или source venv/bin/activate)
- pip install requests
## TCP/UDP серверы и клиенты
- tcp_server.py / tcp_client.py — обмен строками по TCP на порту 10000
- udp_server.py / udp_client.py — обмен строками по UDP на порту 10001
## HTTP через socket
- http_client_socket.py — GET / к vyatsu.ru через socket, порт 80
## HTTP через requests
- http_client_requests.py — GET к http://vyatsu.ru через библиотеку requests
## Git API
- git_api.py — запрос к https://git.vyatsu.ru/api/v1/user
- Требуется переменная окружения GIT_VYATSU_TOKEN с токеном (read-only)