|
|
|
@ -18,7 +18,7 @@
|
|
|
|
|
|
|
|
|
|
"""Lazy ZIP over HTTP""" |
|
|
|
|
|
|
|
|
|
__version__ = '0.0.4' |
|
|
|
|
__version__ = '0.0.5' |
|
|
|
|
__all__ = ['Filazy', 'Lazip'] |
|
|
|
|
|
|
|
|
|
from abc import abstractmethod |
|
|
|
@ -46,7 +46,7 @@ class ReadOnlyBinaryIOWrapper(IO[bytes]):
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
def name(self) -> str: |
|
|
|
|
"""File name.""" |
|
|
|
|
"""Path to the underlying file.""" |
|
|
|
|
return self.file.name |
|
|
|
|
|
|
|
|
|
def close(self) -> None: |
|
|
|
@ -172,7 +172,7 @@ class Filazy(ReadOnlyBinaryIOWrapper):
|
|
|
|
|
accept_ranges (bool): Whether range requests are supported |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
def __init__(self, session: Session, url: str, |
|
|
|
|
def __init__(self, url: str, session: Session, |
|
|
|
|
chunk_size: int = CONTENT_CHUNK_SIZE) -> None: |
|
|
|
|
response = session.head(url) |
|
|
|
|
response.raise_for_status() |
|
|
|
|