Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial code #1

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

Conversation

leon1995
Copy link
Member

No description provided.

* add initial code

* remove test pypi

* exit publish if not on main

* add test pypi

* install stubs

* fix dependency instllation

* naming of ci
@leon1995 leon1995 requested a review from ldeichmann November 15, 2024 09:13
@leon1995 leon1995 self-assigned this Nov 15, 2024
@leon1995 leon1995 requested a review from a-kleinf January 22, 2025 16:03
@leon1995 leon1995 requested a review from backs-draeger March 31, 2025 09:12
proxy: httpx.Proxy | None = None,
) -> None:
with httpx.stream('GET', url, follow_redirects=True, proxy=proxy) as response:
total = int(response.headers['Content-Length'])
Copy link
Member

Choose a reason for hiding this comment

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

If the transport is using http/1.1 and the transfer-encoding is chunked, there is no content-length - case needs to be handled

PROXY = ProxyType()


def _download_to_stream(
Copy link
Member

Choose a reason for hiding this comment

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

Why doesn't this use the download_to_stream function defined in _download? It seems like this should only exist once and progress can be controlled via a callback.

@pstaeck pstaeck self-requested a review April 10, 2025 13:23
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