Skip to content

Implement ASGI application with fibonacci, factorial, and mean endpoints - #17

Open
Strong-Wings wants to merge 5 commits into
L1mple:mainfrom
Strong-Wings:main
Open

Strong-Wings wants to merge 5 commits into
L1mple:mainfrom
Strong-Wings:main

Conversation

@Strong-Wings

Copy link
Copy Markdown

Implemented hw1 task with math operations and endpoints

@DevDenus DevDenus left a comment

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 hw1/app.py
while has_more:
message = await receive()
body += message.get("body", b"")
has_more = message.get("more_body", False)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

можно дополнительно disconnect обрабатывать, но некритично здесь

Comment thread hw1/app.py
if path == "/factorial":
kvs = scope["query_string"].decode()
n = None
for kv in kvs.split("&"):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

лучше использовать urllib.parse.parse_qs

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