базовая структура проета

This commit is contained in:
Максим Ардашев 2026-05-24 20:59:01 +03:00
parent 77f86ba165
commit 904d8595fa
10 changed files with 41 additions and 1 deletions

8
.gitignore vendored
View File

@ -1,3 +1,4 @@
# Игнорировать файлы Python
pycache/ pycache/
*.pyc *.pyc
*.pyo *.pyo
@ -12,4 +13,9 @@ venv/
# Игнорировать файлы с токенами # Игнорировать файлы с токенами
.env .env
token.txt token.txt
# Временные файлы
*.tmp
*.bak
*.swp

15
docs/architecture.md Normal file
View File

@ -0,0 +1,15 @@
lab3/
├── src/
│ ├── tcp_server.py
│ ├── tcp_client.py
│ ├── udp_server.py
│ ├── udp_client.py
│ └── config.py
├── tests/
│ └── test_server.py
├── docs/
│ └── architecture.md
├── README.md
├── requirements.txt
├── run.sh
└── .gitignore

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
requests

5
run.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
echo "Запуск TCP сервера"
python src/tcp_server.py &
echo "Запуск TCP клиента"
python src/tcp_client.py

4
src/config.py Normal file
View File

@ -0,0 +1,4 @@
# config.py
HOST = '127.0.0.1'
TCP_PORT = 10000
UDP_PORT = 10001

0
src/tcp_client.py Normal file
View File

0
src/tcp_server.py Normal file
View File

0
src/udp_client.py Normal file
View File

0
src/udp_server.py Normal file
View File

9
tests/test_server.py Normal file
View File

@ -0,0 +1,9 @@
import unittest
class TestServer(unittest.TestCase):
def test_connection(self):
# Здесь будет код теста
pass
if name == 'master':
unittest.main()