Skip to content

Development#1

Open
MatrikSer wants to merge 10 commits into
mainfrom
development
Open

Development#1
MatrikSer wants to merge 10 commits into
mainfrom
development

Conversation

@MatrikSer
Copy link
Copy Markdown
Owner

@MatrikSer MatrikSer commented Sep 1, 2025

No description provided.

Comment thread src/http_client/client.py
from http_client.structures import Request, Url_info


class Http_client:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class Http_client:
class HttpСlient:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Блин, чет мне не очень нравится такое архитектурное решение: что у тебя этот клиент и контекстный менеджер, и основной обработчик, ладно бы у тебя все действие внутри происходило. Мб лучше принимать как параметр при создании объекта коннект?

Comment thread src/http_client/client.py Outdated
Comment on lines +19 to +23
self.timeout: int = timeout
self.socket: socket.socket | None = None
self.ssl_socket: ssl.SSLSocket | None = None
self.response: bytes | None = None
self.response_body: bytes | None = None
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

протектед

Comment thread src/http_client/structures.py Outdated
from typing import NamedTuple


class Args(NamedTuple):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделай BaseModel, тогда можно будет задать дефотл для таймаута и добавить валидатор прям внутрь класса

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants